Skip to content

Commit

Permalink
NFSAAS-2842 update to R4.5 RP standard (#6851)
Browse files Browse the repository at this point in the history
- swagger version 2019-06-01
  • Loading branch information
leonardbf authored and erich-wang committed Jul 10, 2019
1 parent a4d6356 commit 52f9222
Show file tree
Hide file tree
Showing 51 changed files with 12,002 additions and 5,451 deletions.
14 changes: 14 additions & 0 deletions eng/mgmt/mgmtmetadata/netapp_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: latest
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/netapp/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\azure-sdk-for-net\sdk
2019-07-09 10:29:25 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 597f7dd325c864dd4db48d9374451c16e0337158
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private void Initialize()
MountTargets = new MountTargetsOperations(this);
Snapshots = new SnapshotsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2019-05-01";
ApiVersion = "2019-06-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down Expand Up @@ -399,6 +399,19 @@ private void Initialize()
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -420,7 +433,7 @@ private void Initialize()
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<ResourceNameAvailability>> CheckNameAvailabilityWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<ResourceNameAvailability>> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (SubscriptionId == null)
{
Expand All @@ -434,6 +447,25 @@ private void Initialize()
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
}
if (name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "name");
}
if (type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "type");
}
if (resourceGroup == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroup");
}
ResourceNameAvailabilityRequest body = new ResourceNameAvailabilityRequest();
if (name != null || type != null || resourceGroup != null)
{
body.Name = name;
body.Type = type;
body.ResourceGroup = resourceGroup;
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand All @@ -442,6 +474,7 @@ private void Initialize()
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("location", location);
tracingParameters.Add("body", body);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters);
}
Expand Down Expand Up @@ -493,6 +526,12 @@ private void Initialize()

// Serialize Request
string _requestContent = null;
if(body != null)
{
_requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings);
_httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (Credentials != null)
{
Expand Down Expand Up @@ -589,6 +628,19 @@ private void Initialize()
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -610,7 +662,7 @@ private void Initialize()
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<ResourceNameAvailability>> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<ResourceNameAvailability>> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (SubscriptionId == null)
{
Expand All @@ -624,6 +676,25 @@ private void Initialize()
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
}
if (name == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "name");
}
if (type == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "type");
}
if (resourceGroup == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroup");
}
ResourceNameAvailabilityRequest body = new ResourceNameAvailabilityRequest();
if (name != null || type != null || resourceGroup != null)
{
body.Name = name;
body.Type = type;
body.ResourceGroup = resourceGroup;
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand All @@ -632,6 +703,7 @@ private void Initialize()
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("location", location);
tracingParameters.Add("body", body);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "CheckFilePathAvailability", tracingParameters);
}
Expand Down Expand Up @@ -683,6 +755,12 @@ private void Initialize()

// Serialize Request
string _requestContent = null;
if(body != null)
{
_requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings);
_httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
_httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (Credentials != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,22 @@ public static partial class AzureNetAppFilesManagementClientExtensions
/// <param name='location'>
/// The location
/// </param>
public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFilesManagementClient operations, string location)
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup)
{
return operations.CheckNameAvailabilityAsync(location).GetAwaiter().GetResult();
return operations.CheckNameAvailabilityAsync(location, name, type, resourceGroup).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -50,12 +63,25 @@ public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFi
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ResourceNameAvailability> CheckNameAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ResourceNameAvailability> CheckNameAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, name, type, resourceGroup, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand All @@ -73,9 +99,22 @@ public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFi
/// <param name='location'>
/// The location
/// </param>
public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetAppFilesManagementClient operations, string location)
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup)
{
return operations.CheckFilePathAvailabilityAsync(location).GetAwaiter().GetResult();
return operations.CheckFilePathAvailabilityAsync(location, name, type, resourceGroup).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -90,12 +129,25 @@ public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetA
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ResourceNameAvailability> CheckFilePathAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ResourceNameAvailability> CheckFilePathAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CheckFilePathAvailabilityWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.CheckFilePathAvailabilityWithHttpMessagesAsync(location, name, type, resourceGroup, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,26 @@ public partial interface IAzureNetAppFilesManagementClient : System.IDisposable
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<ResourceNameAvailability>> CheckNameAvailabilityWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ResourceNameAvailability>> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Check file path availability
Expand All @@ -131,13 +144,26 @@ public partial interface IAzureNetAppFilesManagementClient : System.IDisposable
/// <param name='location'>
/// The location
/// </param>
/// <param name='name'>
/// Resource name to verify.
/// </param>
/// <param name='type'>
/// Resource type used for verification. Possible values include:
/// 'Microsoft.NetApp/netAppAccounts',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
/// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
/// </param>
/// <param name='resourceGroup'>
/// Resource group name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<ResourceNameAvailability>> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ResourceNameAvailability>> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

}
}
Loading

0 comments on commit 52f9222

Please sign in to comment.