/// <summary>
 /// Delete the given registered server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// GUID identifying the on-premises server.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RegisteredServersDeleteHeaders> BeginDeleteAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, serverId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Add a new registered server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// GUID identifying the on-premises server.
 /// </param>
 /// <param name='parameters'>
 /// Body of Registered Server object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RegisteredServer> CreateAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, RegisteredServerCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, serverId, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get a given registered server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// GUID identifying the on-premises server.
 /// </param>
 public static RegisteredServer Get(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId)
 {
     return(operations.GetAsync(resourceGroupName, storageSyncServiceName, serverId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get a given registered server list.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <RegisteredServer> > ListByStorageSyncServiceAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Triggers Server certificate rollover.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// Server Id
 /// </param>
 /// <param name='serverCertificate'>
 /// Certificate Data
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RegisteredServersTriggerRolloverHeaders> BeginTriggerRolloverAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, string serverCertificate = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginTriggerRolloverWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, serverId, serverCertificate, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Triggers Server certificate rollover.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// Server Id
 /// </param>
 /// <param name='serverCertificate'>
 /// Certificate Data
 /// </param>
 public static RegisteredServersTriggerRolloverHeaders BeginTriggerRollover(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, string serverCertificate = default(string))
 {
     return(operations.BeginTriggerRolloverAsync(resourceGroupName, storageSyncServiceName, serverId, serverCertificate).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get a given registered server list.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 public static IEnumerable <RegisteredServer> ListByStorageSyncService(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName)
 {
     return(operations.ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Add a new registered server.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='serverId'>
 /// GUID identifying the on-premises server.
 /// </param>
 /// <param name='parameters'>
 /// Body of Registered Server object.
 /// </param>
 public static RegisteredServer BeginCreate(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, RegisteredServerCreateParameters parameters)
 {
     return(operations.BeginCreateAsync(resourceGroupName, storageSyncServiceName, serverId, parameters).GetAwaiter().GetResult());
 }