Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,221 changes: 1,221 additions & 0 deletions src/Sql/Sql.Management.Sdk/Generated/DeletedServersOperations.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Sql
{
using Microsoft.Rest.Azure;
using Models;

/// <summary>
/// Extension methods for DeletedServersOperations
/// </summary>
public static partial class DeletedServersOperationsExtensions
{
/// <summary>
/// Gets a list of all deleted servers in a subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static Microsoft.Rest.Azure.IPage<DeletedServer> List(this IDeletedServersOperations operations)
{
return ((IDeletedServersOperations)operations).ListAsync().GetAwaiter().GetResult();
}

/// <summary>
/// Gets a list of all deleted servers in a subscription.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedServer>> ListAsync(this IDeletedServersOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets a list of deleted servers for a location.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
public static Microsoft.Rest.Azure.IPage<DeletedServer> ListByLocation(this IDeletedServersOperations operations, string locationName)
{
return ((IDeletedServersOperations)operations).ListByLocationAsync(locationName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a list of deleted servers for a location.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedServer>> ListByLocationAsync(this IDeletedServersOperations operations, string locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListByLocationWithHttpMessagesAsync(locationName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
public static DeletedServer Get(this IDeletedServersOperations operations, string locationName, string deletedServerName)
{
return ((IDeletedServersOperations)operations).GetAsync(locationName, deletedServerName).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeletedServer> GetAsync(this IDeletedServersOperations operations, string locationName, string deletedServerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(locationName, deletedServerName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Recovers a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
public static DeletedServer Recover(this IDeletedServersOperations operations, string locationName, string deletedServerName)
{
return ((IDeletedServersOperations)operations).RecoverAsync(locationName, deletedServerName).GetAwaiter().GetResult();
}

/// <summary>
/// Recovers a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeletedServer> RecoverAsync(this IDeletedServersOperations operations, string locationName, string deletedServerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.RecoverWithHttpMessagesAsync(locationName, deletedServerName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Recovers a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
public static DeletedServer BeginRecover(this IDeletedServersOperations operations, string locationName, string deletedServerName)
{
return ((IDeletedServersOperations)operations).BeginRecoverAsync(locationName, deletedServerName).GetAwaiter().GetResult();
}

/// <summary>
/// Recovers a deleted server.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='locationName'>
/// The name of the region where the resource is located.
/// </param>
/// <param name='deletedServerName'>
/// The name of the deleted server.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<DeletedServer> BeginRecoverAsync(this IDeletedServersOperations operations, string locationName, string deletedServerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.BeginRecoverWithHttpMessagesAsync(locationName, deletedServerName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets a list of all deleted servers in a subscription.
/// </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 Microsoft.Rest.Azure.IPage<DeletedServer> ListNext(this IDeletedServersOperations operations, string nextPageLink)
{
return ((IDeletedServersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a list of all deleted servers in a subscription.
/// </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 System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedServer>> ListNextAsync(this IDeletedServersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Gets a list of deleted servers for 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 Microsoft.Rest.Azure.IPage<DeletedServer> ListByLocationNext(this IDeletedServersOperations operations, string nextPageLink)
{
return ((IDeletedServersOperations)operations).ListByLocationNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Gets a list of deleted servers for 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 System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<DeletedServer>> ListByLocationNextAsync(this IDeletedServersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListByLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
}
}
Loading