Skip to content

Commit

Permalink
.NET SDK Resource Provider:'RecoveryServices'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5496'
REST Spec PR Author 'amchandn'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed Mar 28, 2019
1 parent f254475 commit 8bcae04
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public partial interface IRecoveryServicesOperations
/// API to check for resource name availability.
/// A name is available if no other resource exists that has the same
/// SubscriptionId, Resource Name and Type
/// or if one or more such resources exist, each of these must be GCed
/// or if one or more such resources exist, each of these must be GC'd
/// and their time of deletion be more than 24 Hours Ago
/// </summary>
/// <param name='resourceGroupName'>
Expand Down Expand Up @@ -55,6 +55,6 @@ public partial interface IRecoveryServicesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ResourceNameAvailabilityResultResource>> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, ResourceNameAvailabilityParameters input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<CheckNameAvailabilityResultResource>> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, ResourceNameAvailabilityParameters input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models
/// Response for check name availability API. Resource provider will set
/// availability as true | false.
/// </summary>
public partial class ResourceNameAvailabilityResult
public partial class CheckNameAvailabilityResult
{
/// <summary>
/// Initializes a new instance of the ResourceNameAvailabilityResult
/// Initializes a new instance of the CheckNameAvailabilityResult
/// class.
/// </summary>
public ResourceNameAvailabilityResult()
public CheckNameAvailabilityResult()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ResourceNameAvailabilityResult
/// Initializes a new instance of the CheckNameAvailabilityResult
/// class.
/// </summary>
public ResourceNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
public CheckNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
{
NameAvailable = nameAvailable;
Reason = reason;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models
/// Response for check name availability API. Resource provider will set
/// availability as true | false.
/// </summary>
public partial class ResourceNameAvailabilityResultResource : Resource
public partial class CheckNameAvailabilityResultResource : Resource
{
/// <summary>
/// Initializes a new instance of the
/// ResourceNameAvailabilityResultResource class.
/// CheckNameAvailabilityResultResource class.
/// </summary>
public ResourceNameAvailabilityResultResource()
public CheckNameAvailabilityResultResource()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the
/// ResourceNameAvailabilityResultResource class.
/// CheckNameAvailabilityResultResource class.
/// </summary>
/// <param name="id">Resource Id represents the complete path to the
/// resource.</param>
Expand All @@ -39,9 +39,9 @@ public ResourceNameAvailabilityResultResource()
/// <param name="type">Resource type represents the complete path of
/// the form Namespace/ResourceType/ResourceType/...</param>
/// <param name="eTag">Optional ETag.</param>
/// <param name="properties">ResourceNameAvailabilityResultResource
/// <param name="properties">CheckNameAvailabilityResultResource
/// properties</param>
public ResourceNameAvailabilityResultResource(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), ResourceNameAvailabilityResult properties = default(ResourceNameAvailabilityResult))
public CheckNameAvailabilityResultResource(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), CheckNameAvailabilityResult properties = default(CheckNameAvailabilityResult))
: base(id, name, type, eTag)
{
Properties = properties;
Expand All @@ -54,10 +54,10 @@ public ResourceNameAvailabilityResultResource()
partial void CustomInit();

/// <summary>
/// Gets or sets resourceNameAvailabilityResultResource properties
/// Gets or sets checkNameAvailabilityResultResource properties
/// </summary>
[JsonProperty(PropertyName = "properties")]
public ResourceNameAvailabilityResult Properties { get; set; }
public CheckNameAvailabilityResult Properties { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal RecoveryServicesOperations(RecoveryServicesClient client)
/// API to check for resource name availability.
/// A name is available if no other resource exists that has the same
/// SubscriptionId, Resource Name and Type
/// or if one or more such resources exist, each of these must be GCed and
/// or if one or more such resources exist, each of these must be GC'd and
/// their time of deletion be more than 24 Hours Ago
/// </summary>
/// <param name='resourceGroupName'>
Expand Down Expand Up @@ -88,7 +88,7 @@ internal RecoveryServicesOperations(RecoveryServicesClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<ResourceNameAvailabilityResultResource>> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, ResourceNameAvailabilityParameters input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<CheckNameAvailabilityResultResource>> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, ResourceNameAvailabilityParameters input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
Expand Down Expand Up @@ -233,7 +233,7 @@ internal RecoveryServicesOperations(RecoveryServicesClient client)
throw ex;
}
// Create Result
var _result = new AzureOperationResponse<ResourceNameAvailabilityResultResource>();
var _result = new AzureOperationResponse<CheckNameAvailabilityResultResource>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
Expand All @@ -246,7 +246,7 @@ internal RecoveryServicesOperations(RecoveryServicesClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<ResourceNameAvailabilityResultResource>(_responseContent, Client.DeserializationSettings);
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<CheckNameAvailabilityResultResource>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static partial class RecoveryServicesOperationsExtensions
/// API to check for resource name availability.
/// A name is available if no other resource exists that has the same
/// SubscriptionId, Resource Name and Type
/// or if one or more such resources exist, each of these must be GCed and
/// or if one or more such resources exist, each of these must be GC'd and
/// their time of deletion be more than 24 Hours Ago
/// </summary>
/// <param name='operations'>
Expand All @@ -41,7 +41,7 @@ public static partial class RecoveryServicesOperationsExtensions
/// <param name='input'>
/// Contains information about Resource type and Resource name
/// </param>
public static ResourceNameAvailabilityResultResource CheckNameAvailability(this IRecoveryServicesOperations operations, string resourceGroupName, string location, ResourceNameAvailabilityParameters input)
public static CheckNameAvailabilityResultResource CheckNameAvailability(this IRecoveryServicesOperations operations, string resourceGroupName, string location, ResourceNameAvailabilityParameters input)
{
return operations.CheckNameAvailabilityAsync(resourceGroupName, location, input).GetAwaiter().GetResult();
}
Expand All @@ -50,7 +50,7 @@ public static ResourceNameAvailabilityResultResource CheckNameAvailability(this
/// API to check for resource name availability.
/// A name is available if no other resource exists that has the same
/// SubscriptionId, Resource Name and Type
/// or if one or more such resources exist, each of these must be GCed and
/// or if one or more such resources exist, each of these must be GC'd and
/// their time of deletion be more than 24 Hours Ago
/// </summary>
/// <param name='operations'>
Expand All @@ -69,7 +69,7 @@ public static ResourceNameAvailabilityResultResource CheckNameAvailability(this
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ResourceNameAvailabilityResultResource> CheckNameAvailabilityAsync(this IRecoveryServicesOperations operations, string resourceGroupName, string location, ResourceNameAvailabilityParameters input, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<CheckNameAvailabilityResultResource> CheckNameAvailabilityAsync(this IRecoveryServicesOperations operations, string resourceGroupName, string location, ResourceNameAvailabilityParameters input, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, location, input, null, cancellationToken).ConfigureAwait(false))
{
Expand Down

0 comments on commit 8bcae04

Please sign in to comment.