From fd98e706b5b9eaf6c2a95368c0896aa6725755f9 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 03:08:10 +0000 Subject: [PATCH 1/5] Generated from d640fe31b954f734f0f238549ce076d3b667ddf7 (#391) add test for peering --- .../SdkInfo_PeeringManagementClient.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs new file mode 100644 index 000000000000..ed84e77cd4fd --- /dev/null +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs @@ -0,0 +1,36 @@ + +// +// 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.Peering +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_PeeringManagementClient + { + get + { + return new Tuple[] + { + new Tuple("Peering", "CheckServiceProviderAvailability", "2019-09-01-preview"), + new Tuple("Peering", "LegacyPeerings", "2019-09-01-preview"), + new Tuple("Peering", "Operations", "2019-09-01-preview"), + new Tuple("Peering", "PeerAsns", "2019-09-01-preview"), + new Tuple("Peering", "PeeringLocations", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServiceLocations", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServiceProviders", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServices", "2019-09-01-preview"), + new Tuple("Peering", "Peerings", "2019-09-01-preview"), + new Tuple("Peering", "Prefixes", "2019-09-01-preview"), + }.AsEnumerable(); + } + } + } +} From edc8707f3bd5755bd776a5d28ed58472a897c31e Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Fri, 25 Oct 2019 08:48:49 +0800 Subject: [PATCH 2/5] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 99979bf5d095..b73c428c76dc 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,8 @@ "reflect-api-versions": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:csharp-sdks-folder": "./sdk", - "use": "@microsoft.azure/autorest.csharp" + "use": "@microsoft.azure/autorest.csharp", + "csharp.clear-output-folder": "" }, "advanced_options": { "create_sdk_pull_requests": true, From 904b3f333c35e3bd49bd8cb494e9c26712404a00 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 03:08:10 +0000 Subject: [PATCH 3/5] Generated from d640fe31b954f734f0f238549ce076d3b667ddf7 (#391) add test for peering --- .../SdkInfo_PeeringManagementClient.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs diff --git a/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs new file mode 100644 index 000000000000..ed84e77cd4fd --- /dev/null +++ b/sdk/peering/Microsoft.Azure.Management.Peering/src/Generated/SdkInfo_PeeringManagementClient.cs @@ -0,0 +1,36 @@ + +// +// 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.Peering +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_PeeringManagementClient + { + get + { + return new Tuple[] + { + new Tuple("Peering", "CheckServiceProviderAvailability", "2019-09-01-preview"), + new Tuple("Peering", "LegacyPeerings", "2019-09-01-preview"), + new Tuple("Peering", "Operations", "2019-09-01-preview"), + new Tuple("Peering", "PeerAsns", "2019-09-01-preview"), + new Tuple("Peering", "PeeringLocations", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServiceLocations", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServiceProviders", "2019-09-01-preview"), + new Tuple("Peering", "PeeringServices", "2019-09-01-preview"), + new Tuple("Peering", "Peerings", "2019-09-01-preview"), + new Tuple("Peering", "Prefixes", "2019-09-01-preview"), + }.AsEnumerable(); + } + } + } +} From 49bec49bc32268ba7f325b2632a9ed21addc173c Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Fri, 25 Oct 2019 08:48:49 +0800 Subject: [PATCH 4/5] Update swagger_to_sdk_config.json --- swagger_to_sdk_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 99979bf5d095..b73c428c76dc 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,8 @@ "reflect-api-versions": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:csharp-sdks-folder": "./sdk", - "use": "@microsoft.azure/autorest.csharp" + "use": "@microsoft.azure/autorest.csharp", + "csharp.clear-output-folder": "" }, "advanced_options": { "create_sdk_pull_requests": true, From c16a8353ca3993e7dd01b1ba4b9c87af5013687d Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 29 Oct 2019 13:14:47 +0000 Subject: [PATCH 5/5] Generated from 3f16eeaee87557bd3b7c46e213db27ab955be995 Prettier --- .../AzureNetAppFilesManagementClient.cs | 468 +--------------- .../IAzureNetAppFilesManagementClient.cs | 69 +-- .../Generated/INetAppResourceOperations.cs | 103 ++++ .../src/Generated/Models/ActiveDirectory.cs | 6 +- .../src/Generated/Models/CapacityPool.cs | 6 +- .../src/Generated/Models/CapacityPoolPatch.cs | 6 +- .../src/Generated/Models/MountTarget.cs | 14 +- .../src/Generated/Models/NetAppAccount.cs | 4 +- .../Generated/Models/NetAppAccountPatch.cs | 4 +- .../src/Generated/Models/ReplicationObject.cs | 110 ++++ .../src/Generated/Models/Snapshot.cs | 6 +- .../src/Generated/Models/SnapshotPatch.cs | 6 +- .../src/Generated/Models/Volume.cs | 27 +- .../src/Generated/Models/VolumePatch.cs | 6 +- .../Models/VolumePropertiesDataProtection.cs | 72 +++ .../src/Generated/NetAppResourceOperations.cs | 512 ++++++++++++++++++ ... => NetAppResourceOperationsExtensions.cs} | 12 +- .../SdkInfo_NetAppManagementClient.cs | 26 +- 18 files changed, 886 insertions(+), 571 deletions(-) create mode 100644 sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/INetAppResourceOperations.cs create mode 100644 sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ReplicationObject.cs create mode 100644 sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePropertiesDataProtection.cs create mode 100644 sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperations.cs rename sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/{AzureNetAppFilesManagementClientExtensions.cs => NetAppResourceOperationsExtensions.cs} (88%) diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs index 3fdd679fff08..f8459015189f 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClient.cs @@ -20,8 +20,6 @@ namespace Microsoft.Azure.Management.NetApp using System.Linq; using System.Net; using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Microsoft NetApp Azure Resource Provider specification @@ -83,6 +81,11 @@ public partial class AzureNetAppFilesManagementClient : ServiceClient public virtual IOperations Operations { get; private set; } + /// + /// Gets the INetAppResourceOperations. + /// + public virtual INetAppResourceOperations NetAppResource { get; private set; } + /// /// Gets the IAccountsOperations. /// @@ -350,13 +353,14 @@ public AzureNetAppFilesManagementClient(System.Uri baseUri, ServiceClientCredent private void Initialize() { Operations = new Operations(this); + NetAppResource = new NetAppResourceOperations(this); Accounts = new AccountsOperations(this); Pools = new PoolsOperations(this); Volumes = new VolumesOperations(this); MountTargets = new MountTargetsOperations(this); Snapshots = new SnapshotsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2019-07-01"; + ApiVersion = "2019-08-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -390,463 +394,5 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } - /// - /// Check resource name availability - /// - /// - /// Check if a resource name is available. - /// - /// - /// The location - /// - /// - /// Resource name to verify. - /// - /// - /// 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' - /// - /// - /// Resource group name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (ApiVersion == null) - { - 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; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("location", location); - tracingParameters.Add("body", body); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // 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) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - 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); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Check file path availability - /// - /// - /// Check if a file path is available. - /// - /// - /// The location - /// - /// - /// Resource name to verify. - /// - /// - /// 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' - /// - /// - /// Resource group name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (ApiVersion == null) - { - 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; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("location", location); - tracingParameters.Add("body", body); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckFilePathAvailability", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // 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) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - 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); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAzureNetAppFilesManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAzureNetAppFilesManagementClient.cs index 3d3ed7d3f76a..c7b49498f35a 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAzureNetAppFilesManagementClient.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/IAzureNetAppFilesManagementClient.cs @@ -14,10 +14,6 @@ namespace Microsoft.Azure.Management.NetApp using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// Microsoft NetApp Azure Resource Provider specification @@ -80,6 +76,11 @@ public partial interface IAzureNetAppFilesManagementClient : System.IDisposable /// IOperations Operations { get; } + /// + /// Gets the INetAppResourceOperations. + /// + INetAppResourceOperations NetAppResource { get; } + /// /// Gets the IAccountsOperations. /// @@ -105,65 +106,5 @@ public partial interface IAzureNetAppFilesManagementClient : System.IDisposable /// ISnapshotsOperations Snapshots { get; } - /// - /// Check resource name availability - /// - /// - /// Check if a resource name is available. - /// - /// - /// The location - /// - /// - /// Resource name to verify. - /// - /// - /// 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' - /// - /// - /// Resource group name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Check file path availability - /// - /// - /// Check if a file path is available. - /// - /// - /// The location - /// - /// - /// Resource name to verify. - /// - /// - /// 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' - /// - /// - /// Resource group name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/INetAppResourceOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/INetAppResourceOperations.cs new file mode 100644 index 000000000000..687180f023c8 --- /dev/null +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/INetAppResourceOperations.cs @@ -0,0 +1,103 @@ +// +// 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.NetApp +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NetAppResourceOperations operations. + /// + public partial interface INetAppResourceOperations + { + /// + /// Check resource name availability + /// + /// + /// Check if a resource name is available. + /// + /// + /// The location + /// + /// + /// Resource name to verify. + /// + /// + /// 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' + /// + /// + /// Resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Check file path availability + /// + /// + /// Check if a file path is available. + /// + /// + /// The location + /// + /// + /// Resource name to verify. + /// + /// + /// 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' + /// + /// + /// Resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs index 0b7d09244b57..cc7bd01792cd 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ActiveDirectory.cs @@ -36,7 +36,7 @@ public ActiveDirectory() /// domain administrator /// Name of the Active Directory domain /// Comma separated list of DNS server IP addresses - /// for the Active Directory domain + /// (IPv4 only) for the Active Directory domain /// Status of the Active Directory /// NetBIOS name of the SMB server. This /// name will be registered as a computer account in the AD and used to @@ -87,8 +87,8 @@ public ActiveDirectory() public string Domain { get; set; } /// - /// Gets or sets comma separated list of DNS server IP addresses for - /// the Active Directory domain + /// Gets or sets comma separated list of DNS server IP addresses (IPv4 + /// only) for the Active Directory domain /// [JsonProperty(PropertyName = "dns")] public string Dns { get; set; } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPool.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPool.cs index 7e61ddda6d05..8e7a3fb88696 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPool.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPool.cs @@ -14,6 +14,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -42,7 +44,7 @@ public CapacityPool() /// Resource tags /// poolId /// Azure lifecycle management - public CapacityPool(string location, long size, string serviceLevel, string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string poolId = default(string), string provisioningState = default(string)) + public CapacityPool(string location, long size, string serviceLevel, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string poolId = default(string), string provisioningState = default(string)) { Location = location; Id = id; @@ -89,7 +91,7 @@ public CapacityPool() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets poolId diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPoolPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPoolPatch.cs index 59094d0d7912..6543eeb8bace 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPoolPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/CapacityPoolPatch.cs @@ -14,6 +14,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -40,7 +42,7 @@ public CapacityPoolPatch() /// Resource tags /// size /// serviceLevel - public CapacityPoolPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), object tags = default(object), long? size = default(long?), string serviceLevel = default(string)) + public CapacityPoolPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), long? size = default(long?), string serviceLevel = default(string)) { Location = location; Id = id; @@ -85,7 +87,7 @@ public CapacityPoolPatch() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets or sets size diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/MountTarget.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/MountTarget.cs index 1fed83530795..a350c8f675d2 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/MountTarget.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/MountTarget.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -36,6 +38,7 @@ public MountTarget() /// fileSystemId /// Resource Id /// Resource name + /// Resource type /// Resource tags /// mountTargetId /// ipAddress @@ -46,11 +49,12 @@ public MountTarget() /// netmask /// smbServerFQDN /// Azure lifecycle management - public MountTarget(string location, string fileSystemId, string id = default(string), string name = default(string), object tags = default(object), string mountTargetId = default(string), string ipAddress = default(string), string subnet = default(string), string startIp = default(string), string endIp = default(string), string gateway = default(string), string netmask = default(string), string smbServerFqdn = default(string), string provisioningState = default(string)) + public MountTarget(string location, string fileSystemId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string mountTargetId = default(string), string ipAddress = default(string), string subnet = default(string), string startIp = default(string), string endIp = default(string), string gateway = default(string), string netmask = default(string), string smbServerFqdn = default(string), string provisioningState = default(string)) { Location = location; Id = id; Name = name; + Type = type; Tags = tags; MountTargetId = mountTargetId; FileSystemId = fileSystemId; @@ -88,11 +92,17 @@ public MountTarget() [JsonProperty(PropertyName = "name")] public string Name { get; private set; } + /// + /// Gets resource type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + /// /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets mountTargetId diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs index d49773876274..b93a98c78326 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccount.cs @@ -42,7 +42,7 @@ public NetAppAccount() /// Resource tags /// Azure lifecycle management /// Active Directories - public NetAppAccount(string location, string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string provisioningState = default(string), IList activeDirectories = default(IList)) + public NetAppAccount(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList)) { Location = location; Id = id; @@ -87,7 +87,7 @@ public NetAppAccount() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets azure lifecycle management diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs index 0f4778e09300..679bb2d01b7b 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/NetAppAccountPatch.cs @@ -42,7 +42,7 @@ public NetAppAccountPatch() /// Resource tags /// Azure lifecycle management /// Active Directories - public NetAppAccountPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string provisioningState = default(string), IList activeDirectories = default(IList)) + public NetAppAccountPatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), IList activeDirectories = default(IList)) { Location = location; Id = id; @@ -87,7 +87,7 @@ public NetAppAccountPatch() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets azure lifecycle management diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ReplicationObject.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ReplicationObject.cs new file mode 100644 index 000000000000..b8d28a4e0ae9 --- /dev/null +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/ReplicationObject.cs @@ -0,0 +1,110 @@ +// +// 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.NetApp.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Replication properties + /// + public partial class ReplicationObject + { + /// + /// Initializes a new instance of the ReplicationObject class. + /// + public ReplicationObject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReplicationObject class. + /// + /// endpointType + /// replicationSchedule + /// remoteVolumeResourceId + /// replicationId + public ReplicationObject(string endpointType, string replicationSchedule, string remoteVolumeResourceId, string replicationId = default(string)) + { + ReplicationId = replicationId; + EndpointType = endpointType; + ReplicationSchedule = replicationSchedule; + RemoteVolumeResourceId = remoteVolumeResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets replicationId + /// + /// + /// Id + /// + [JsonProperty(PropertyName = "replicationId")] + public string ReplicationId { get; set; } + + /// + /// Gets or sets endpointType + /// + /// + /// Indicates whether the local volume is the source or destination for + /// the Volume Replication + /// + [JsonProperty(PropertyName = "endpointType")] + public string EndpointType { get; set; } + + /// + /// Gets or sets replicationSchedule + /// + /// + /// Schedule + /// + [JsonProperty(PropertyName = "replicationSchedule")] + public string ReplicationSchedule { get; set; } + + /// + /// Gets or sets remoteVolumeResourceId + /// + /// + /// The resource ID of the remote volume. + /// + [JsonProperty(PropertyName = "remoteVolumeResourceId")] + public string RemoteVolumeResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (EndpointType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "EndpointType"); + } + if (ReplicationSchedule == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReplicationSchedule"); + } + if (RemoteVolumeResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RemoteVolumeResourceId"); + } + } + } +} diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Snapshot.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Snapshot.cs index f02a7d4889ca..60df56ed515b 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Snapshot.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Snapshot.cs @@ -14,6 +14,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -42,7 +44,7 @@ public Snapshot() /// fileSystemId /// name /// Azure lifecycle management - public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string snapshotId = default(string), string fileSystemId = default(string), System.DateTime? created = default(System.DateTime?), string provisioningState = default(string)) + public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string snapshotId = default(string), string fileSystemId = default(string), System.DateTime? created = default(System.DateTime?), string provisioningState = default(string)) { Location = location; Id = id; @@ -89,7 +91,7 @@ public Snapshot() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets snapshotId diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPatch.cs index a27245efda9a..9e442dfd4917 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/SnapshotPatch.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -32,7 +34,7 @@ public SnapshotPatch() /// Initializes a new instance of the SnapshotPatch class. /// /// Resource tags - public SnapshotPatch(object tags = default(object)) + public SnapshotPatch(IDictionary tags = default(IDictionary)) { Tags = tags; CustomInit(); @@ -47,7 +49,7 @@ public SnapshotPatch() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs index cf4cacd698d0..8ca7bc1d8f7b 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/Volume.cs @@ -52,7 +52,9 @@ public Volume() /// Snapshot ID /// Baremetal Tenant ID /// mountTargets - public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string fileSystemId = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), IList protocolTypes = default(IList), string provisioningState = default(string), string snapshotId = default(string), string baremetalTenantId = default(string), object mountTargets = default(object)) + /// What type of volume is this + /// DataProtection + public Volume(string location, string creationToken, long usageThreshold, string subnetId, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string fileSystemId = default(string), string serviceLevel = default(string), VolumePropertiesExportPolicy exportPolicy = default(VolumePropertiesExportPolicy), IList protocolTypes = default(IList), string provisioningState = default(string), string snapshotId = default(string), string baremetalTenantId = default(string), object mountTargets = default(object), string volumeType = default(string), VolumePropertiesDataProtection dataProtection = default(VolumePropertiesDataProtection)) { Location = location; Id = id; @@ -70,6 +72,8 @@ public Volume() BaremetalTenantId = baremetalTenantId; SubnetId = subnetId; MountTargets = mountTargets; + VolumeType = volumeType; + DataProtection = dataProtection; CustomInit(); } @@ -106,7 +110,7 @@ public Volume() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets fileSystem ID @@ -205,6 +209,21 @@ public Volume() [JsonProperty(PropertyName = "properties.mountTargets")] public object MountTargets { get; set; } + /// + /// Gets or sets what type of volume is this + /// + [JsonProperty(PropertyName = "properties.volumeType")] + public string VolumeType { get; set; } + + /// + /// Gets or sets dataProtection + /// + /// + /// DataProtection volume, can have a replication object + /// + [JsonProperty(PropertyName = "properties.dataProtection")] + public VolumePropertiesDataProtection DataProtection { get; set; } + /// /// Validate the object. /// @@ -278,6 +297,10 @@ public virtual void Validate() throw new ValidationException(ValidationRules.Pattern, "BaremetalTenantId", "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"); } } + if (DataProtection != null) + { + DataProtection.Validate(); + } } } } diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs index 66df657a6c09..8c8044b261b0 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePatch.cs @@ -14,6 +14,8 @@ namespace Microsoft.Azure.Management.NetApp.Models using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -41,7 +43,7 @@ public VolumePatch() /// serviceLevel /// usageThreshold /// exportPolicy - public VolumePatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), object tags = default(object), string serviceLevel = default(string), long? usageThreshold = default(long?), VolumePatchPropertiesExportPolicy exportPolicy = default(VolumePatchPropertiesExportPolicy)) + public VolumePatch(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string serviceLevel = default(string), long? usageThreshold = default(long?), VolumePatchPropertiesExportPolicy exportPolicy = default(VolumePatchPropertiesExportPolicy)) { Location = location; Id = id; @@ -87,7 +89,7 @@ public VolumePatch() /// Gets or sets resource tags /// [JsonProperty(PropertyName = "tags")] - public object Tags { get; set; } + public IDictionary Tags { get; set; } /// /// Gets or sets serviceLevel diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePropertiesDataProtection.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePropertiesDataProtection.cs new file mode 100644 index 000000000000..89ee1b46ef87 --- /dev/null +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/Models/VolumePropertiesDataProtection.cs @@ -0,0 +1,72 @@ +// +// 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.NetApp.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DataProtection + /// + /// + /// DataProtection volume, can have a replication object + /// + public partial class VolumePropertiesDataProtection + { + /// + /// Initializes a new instance of the VolumePropertiesDataProtection + /// class. + /// + public VolumePropertiesDataProtection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VolumePropertiesDataProtection + /// class. + /// + /// Replication + public VolumePropertiesDataProtection(ReplicationObject replication = default(ReplicationObject)) + { + Replication = replication; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets replication + /// + /// + /// Replication properties + /// + [JsonProperty(PropertyName = "replication")] + public ReplicationObject Replication { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Replication != null) + { + Replication.Validate(); + } + } + } +} diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperations.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperations.cs new file mode 100644 index 000000000000..75e7ecc7aa7b --- /dev/null +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperations.cs @@ -0,0 +1,512 @@ +// +// 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.NetApp +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// NetAppResourceOperations operations. + /// + internal partial class NetAppResourceOperations : IServiceOperations, INetAppResourceOperations + { + /// + /// Initializes a new instance of the NetAppResourceOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal NetAppResourceOperations(AzureNetAppFilesManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the AzureNetAppFilesManagementClient + /// + public AzureNetAppFilesManagementClient Client { get; private set; } + + /// + /// Check resource name availability + /// + /// + /// Check if a resource name is available. + /// + /// + /// The location + /// + /// + /// Resource name to verify. + /// + /// + /// 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' + /// + /// + /// Resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.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; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + 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); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Check file path availability + /// + /// + /// Check if a file path is available. + /// + /// + /// The location + /// + /// + /// Resource name to verify. + /// + /// + /// 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' + /// + /// + /// Resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CheckFilePathAvailabilityWithHttpMessagesAsync(string location, string name, string type, string resourceGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.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; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckFilePathAvailability", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + 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); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClientExtensions.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperationsExtensions.cs similarity index 88% rename from sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClientExtensions.cs rename to sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperationsExtensions.cs index b034aa9e4720..38100690b810 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/AzureNetAppFilesManagementClientExtensions.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/NetAppResourceOperationsExtensions.cs @@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.NetApp using System.Threading.Tasks; /// - /// Extension methods for AzureNetAppFilesManagementClient. + /// Extension methods for NetAppResourceOperations. /// - public static partial class AzureNetAppFilesManagementClientExtensions + public static partial class NetAppResourceOperationsExtensions { /// /// Check resource name availability @@ -46,7 +46,7 @@ public static partial class AzureNetAppFilesManagementClientExtensions /// /// Resource group name. /// - public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup) + public static ResourceNameAvailability CheckNameAvailability(this INetAppResourceOperations operations, string location, string name, string type, string resourceGroup) { return operations.CheckNameAvailabilityAsync(location, name, type, resourceGroup).GetAwaiter().GetResult(); } @@ -79,7 +79,7 @@ public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFi /// /// The cancellation token. /// - public static async Task CheckNameAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CheckNameAvailabilityAsync(this INetAppResourceOperations operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, name, type, resourceGroup, null, cancellationToken).ConfigureAwait(false)) { @@ -112,7 +112,7 @@ public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFi /// /// Resource group name. /// - public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup) + public static ResourceNameAvailability CheckFilePathAvailability(this INetAppResourceOperations operations, string location, string name, string type, string resourceGroup) { return operations.CheckFilePathAvailabilityAsync(location, name, type, resourceGroup).GetAwaiter().GetResult(); } @@ -145,7 +145,7 @@ public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetA /// /// The cancellation token. /// - public static async Task CheckFilePathAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CheckFilePathAvailabilityAsync(this INetAppResourceOperations operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckFilePathAvailabilityWithHttpMessagesAsync(location, name, type, resourceGroup, null, cancellationToken).ConfigureAwait(false)) { diff --git a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs index 0aaec8d7af6c..7bf44099b643 100644 --- a/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs +++ b/sdk/netapp/Microsoft.Azure.Management.NetApp/src/Generated/SdkInfo_NetAppManagementClient.cs @@ -19,27 +19,15 @@ public static IEnumerable> ApiInfo_NetAppManagemen { return new Tuple[] { - new Tuple("NetApp", "Accounts", "2019-07-01"), - new Tuple("NetApp", "CheckFilePathAvailability", "2019-07-01"), - new Tuple("NetApp", "CheckNameAvailability", "2019-07-01"), - new Tuple("NetApp", "MountTargets", "2019-07-01"), - new Tuple("NetApp", "Operations", "2019-07-01"), - new Tuple("NetApp", "Pools", "2019-07-01"), - new Tuple("NetApp", "Snapshots", "2019-07-01"), - new Tuple("NetApp", "Volumes", "2019-07-01"), + new Tuple("NetApp", "Accounts", "2019-08-01"), + new Tuple("NetApp", "MountTargets", "2019-08-01"), + new Tuple("NetApp", "NetAppResource", "2019-08-01"), + new Tuple("NetApp", "Operations", "2019-08-01"), + new Tuple("NetApp", "Pools", "2019-08-01"), + new Tuple("NetApp", "Snapshots", "2019-08-01"), + new Tuple("NetApp", "Volumes", "2019-08-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "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"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "d3f2c3d909f34d63d5d01b63ca928130c5c5627a"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -