/// <summary>
 /// Returns a list of all infrastructure role instances at a location.
 /// </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 <InfraRoleInstance> > ListNextAsync(this IInfraRoleInstancesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns a list of all infrastructure role instances at a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <InfraRoleInstance> > ListAsync(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, ODataQuery <InfraRoleInstance> odataQuery = default(ODataQuery <InfraRoleInstance>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, location, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Return the requested infrastructure role instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='infraRoleInstance'>
 /// Name of an infrastructure role instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InfraRoleInstance> GetAsync(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, string infraRoleInstance, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, location, infraRoleInstance, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Power on an infrastructure role instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='infraRoleInstance'>
 /// Name of an infrastructure role instance.
 /// </param>
 public static void PowerOn(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, string infraRoleInstance)
 {
     operations.PowerOnAsync(resourceGroupName, location, infraRoleInstance).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Power off an infrastructure role instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='infraRoleInstance'>
 /// Name of an infrastructure role instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PowerOffAsync(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, string infraRoleInstance, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PowerOffWithHttpMessagesAsync(resourceGroupName, location, infraRoleInstance, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Returns a list of all infrastructure role instances at a location.
 /// </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 <InfraRoleInstance> ListNext(this IInfraRoleInstancesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns a list of all infrastructure role instances at a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <InfraRoleInstance> List(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, ODataQuery <InfraRoleInstance> odataQuery = default(ODataQuery <InfraRoleInstance>))
 {
     return(operations.ListAsync(resourceGroupName, location, odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Return the requested infrastructure role instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group.
 /// </param>
 /// <param name='location'>
 /// Location of the resource.
 /// </param>
 /// <param name='infraRoleInstance'>
 /// Name of an infrastructure role instance.
 /// </param>
 public static InfraRoleInstance Get(this IInfraRoleInstancesOperations operations, string resourceGroupName, string location, string infraRoleInstance)
 {
     return(operations.GetAsync(resourceGroupName, location, infraRoleInstance).GetAwaiter().GetResult());
 }