/// <summary> /// Retrieves all the chap settings in a device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The name of the device. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <ChapSettings> > ListByDeviceAsync(this IChapSettingsOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates the chap setting. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='chapUserName'> /// The chap user name. /// </param> /// <param name='chapSetting'> /// The chap setting to be added or updated. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ChapSettings> BeginCreateOrUpdateAsync(this IChapSettingsOperations operations, string deviceName, string chapUserName, ChapSettings chapSetting, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, chapUserName, chapSetting, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the properties of the specified chap setting name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='chapUserName'> /// The user name of chap to be fetched. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static ChapSettings Get(this IChapSettingsOperations operations, string deviceName, string chapUserName, string resourceGroupName, string managerName) { return(operations.GetAsync(deviceName, chapUserName, resourceGroupName, managerName).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves all the chap settings in a device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The name of the device. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static IEnumerable <ChapSettings> ListByDevice(this IChapSettingsOperations operations, string deviceName, string resourceGroupName, string managerName) { return(operations.ListByDeviceAsync(deviceName, resourceGroupName, managerName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the chap setting. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='chapUserName'> /// The chap user name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IChapSettingsOperations operations, string deviceName, string chapUserName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, chapUserName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the chap setting. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='chapUserName'> /// The chap user name. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static void BeginDelete(this IChapSettingsOperations operations, string deviceName, string chapUserName, string resourceGroupName, string managerName) { operations.BeginDeleteAsync(deviceName, chapUserName, resourceGroupName, managerName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates the chap setting. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='chapUserName'> /// The chap user name. /// </param> /// <param name='chapSetting'> /// The chap setting to be added or updated. /// </param> /// <param name='resourceGroupName'> /// The resource group name /// </param> /// <param name='managerName'> /// The manager name /// </param> public static ChapSettings BeginCreateOrUpdate(this IChapSettingsOperations operations, string deviceName, string chapUserName, ChapSettings chapSetting, string resourceGroupName, string managerName) { return(operations.BeginCreateOrUpdateAsync(deviceName, chapUserName, chapSetting, resourceGroupName, managerName).GetAwaiter().GetResult()); }