/// <summary>
 /// Gets a specific order by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Order> GetAsync(this IOrdersOperations operations, string deviceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(deviceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all the orders related to a Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Order> > ListByDataBoxEdgeDeviceNextAsync(this IOrdersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDataBoxEdgeDeviceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 public override void ExecuteCmdlet()
 {
     _operations = this.DataBoxEdgeManagementClient.Orders;
     if (this.ShouldProcess(this.DeviceName,
                            string.Format("Creating '{0}' with name '{1}'.",
                                          HelpMessageOrder.ObjectName, this.DeviceName)))
     {
         DoesResourceExists();
         var results = new List <PSResourceModel>
         {
             CreateResourceModel()
         };
         WriteObject(results, true);
     }
 }
 /// <summary>
 /// Gets a specific order by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static Order Get(this IOrdersOperations operations, string deviceName, string resourceGroupName)
 {
     return(operations.GetAsync(deviceName, resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all the orders related to a Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static IPage <Order> ListByDataBoxEdgeDevice(this IOrdersOperations operations, string deviceName, string resourceGroupName)
 {
     return(operations.ListByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all the orders related to a Data Box Edge/Data Box Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Order> ListByDataBoxEdgeDeviceNext(this IOrdersOperations operations, string nextPageLink)
 {
     return(operations.ListByDataBoxEdgeDeviceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the order related to the device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IOrdersOperations operations, string deviceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes the order related to the device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static void BeginDelete(this IOrdersOperations operations, string deviceName, string resourceGroupName)
 {
     operations.BeginDeleteAsync(deviceName, resourceGroupName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Creates or updates an order.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The order details of a device.
 /// </param>
 /// <param name='order'>
 /// The order to be created or updated.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static Order BeginCreateOrUpdate(this IOrdersOperations operations, string deviceName, Order order, string resourceGroupName)
 {
     return(operations.BeginCreateOrUpdateAsync(deviceName, order, resourceGroupName).GetAwaiter().GetResult());
 }
Exemplo n.º 10
0
 /// <summary>
 /// Gets the DCAccess Code
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static DCAccessCode ListDCAccessCode(this IOrdersOperations operations, string deviceName, string resourceGroupName)
 {
     return(operations.ListDCAccessCodeAsync(deviceName, resourceGroupName).GetAwaiter().GetResult());
 }