Skip to content

Commit

Permalink
.NET SDK Resource Provider:'NetApp' (#5893)
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5683'
REST Spec PR Author 'leonardbf'
REST Spec PR Last commit
  • Loading branch information
adxsdknet authored and dsgouda committed Apr 24, 2019
1 parent fcf7b8e commit b306f65
Show file tree
Hide file tree
Showing 36 changed files with 1,537 additions and 381 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/NetApp/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>NetApp_2017-08-15;</AzureApiTag>
<AzureApiTag>NetApp_2019-05-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
82 changes: 64 additions & 18 deletions src/SDKs/NetApp/Management.NetApp/Generated/AccountsOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
public AzureNetAppFilesManagementClient Client { get; private set; }

/// <summary>
/// Lists all NetApp accounts in the resource group
/// Describe all NetApp Accounts in a resource group
/// </summary>
/// <remarks>
/// List and describe all NetApp accounts in the resource group
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
Expand All @@ -62,7 +65,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
Expand Down Expand Up @@ -187,13 +190,14 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<Error>(_responseContent, Client.DeserializationSettings);
CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
Expand All @@ -203,6 +207,10 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
Expand Down Expand Up @@ -248,8 +256,11 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}

/// <summary>
/// Get the NetApp account
/// Describe a NetApp Account
/// </summary>
/// <remarks>
/// Get the NetApp account
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
Expand All @@ -262,7 +273,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
Expand Down Expand Up @@ -393,13 +404,14 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<Error>(_responseContent, Client.DeserializationSettings);
CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
Expand All @@ -409,6 +421,10 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
Expand Down Expand Up @@ -456,6 +472,9 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <summary>
/// Create or update a NetApp account
/// </summary>
/// <remarks>
/// Create or update the specified NetApp account within the resource group
/// </remarks>
/// <param name='body'>
/// NetApp Account object supplied in the body of the operation.
/// </param>
Expand All @@ -481,6 +500,9 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <summary>
/// Delete a NetApp account
/// </summary>
/// <remarks>
/// Delete the specified NetApp account
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
Expand All @@ -501,8 +523,11 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}

/// <summary>
/// Patch a NetApp account
/// Update a NetApp account
/// </summary>
/// <remarks>
/// Patch the specified NetApp account
/// </remarks>
/// <param name='body'>
/// NetApp Account object supplied in the body of the operation.
/// </param>
Expand All @@ -518,7 +543,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
Expand Down Expand Up @@ -660,13 +685,14 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200)
{
var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<Error>(_responseContent, Client.DeserializationSettings);
CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
Expand All @@ -676,6 +702,10 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
Expand Down Expand Up @@ -723,6 +753,9 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <summary>
/// Create or update a NetApp account
/// </summary>
/// <remarks>
/// Create or update the specified NetApp account within the resource group
/// </remarks>
/// <param name='body'>
/// NetApp Account object supplied in the body of the operation.
/// </param>
Expand All @@ -738,7 +771,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
Expand Down Expand Up @@ -884,13 +917,14 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202)
{
var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<Error>(_responseContent, Client.DeserializationSettings);
CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
Expand All @@ -900,6 +934,10 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
Expand Down Expand Up @@ -965,6 +1003,9 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <summary>
/// Delete a NetApp account
/// </summary>
/// <remarks>
/// Delete the specified NetApp account
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
Expand All @@ -977,7 +1018,7 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorException">
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="ValidationException">
Expand Down Expand Up @@ -1105,13 +1146,14 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<Error>(_responseContent, Client.DeserializationSettings);
CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<CloudError>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
Expand All @@ -1121,6 +1163,10 @@ internal AccountsOperations(AzureNetAppFilesManagementClient client)
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
if (_shouldTrace)
{
ServiceClientTracing.Error(_invocationId, ex);
Expand Down
Loading

0 comments on commit b306f65

Please sign in to comment.