/// <summary>
 /// Creates a new SSH public key resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to create the SSH public key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SshPublicKeyResourceInner> CreateAsync(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName, SshPublicKeyResourceInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, sshPublicKeyName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the SSH public keys in the specified resource group. Use the
 /// nextLink property in the response to get the next page of SSH public keys.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SshPublicKeyResourceInner> > ListByResourceGroupAsync(this ISshPublicKeysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Generates and returns a public/private key pair and populates the SSH
 /// public key resource with the public key. The length of the key will be 3072
 /// bits. This operation can only be performed once per SSH public key
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SshPublicKeyGenerateKeyPairResultInner> GenerateKeyPairAsync(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateKeyPairWithHttpMessagesAsync(resourceGroupName, sshPublicKeyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the SSH public keys in the subscription. Use the nextLink
 /// property in the response to get the next page of SSH public keys.
 /// </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 <SshPublicKeyResourceInner> > ListBySubscriptionNextAsync(this ISshPublicKeysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the SSH public keys in the specified resource group. Use the
 /// nextLink property in the response to get the next page of SSH public keys.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 public static IPage <SshPublicKeyResource> ListByResourceGroup(this ISshPublicKeysOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete an SSH public key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, sshPublicKeyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Lists all of the SSH public keys in the specified resource group. Use the
 /// nextLink property in the response to get the next page of SSH public keys.
 /// </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 <SshPublicKeyResource> ListByResourceGroupNext(this ISshPublicKeysOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the SSH public keys in the subscription. Use the nextLink
 /// property in the response to get the next page of SSH public keys.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <SshPublicKeyResource> ListBySubscription(this ISshPublicKeysOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Generates and returns a public/private key pair and populates the SSH
 /// public key resource with the public key. The length of the key will be 3072
 /// bits. This operation can only be performed once per SSH public key
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 public static SshPublicKeyGenerateKeyPairResult GenerateKeyPair(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName)
 {
     return(operations.GenerateKeyPairAsync(resourceGroupName, sshPublicKeyName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete an SSH public key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 public static void Delete(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName)
 {
     operations.DeleteAsync(resourceGroupName, sshPublicKeyName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Updates a new SSH public key resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='sshPublicKeyName'>
 /// The name of the SSH public key.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to update the SSH public key.
 /// </param>
 public static SshPublicKeyResource Update(this ISshPublicKeysOperations operations, string resourceGroupName, string sshPublicKeyName, SshPublicKeyUpdateResource parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, sshPublicKeyName, parameters).GetAwaiter().GetResult());
 }