diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperations.cs
index 5899247ee048a..6a7578ec9b6b6 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -130,9 +137,9 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -147,6 +154,8 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -194,7 +203,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -231,7 +240,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -344,9 +353,9 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -361,6 +370,8 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -408,7 +419,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -445,7 +456,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -623,9 +634,9 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -640,6 +651,8 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -657,7 +670,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -693,7 +706,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -730,7 +743,7 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -840,9 +853,9 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -857,6 +870,8 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -894,11 +909,19 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -934,4 +957,3 @@ internal AccessControlRecordsOperations(StorSimple8000SeriesManagementClient cli
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperationsExtensions.cs
index 08190b864bcf4..72691f3eb2719 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AccessControlRecordsOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -194,7 +201,7 @@ public static void Delete(this IAccessControlRecordsOperations operations, strin
///
public static async Task DeleteAsync(this IAccessControlRecordsOperations operations, string accessControlRecordName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(accessControlRecordName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(accessControlRecordName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -289,9 +296,8 @@ public static void BeginDelete(this IAccessControlRecordsOperations operations,
///
public static async Task BeginDeleteAsync(this IAccessControlRecordsOperations operations, string accessControlRecordName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(accessControlRecordName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(accessControlRecordName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperations.cs
index 08b221253179d..acbe12c459d17 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -143,9 +150,9 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -160,6 +167,8 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -207,7 +216,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -244,7 +253,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -357,9 +366,9 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -374,6 +383,8 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -391,7 +402,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -417,11 +428,19 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -560,9 +579,9 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -577,6 +596,8 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -594,7 +615,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -620,11 +641,19 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -711,9 +740,9 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -728,6 +757,8 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -775,7 +806,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -812,7 +843,7 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -831,4 +862,3 @@ internal AlertsOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperationsExtensions.cs
index 9bea4dcc6acfc..d780e9eb94abc 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/AlertsOperationsExtensions.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -101,7 +108,7 @@ public static void Clear(this IAlertsOperations operations, ClearAlertRequest pa
///
public static async Task ClearAsync(this IAlertsOperations operations, ClearAlertRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.ClearWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.ClearWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -150,7 +157,7 @@ public static void SendTestEmail(this IAlertsOperations operations, string devic
///
public static async Task SendTestEmailAsync(this IAlertsOperations operations, string deviceName, SendTestAlertEmailRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.SendTestEmailWithHttpMessagesAsync(deviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.SendTestEmailWithHttpMessagesAsync(deviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -189,4 +196,3 @@ public static IPage ListByManagerNext(this IAlertsOperations operations,
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperations.cs
index 0e393ae5aaf27..2a2dc454f9ffe 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -139,9 +146,9 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -156,6 +163,8 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -203,7 +212,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -240,7 +249,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -362,9 +371,9 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -379,6 +388,8 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -426,7 +437,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -463,7 +474,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -687,9 +698,9 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -704,6 +715,8 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -721,7 +734,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -757,7 +770,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -794,7 +807,7 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -913,9 +926,9 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -930,6 +943,8 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -967,11 +982,19 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1119,9 +1142,9 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -1136,6 +1159,8 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1173,11 +1198,19 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1213,4 +1246,3 @@ internal BackupPoliciesOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperationsExtensions.cs
index 4392e84f7c215..e3cb2405cfad1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupPoliciesOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -218,7 +225,7 @@ public static void Delete(this IBackupPoliciesOperations operations, string devi
///
public static async Task DeleteAsync(this IBackupPoliciesOperations operations, string deviceName, string backupPolicyName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(deviceName, backupPolicyName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(deviceName, backupPolicyName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -273,7 +280,7 @@ public static void BackupNow(this IBackupPoliciesOperations operations, string d
///
public static async Task BackupNowAsync(this IBackupPoliciesOperations operations, string deviceName, string backupPolicyName, string backupType, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BackupNowWithHttpMessagesAsync(deviceName, backupPolicyName, backupType, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BackupNowWithHttpMessagesAsync(deviceName, backupPolicyName, backupType, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -380,7 +387,7 @@ public static void BeginDelete(this IBackupPoliciesOperations operations, string
///
public static async Task BeginDeleteAsync(this IBackupPoliciesOperations operations, string deviceName, string backupPolicyName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupPolicyName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupPolicyName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -435,9 +442,8 @@ public static void BeginBackupNow(this IBackupPoliciesOperations operations, str
///
public static async Task BeginBackupNowAsync(this IBackupPoliciesOperations operations, string deviceName, string backupPolicyName, string backupType, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginBackupNowWithHttpMessagesAsync(deviceName, backupPolicyName, backupType, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginBackupNowWithHttpMessagesAsync(deviceName, backupPolicyName, backupType, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperations.cs
index ce306e1f0b4ff..dfb3be9653236 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -148,9 +155,9 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -165,6 +172,8 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -212,7 +221,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -249,7 +258,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -380,9 +389,9 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -397,6 +406,8 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -444,7 +455,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -481,7 +492,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -689,9 +700,9 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -706,6 +717,8 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -723,7 +736,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -759,7 +772,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -796,7 +809,7 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -924,9 +937,9 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -941,6 +954,8 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -978,11 +993,19 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1018,4 +1041,3 @@ internal BackupSchedulesOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperationsExtensions.cs
index e05fa401e4489..e4f624e22d613 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupSchedulesOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -242,7 +249,7 @@ public static void Delete(this IBackupSchedulesOperations operations, string dev
///
public static async Task DeleteAsync(this IBackupSchedulesOperations operations, string deviceName, string backupPolicyName, string backupScheduleName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(deviceName, backupPolicyName, backupScheduleName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(deviceName, backupPolicyName, backupScheduleName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -361,9 +368,8 @@ public static void BeginDelete(this IBackupSchedulesOperations operations, strin
///
public static async Task BeginDeleteAsync(this IBackupSchedulesOperations operations, string deviceName, string backupPolicyName, string backupScheduleName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupPolicyName, backupScheduleName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupPolicyName, backupScheduleName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperations.cs
index 12056aea95dcd..f01436e8f505e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -152,9 +159,9 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -169,6 +176,8 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -216,7 +225,7 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -253,7 +262,7 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -462,9 +471,9 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -479,6 +488,8 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -516,11 +527,19 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -677,9 +696,9 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -694,6 +713,8 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -711,7 +732,7 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -737,11 +758,19 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -877,9 +906,9 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -894,6 +923,8 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -931,11 +962,19 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1022,9 +1061,9 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1039,6 +1078,8 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1086,7 +1127,7 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1123,7 +1164,7 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1142,4 +1183,3 @@ internal BackupsOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperationsExtensions.cs
index f9f3b8b1f7776..6c9aa65db1952 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BackupsOperationsExtensions.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -113,7 +120,7 @@ public static void Delete(this IBackupsOperations operations, string deviceName,
///
public static async Task DeleteAsync(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -174,7 +181,7 @@ public static void Clone(this IBackupsOperations operations, string deviceName,
///
public static async Task CloneAsync(this IBackupsOperations operations, string deviceName, string backupName, string backupElementName, CloneRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.CloneWithHttpMessagesAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.CloneWithHttpMessagesAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -223,7 +230,7 @@ public static void Restore(this IBackupsOperations operations, string deviceName
///
public static async Task RestoreAsync(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.RestoreWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.RestoreWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -272,7 +279,7 @@ public static void BeginDelete(this IBackupsOperations operations, string device
///
public static async Task BeginDeleteAsync(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -333,7 +340,7 @@ public static void BeginClone(this IBackupsOperations operations, string deviceN
///
public static async Task BeginCloneAsync(this IBackupsOperations operations, string deviceName, string backupName, string backupElementName, CloneRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginCloneWithHttpMessagesAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginCloneWithHttpMessagesAsync(deviceName, backupName, backupElementName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -382,7 +389,7 @@ public static void BeginRestore(this IBackupsOperations operations, string devic
///
public static async Task BeginRestoreAsync(this IBackupsOperations operations, string deviceName, string backupName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginRestoreWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginRestoreWithHttpMessagesAsync(deviceName, backupName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -421,4 +428,3 @@ public static IPage ListByDeviceNext(this IBackupsOperations operations,
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperations.cs
index 399246b37c91b..d1c3b101242e6 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -130,9 +137,9 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -147,6 +154,8 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -194,7 +203,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -231,7 +240,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -344,9 +353,9 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -361,6 +370,8 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -408,7 +419,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -445,7 +456,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -623,9 +634,9 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -640,6 +651,8 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -657,7 +670,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -693,7 +706,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -730,7 +743,7 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -840,9 +853,9 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -857,6 +870,8 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -894,11 +909,19 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -934,4 +957,3 @@ internal BandwidthSettingsOperations(StorSimple8000SeriesManagementClient client
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperationsExtensions.cs
index ce78bb06d8e6f..6531b66150285 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/BandwidthSettingsOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -194,7 +201,7 @@ public static void Delete(this IBandwidthSettingsOperations operations, string b
///
public static async Task DeleteAsync(this IBandwidthSettingsOperations operations, string bandwidthSettingName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(bandwidthSettingName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(bandwidthSettingName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -289,9 +296,8 @@ public static void BeginDelete(this IBandwidthSettingsOperations operations, str
///
public static async Task BeginDeleteAsync(this IBandwidthSettingsOperations operations, string bandwidthSettingName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(bandwidthSettingName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(bandwidthSettingName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperations.cs
index 09b1b89fb8ce4..19fa8d982b9f1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -130,9 +137,9 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -147,6 +154,8 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -194,7 +203,7 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -231,7 +240,7 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -369,9 +378,9 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -386,6 +395,8 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -403,7 +414,7 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -429,11 +440,19 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 200 && (int)_statusCode != 202)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -469,4 +488,3 @@ internal CloudAppliancesOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperationsExtensions.cs
index 242acbfc0e7e7..33fc8b2b8964f 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/CloudAppliancesOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -96,7 +103,7 @@ public static void Provision(this ICloudAppliancesOperations operations, CloudAp
///
public static async Task ProvisionAsync(this ICloudAppliancesOperations operations, CloudAppliance parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.ProvisionWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.ProvisionWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -139,9 +146,8 @@ public static void BeginProvision(this ICloudAppliancesOperations operations, Cl
///
public static async Task BeginProvisionAsync(this ICloudAppliancesOperations operations, CloudAppliance parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginProvisionWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginProvisionWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperations.cs
index 559180f2b6c1b..2cf1cea7a83ac 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -139,9 +146,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -156,6 +163,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -203,7 +212,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -240,7 +249,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -381,9 +390,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -398,6 +407,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -445,7 +456,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -482,7 +493,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -623,9 +634,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -640,6 +651,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -687,7 +700,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -724,7 +737,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -890,9 +903,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -907,6 +920,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -954,7 +969,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -991,7 +1006,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1144,9 +1159,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1161,6 +1176,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1178,7 +1195,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -1214,7 +1231,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1251,7 +1268,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1372,9 +1389,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1389,6 +1406,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1406,7 +1425,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -1442,7 +1461,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1479,7 +1498,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1600,9 +1619,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1617,6 +1636,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1634,7 +1655,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -1670,7 +1691,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1707,7 +1728,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1817,9 +1838,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -1834,6 +1855,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1871,11 +1894,19 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2017,9 +2048,9 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2034,6 +2065,8 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2051,7 +2084,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -2087,7 +2120,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2124,7 +2157,7 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2143,4 +2176,3 @@ internal DeviceSettingsOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperationsExtensions.cs
index 51ab9660c0874..31b0e90693a28 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DeviceSettingsOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -348,7 +355,7 @@ public static void SyncRemotemanagementCertificate(this IDeviceSettingsOperation
///
public static async Task SyncRemotemanagementCertificateAsync(this IDeviceSettingsOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.SyncRemotemanagementCertificateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.SyncRemotemanagementCertificateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -645,7 +652,7 @@ public static void BeginSyncRemotemanagementCertificate(this IDeviceSettingsOper
///
public static async Task BeginSyncRemotemanagementCertificateAsync(this IDeviceSettingsOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginSyncRemotemanagementCertificateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginSyncRemotemanagementCertificateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -702,4 +709,3 @@ public static TimeSettings BeginCreateOrUpdateTimeSettings(this IDeviceSettingsO
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperations.cs
index af34a55765f50..9648fd3c51c8a 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -166,9 +173,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -183,6 +190,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -230,7 +239,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -267,7 +276,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -390,9 +399,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -407,6 +416,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -454,7 +465,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -491,7 +502,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -637,9 +648,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -654,6 +665,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -671,7 +684,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -707,7 +720,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -744,7 +757,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -854,9 +867,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -871,6 +884,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -908,11 +923,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1095,9 +1118,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -1112,6 +1135,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1159,7 +1184,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1196,7 +1221,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1325,9 +1350,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1342,6 +1367,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1389,7 +1416,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1426,7 +1453,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1539,9 +1566,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1556,6 +1583,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1603,7 +1632,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1640,7 +1669,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1778,9 +1807,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1795,6 +1824,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1842,7 +1873,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1879,7 +1910,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2033,9 +2064,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -2050,6 +2081,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2067,7 +2100,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -2103,7 +2136,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2140,7 +2173,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2253,9 +2286,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -2270,6 +2303,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2287,7 +2322,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -2313,11 +2348,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2444,9 +2487,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2461,6 +2504,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2498,11 +2543,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2629,9 +2682,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -2646,6 +2699,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2683,11 +2738,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2814,9 +2877,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -2831,6 +2894,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2868,11 +2933,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2999,9 +3072,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -3016,6 +3089,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3053,11 +3128,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -3194,9 +3277,9 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -3211,6 +3294,8 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3228,7 +3313,7 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -3254,11 +3339,19 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -3294,4 +3387,3 @@ internal DevicesOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperationsExtensions.cs
index 3ee28cce53caf..2a1cca9832aa5 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/DevicesOperationsExtensions.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -57,7 +64,7 @@ public static void Configure(this IDevicesOperations operations, ConfigureDevice
///
public static async Task ConfigureAsync(this IDevicesOperations operations, ConfigureDeviceRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.ConfigureWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.ConfigureWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -206,7 +213,7 @@ public static void Delete(this IDevicesOperations operations, string deviceName,
///
public static async Task DeleteAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -301,7 +308,7 @@ public static void AuthorizeForServiceEncryptionKeyRollover(this IDevicesOperati
///
public static async Task AuthorizeForServiceEncryptionKeyRolloverAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.AuthorizeForServiceEncryptionKeyRolloverWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.AuthorizeForServiceEncryptionKeyRolloverWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -344,7 +351,7 @@ public static void Deactivate(this IDevicesOperations operations, string deviceN
///
public static async Task DeactivateAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeactivateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeactivateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -387,7 +394,7 @@ public static void InstallUpdates(this IDevicesOperations operations, string dev
///
public static async Task InstallUpdatesAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.InstallUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.InstallUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -580,7 +587,7 @@ public static void ScanForUpdates(this IDevicesOperations operations, string dev
///
public static async Task ScanForUpdatesAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.ScanForUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.ScanForUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -679,7 +686,7 @@ public static void Failover(this IDevicesOperations operations, string sourceDev
///
public static async Task FailoverAsync(this IDevicesOperations operations, string sourceDeviceName, FailoverRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.FailoverWithHttpMessagesAsync(sourceDeviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.FailoverWithHttpMessagesAsync(sourceDeviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -780,7 +787,7 @@ public static void BeginConfigure(this IDevicesOperations operations, ConfigureD
///
public static async Task BeginConfigureAsync(this IDevicesOperations operations, ConfigureDeviceRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginConfigureWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginConfigureWithHttpMessagesAsync(parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -823,7 +830,7 @@ public static void BeginDelete(this IDevicesOperations operations, string device
///
public static async Task BeginDeleteAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeleteWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -866,7 +873,7 @@ public static void BeginDeactivate(this IDevicesOperations operations, string de
///
public static async Task BeginDeactivateAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginDeactivateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginDeactivateWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -909,7 +916,7 @@ public static void BeginInstallUpdates(this IDevicesOperations operations, strin
///
public static async Task BeginInstallUpdatesAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginInstallUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginInstallUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -952,7 +959,7 @@ public static void BeginScanForUpdates(this IDevicesOperations operations, strin
///
public static async Task BeginScanForUpdatesAsync(this IDevicesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginScanForUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginScanForUpdatesWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -1005,9 +1012,8 @@ public static void BeginFailover(this IDevicesOperations operations, string sour
///
public static async Task BeginFailoverAsync(this IDevicesOperations operations, string sourceDeviceName, FailoverRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginFailoverWithHttpMessagesAsync(sourceDeviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginFailoverWithHttpMessagesAsync(sourceDeviceName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperations.cs
index f8dab49d65439..bc9c2633f3ccf 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -139,9 +146,9 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -156,6 +163,8 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -203,7 +212,7 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -240,7 +249,7 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -402,9 +411,9 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -419,6 +428,8 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -436,7 +447,7 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -462,11 +473,19 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -502,4 +521,3 @@ internal HardwareComponentGroupsOperations(StorSimple8000SeriesManagementClient
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperationsExtensions.cs
index 903f40dbf73b8..1db284e174c45 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/HardwareComponentGroupsOperationsExtensions.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -114,7 +121,7 @@ public static void ChangeControllerPowerState(this IHardwareComponentGroupsOpera
///
public static async Task ChangeControllerPowerStateAsync(this IHardwareComponentGroupsOperations operations, string deviceName, string hardwareComponentGroupName, ControllerPowerStateChangeRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.ChangeControllerPowerStateWithHttpMessagesAsync(deviceName, hardwareComponentGroupName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.ChangeControllerPowerStateWithHttpMessagesAsync(deviceName, hardwareComponentGroupName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -169,9 +176,8 @@ public static void BeginChangeControllerPowerState(this IHardwareComponentGroups
///
public static async Task BeginChangeControllerPowerStateAsync(this IHardwareComponentGroupsOperations operations, string deviceName, string hardwareComponentGroupName, ControllerPowerStateChangeRequest parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginChangeControllerPowerStateWithHttpMessagesAsync(deviceName, hardwareComponentGroupName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginChangeControllerPowerStateWithHttpMessagesAsync(deviceName, hardwareComponentGroupName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAccessControlRecordsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAccessControlRecordsOperations.cs
index 4bda602922ca0..fe4a59e515e86 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAccessControlRecordsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAccessControlRecordsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -183,4 +190,3 @@ public partial interface IAccessControlRecordsOperations
Task BeginDeleteWithHttpMessagesAsync(string accessControlRecordName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAlertsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAlertsOperations.cs
index af8fc82a6de5d..49b929f040a15 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAlertsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IAlertsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -122,4 +129,3 @@ public partial interface IAlertsOperations
Task>> ListByManagerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupPoliciesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupPoliciesOperations.cs
index 06e7116b95cd0..115b984a87939 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupPoliciesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupPoliciesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -263,4 +270,3 @@ public partial interface IBackupPoliciesOperations
Task BeginBackupNowWithHttpMessagesAsync(string deviceName, string backupPolicyName, string backupType, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupSchedulesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupSchedulesOperations.cs
index f95e1c57d812c..7670badd311b3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupSchedulesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupSchedulesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -219,4 +226,3 @@ public partial interface IBackupSchedulesOperations
Task BeginDeleteWithHttpMessagesAsync(string deviceName, string backupPolicyName, string backupScheduleName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupsOperations.cs
index 8f620c582764a..06ef2c4941d1d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBackupsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -252,4 +259,3 @@ public partial interface IBackupsOperations
Task>> ListByDeviceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBandwidthSettingsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBandwidthSettingsOperations.cs
index 9af8503b7ad9e..b0bcd4c6a3ef6 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBandwidthSettingsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IBandwidthSettingsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -183,4 +190,3 @@ public partial interface IBandwidthSettingsOperations
Task BeginDeleteWithHttpMessagesAsync(string bandwidthSettingName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ICloudAppliancesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ICloudAppliancesOperations.cs
index c7c9aa980f69f..e70729b2ce9df 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ICloudAppliancesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ICloudAppliancesOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -94,4 +101,3 @@ public partial interface ICloudAppliancesOperations
Task BeginProvisionWithHttpMessagesAsync(CloudAppliance parameters, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDeviceSettingsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDeviceSettingsOperations.cs
index 9b7ce12d2c069..7c8764c50bc9c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDeviceSettingsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDeviceSettingsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -428,4 +435,3 @@ public partial interface IDeviceSettingsOperations
Task> BeginCreateOrUpdateTimeSettingsWithHttpMessagesAsync(string deviceName, TimeSettings parameters, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDevicesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDevicesOperations.cs
index 2ac928b980da6..9feb6447f3a8e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDevicesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IDevicesOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -601,4 +608,3 @@ public partial interface IDevicesOperations
Task BeginFailoverWithHttpMessagesAsync(string sourceDeviceName, FailoverRequest parameters, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IHardwareComponentGroupsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IHardwareComponentGroupsOperations.cs
index c25ff904a0c81..e3d0ad8569641 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IHardwareComponentGroupsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IHardwareComponentGroupsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -108,4 +115,3 @@ public partial interface IHardwareComponentGroupsOperations
Task BeginChangeControllerPowerStateWithHttpMessagesAsync(string deviceName, string hardwareComponentGroupName, ControllerPowerStateChangeRequest parameters, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IJobsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IJobsOperations.cs
index 1137983f1997e..8cf197730543d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IJobsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IJobsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -213,4 +220,3 @@ public partial interface IJobsOperations
Task>> ListByManagerNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IManagersOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IManagersOperations.cs
index b3afe37d50b1b..dc7e52838b7da 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IManagersOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IManagersOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -479,4 +486,3 @@ public partial interface IManagersOperations
Task> RegenerateActivationKeyWithHttpMessagesAsync(string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IOperations.cs
index 964b117c8ba1d..421c64c6aafdd 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +25,7 @@ public partial interface IOperations
{
///
/// Lists all of the available REST API operations of the
- /// Microsoft.Storsimple provider
+ /// Microsoft.StorSimple provider
///
///
/// The headers that will be added to request.
@@ -38,7 +45,7 @@ public partial interface IOperations
Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Lists all of the available REST API operations of the
- /// Microsoft.Storsimple provider
+ /// Microsoft.StorSimple provider
///
///
/// The NextLink from the previous successful call to List operation.
@@ -61,4 +68,3 @@ public partial interface IOperations
Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorSimple8000SeriesManagementClient.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorSimple8000SeriesManagementClient.cs
index 88be8df2a6b59..c6b15953b6e5b 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorSimple8000SeriesManagementClient.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorSimple8000SeriesManagementClient.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
@@ -20,12 +27,12 @@ public partial interface IStorSimple8000SeriesManagementClient : System.IDisposa
///
/// Gets or sets json serialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+ JsonSerializerSettings SerializationSettings { get; }
///
/// Gets or sets json deserialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+ JsonSerializerSettings DeserializationSettings { get; }
///
/// Credentials needed for the client to connect to Azure.
@@ -43,19 +50,20 @@ public partial interface IStorSimple8000SeriesManagementClient : System.IDisposa
string SubscriptionId { get; set; }
///
- /// Gets or sets the preferred language for the response.
+ /// The preferred language for the response.
///
string AcceptLanguage { get; set; }
///
- /// Gets or sets the retry timeout in seconds for Long Running
- /// Operations. Default value is 30.
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
///
int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is generated
- /// and included in each request. Default is true.
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
///
bool? GenerateClientRequestId { get; set; }
@@ -142,4 +150,3 @@ public partial interface IStorSimple8000SeriesManagementClient : System.IDisposa
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorageAccountCredentialsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorageAccountCredentialsOperations.cs
index 1c96369283dc4..d991da9d5c73a 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorageAccountCredentialsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IStorageAccountCredentialsOperations.cs
@@ -1,10 +1,17 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -184,4 +191,3 @@ public partial interface IStorageAccountCredentialsOperations
Task BeginDeleteWithHttpMessagesAsync(string storageAccountCredentialName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumeContainersOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumeContainersOperations.cs
index ea9cd6432a50a..c031ffc60f0b3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumeContainersOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumeContainersOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -267,4 +274,3 @@ public partial interface IVolumeContainersOperations
Task BeginDeleteWithHttpMessagesAsync(string deviceName, string volumeContainerName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumesOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumesOperations.cs
index 459637ba1569a..95ebbb1c93a6e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumesOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/IVolumesOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -319,4 +326,3 @@ public partial interface IVolumesOperations
Task BeginDeleteWithHttpMessagesAsync(string deviceName, string volumeContainerName, string volumeName, string resourceGroupName, string managerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperations.cs
index 34465ade1bfbc..b1cfa11d093ef 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -153,9 +160,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -170,6 +177,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -217,7 +226,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -254,7 +263,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -376,9 +385,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -393,6 +402,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -440,7 +451,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -477,7 +488,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -622,9 +633,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -639,6 +650,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -686,7 +699,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -723,7 +736,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -842,9 +855,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -859,6 +872,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -896,11 +911,19 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -988,9 +1011,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1005,6 +1028,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1052,7 +1077,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1089,7 +1114,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1160,9 +1185,9 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1177,6 +1202,8 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1224,7 +1251,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1261,7 +1288,7 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1280,4 +1307,3 @@ internal JobsOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperationsExtensions.cs
index f1d477874e4c0..c0d24aa54ed1c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/JobsOperationsExtensions.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Threading;
using System.Threading.Tasks;
@@ -167,7 +174,7 @@ public static void Cancel(this IJobsOperations operations, string deviceName, st
///
public static async Task CancelAsync(this IJobsOperations operations, string deviceName, string jobName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.CancelWithHttpMessagesAsync(deviceName, jobName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.CancelWithHttpMessagesAsync(deviceName, jobName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -264,7 +271,7 @@ public static void BeginCancel(this IJobsOperations operations, string deviceNam
///
public static async Task BeginCancelAsync(this IJobsOperations operations, string deviceName, string jobName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.BeginCancelWithHttpMessagesAsync(deviceName, jobName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.BeginCancelWithHttpMessagesAsync(deviceName, jobName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -341,4 +348,3 @@ public static IPage ListByManagerNext(this IJobsOperations operations, stri
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperations.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperations.cs
index e93c79a621e32..f1c1ff2acf892 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperations.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperations.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using Newtonsoft.Json;
using System.Collections;
@@ -102,9 +109,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -119,6 +126,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -166,7 +175,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -203,7 +212,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -287,9 +296,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -304,6 +313,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -351,7 +362,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -388,7 +399,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -492,9 +503,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -509,6 +520,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -556,7 +569,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -593,7 +606,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -680,10 +693,6 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
- if (parameters == null)
- {
- parameters = new Manager();
- }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -713,9 +722,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -730,6 +739,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -747,7 +758,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -783,7 +794,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -820,7 +831,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -838,7 +849,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -939,9 +950,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -956,6 +967,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -993,11 +1006,19 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -1126,9 +1147,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1143,6 +1164,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1160,7 +1183,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -1196,7 +1219,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1233,7 +1256,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1346,9 +1369,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -1363,6 +1386,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1410,7 +1435,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1447,7 +1472,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1551,9 +1576,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1568,6 +1593,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1615,7 +1642,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1652,7 +1679,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1756,9 +1783,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1773,6 +1800,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -1820,7 +1849,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -1857,7 +1886,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1973,9 +2002,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -1990,6 +2019,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2007,7 +2038,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -2043,7 +2074,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2080,7 +2111,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2181,9 +2212,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2198,6 +2229,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2235,11 +2268,19 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if ((int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
@@ -2376,9 +2417,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2401,6 +2442,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2418,7 +2461,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
if(parameters != null)
{
_requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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
@@ -2454,7 +2497,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2491,7 +2534,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2607,9 +2650,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -2624,6 +2667,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2671,7 +2716,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2708,7 +2753,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -2812,9 +2857,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -2829,6 +2874,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -2876,7 +2923,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -2913,7 +2960,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -3017,9 +3064,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -3034,6 +3081,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3081,7 +3130,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -3118,7 +3167,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -3238,9 +3287,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -3255,6 +3304,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3302,7 +3353,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -3339,7 +3390,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -3443,9 +3494,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -3460,6 +3511,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3507,7 +3560,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -3544,7 +3597,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -3648,9 +3701,9 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- var _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("POST");
+ 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)
@@ -3665,6 +3718,8 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -3712,7 +3767,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
@@ -3749,7 +3804,7 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -3768,4 +3823,3 @@ internal ManagersOperations(StorSimple8000SeriesManagementClient client)
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperationsExtensions.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperationsExtensions.cs
index 9a504ece8dacf..1e0a4db344a58 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperationsExtensions.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/ManagersOperationsExtensions.cs
@@ -1,11 +1,18 @@
+//
+// 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.StorSimple8000Series
{
- using Azure;
- using Management;
- using Rest;
- using Rest.Azure;
- using Rest.Azure.OData;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
@@ -199,7 +206,7 @@ public static void Delete(this IManagersOperations operations, string resourceGr
///
public static async Task DeleteAsync(this IManagersOperations operations, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -454,7 +461,7 @@ public static void DeleteExtendedInfo(this IManagersOperations operations, strin
///
public static async Task DeleteExtendedInfoAsync(this IManagersOperations operations, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteExtendedInfoWithHttpMessagesAsync(resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteExtendedInfoWithHttpMessagesAsync(resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -763,4 +770,3 @@ public static Key RegenerateActivationKey(this IManagersOperations operations, s
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AccessControlRecord.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AccessControlRecord.cs
index 8cd723b433ee6..3500b138f8175 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AccessControlRecord.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AccessControlRecord.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The access control record.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class AccessControlRecord : BaseModel
{
///
/// Initializes a new instance of the AccessControlRecord class.
///
- public AccessControlRecord() { }
+ public AccessControlRecord()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AccessControlRecord class.
@@ -38,8 +47,14 @@ public AccessControlRecord() { }
{
InitiatorName = initiatorName;
VolumeCount = volumeCount;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the iSCSI initiator name (IQN).
///
@@ -50,7 +65,7 @@ public AccessControlRecord() { }
/// Gets the number of volumes using the access control record.
///
[JsonProperty(PropertyName = "properties.volumeCount")]
- public int? VolumeCount { get; protected set; }
+ public int? VolumeCount { get; private set; }
///
/// Validate the object.
@@ -67,4 +82,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AcsConfiguration.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AcsConfiguration.cs
index 02481632e9e89..c8826277dfd9d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AcsConfiguration.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AcsConfiguration.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class AcsConfiguration
///
/// Initializes a new instance of the AcsConfiguration class.
///
- public AcsConfiguration() { }
+ public AcsConfiguration()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AcsConfiguration class.
@@ -29,8 +38,14 @@ public AcsConfiguration(string namespaceProperty, string realm, string serviceUr
NamespaceProperty = namespaceProperty;
Realm = realm;
ServiceUrl = serviceUrl;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the namespace.
///
@@ -72,4 +87,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Alert.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Alert.cs
index ce90548e9917c..0410d1124d230 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Alert.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Alert.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The alert.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class Alert : BaseModel
{
///
/// Initializes a new instance of the Alert class.
///
- public Alert() { }
+ public Alert()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Alert class.
@@ -75,8 +84,14 @@ public Alert() { }
Status = status;
ErrorDetails = errorDetails;
DetailedInformation = detailedInformation;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the title of the alert
///
@@ -189,4 +204,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertEmailNotificationStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertEmailNotificationStatus.cs
index 4c156ec1d1499..3013163d2099b 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertEmailNotificationStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertEmailNotificationStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AlertEmailNotificationStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AlertEmailNotificationStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum AlertEmailNotificationStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class AlertEmailNotificationStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this AlertEmailNotificationStatus? value)
+ {
+ return value == null ? null : ((AlertEmailNotificationStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AlertEmailNotificationStatus value)
+ {
+ switch( value )
+ {
+ case AlertEmailNotificationStatus.Enabled:
+ return "Enabled";
+ case AlertEmailNotificationStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static AlertEmailNotificationStatus? ParseAlertEmailNotificationStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return AlertEmailNotificationStatus.Enabled;
+ case "Disabled":
+ return AlertEmailNotificationStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertErrorDetails.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertErrorDetails.cs
index d62ac4b6cbf95..142a29db4b34c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertErrorDetails.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertErrorDetails.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,21 +21,30 @@ public partial class AlertErrorDetails
///
/// Initializes a new instance of the AlertErrorDetails class.
///
- public AlertErrorDetails() { }
+ public AlertErrorDetails()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AlertErrorDetails class.
///
/// The error code
/// The error message
- /// The number of occurences
+ /// The number of occurrences
public AlertErrorDetails(string errorCode = default(string), string errorMessage = default(string), int? occurences = default(int?))
{
ErrorCode = errorCode;
ErrorMessage = errorMessage;
Occurences = occurences;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the error code
///
@@ -43,11 +58,10 @@ public AlertErrorDetails() { }
public string ErrorMessage { get; set; }
///
- /// Gets or sets the number of occurences
+ /// Gets or sets the number of occurrences
///
[JsonProperty(PropertyName = "occurences")]
public int? Occurences { get; set; }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertFilter.cs
index 8b19768b7ff8d..7e8463a53e9f1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class AlertFilter
///
/// Initializes a new instance of the AlertFilter class.
///
- public AlertFilter() { }
+ public AlertFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AlertFilter class.
@@ -43,8 +52,14 @@ public AlertFilter() { }
SourceType = sourceType;
SourceName = sourceName;
AppearedOnTime = appearedOnTime;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the status of the alerts to be filtered.
/// Only 'Equality' operator is supported for this property. Possible
@@ -86,4 +101,3 @@ public AlertFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertScope.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertScope.cs
index 9919e11f73c84..b2d85f128a8e3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertScope.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertScope.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AlertScope.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AlertScope
{
[EnumMember(Value = "Resource")]
@@ -20,5 +26,35 @@ public enum AlertScope
[EnumMember(Value = "Device")]
Device
}
-}
+ internal static class AlertScopeEnumExtension
+ {
+ internal static string ToSerializedValue(this AlertScope? value)
+ {
+ return value == null ? null : ((AlertScope)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AlertScope value)
+ {
+ switch( value )
+ {
+ case AlertScope.Resource:
+ return "Resource";
+ case AlertScope.Device:
+ return "Device";
+ }
+ return null;
+ }
+ internal static AlertScope? ParseAlertScope(this string value)
+ {
+ switch( value )
+ {
+ case "Resource":
+ return AlertScope.Resource;
+ case "Device":
+ return AlertScope.Device;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSettings.cs
index 7e7327f30c153..6cf3898791fa3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSettings.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The alert settings.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class AlertSettings : BaseModel
{
///
/// Initializes a new instance of the AlertSettings class.
///
- public AlertSettings() { }
+ public AlertSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AlertSettings class.
@@ -49,8 +58,14 @@ public AlertSettings() { }
AlertNotificationCulture = alertNotificationCulture;
NotificationToServiceOwners = notificationToServiceOwners;
AdditionalRecipientEmailList = additionalRecipientEmailList;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets indicates whether email notification enabled or not.
/// Possible values include: 'Enabled', 'Disabled'
@@ -89,4 +104,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSeverity.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSeverity.cs
index 32ab86b9511aa..62972a4c84eb6 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSeverity.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSeverity.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AlertSeverity.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AlertSeverity
{
[EnumMember(Value = "Informational")]
@@ -22,5 +28,39 @@ public enum AlertSeverity
[EnumMember(Value = "Critical")]
Critical
}
-}
+ internal static class AlertSeverityEnumExtension
+ {
+ internal static string ToSerializedValue(this AlertSeverity? value)
+ {
+ return value == null ? null : ((AlertSeverity)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AlertSeverity value)
+ {
+ switch( value )
+ {
+ case AlertSeverity.Informational:
+ return "Informational";
+ case AlertSeverity.Warning:
+ return "Warning";
+ case AlertSeverity.Critical:
+ return "Critical";
+ }
+ return null;
+ }
+ internal static AlertSeverity? ParseAlertSeverity(this string value)
+ {
+ switch( value )
+ {
+ case "Informational":
+ return AlertSeverity.Informational;
+ case "Warning":
+ return AlertSeverity.Warning;
+ case "Critical":
+ return AlertSeverity.Critical;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSource.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSource.cs
index 03b1a05b35761..c69495b9f2026 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSource.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSource.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class AlertSource
///
/// Initializes a new instance of the AlertSource class.
///
- public AlertSource() { }
+ public AlertSource()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AlertSource class.
@@ -29,8 +38,14 @@ public AlertSource() { }
Name = name;
TimeZone = timeZone;
AlertSourceType = alertSourceType;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the name of the source
///
@@ -52,4 +67,3 @@ public AlertSource() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSourceType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSourceType.cs
index 10bdeaa70fead..73a8d83c98e90 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSourceType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertSourceType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AlertSourceType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AlertSourceType
{
[EnumMember(Value = "Resource")]
@@ -20,5 +26,35 @@ public enum AlertSourceType
[EnumMember(Value = "Device")]
Device
}
-}
+ internal static class AlertSourceTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this AlertSourceType? value)
+ {
+ return value == null ? null : ((AlertSourceType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AlertSourceType value)
+ {
+ switch( value )
+ {
+ case AlertSourceType.Resource:
+ return "Resource";
+ case AlertSourceType.Device:
+ return "Device";
+ }
+ return null;
+ }
+ internal static AlertSourceType? ParseAlertSourceType(this string value)
+ {
+ switch( value )
+ {
+ case "Resource":
+ return AlertSourceType.Resource;
+ case "Device":
+ return AlertSourceType.Device;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertStatus.cs
index 9fed0957d1261..a0520e5c90a24 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AlertStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AlertStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AlertStatus
{
[EnumMember(Value = "Active")]
@@ -20,5 +26,35 @@ public enum AlertStatus
[EnumMember(Value = "Cleared")]
Cleared
}
-}
+ internal static class AlertStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this AlertStatus? value)
+ {
+ return value == null ? null : ((AlertStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AlertStatus value)
+ {
+ switch( value )
+ {
+ case AlertStatus.Active:
+ return "Active";
+ case AlertStatus.Cleared:
+ return "Cleared";
+ }
+ return null;
+ }
+ internal static AlertStatus? ParseAlertStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Active":
+ return AlertStatus.Active;
+ case "Cleared":
+ return AlertStatus.Cleared;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AsymmetricEncryptedSecret.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AsymmetricEncryptedSecret.cs
index 1290bc04fdce6..a6b92b6f2660e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AsymmetricEncryptedSecret.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AsymmetricEncryptedSecret.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class AsymmetricEncryptedSecret
///
/// Initializes a new instance of the AsymmetricEncryptedSecret class.
///
- public AsymmetricEncryptedSecret() { }
+ public AsymmetricEncryptedSecret()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AsymmetricEncryptedSecret class.
@@ -33,8 +42,14 @@ public AsymmetricEncryptedSecret() { }
Value = value;
EncryptionCertThumbprint = encryptionCertThumbprint;
EncryptionAlgorithm = encryptionAlgorithm;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the value of the secret.
///
@@ -70,4 +85,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthenticationType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthenticationType.cs
index 1bf92ac74a39d..ae0d100cdab70 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthenticationType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthenticationType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AuthenticationType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AuthenticationType
{
[EnumMember(Value = "Invalid")]
@@ -24,5 +30,43 @@ public enum AuthenticationType
[EnumMember(Value = "NTLM")]
NTLM
}
-}
+ internal static class AuthenticationTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this AuthenticationType? value)
+ {
+ return value == null ? null : ((AuthenticationType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AuthenticationType value)
+ {
+ switch( value )
+ {
+ case AuthenticationType.Invalid:
+ return "Invalid";
+ case AuthenticationType.None:
+ return "None";
+ case AuthenticationType.Basic:
+ return "Basic";
+ case AuthenticationType.NTLM:
+ return "NTLM";
+ }
+ return null;
+ }
+ internal static AuthenticationType? ParseAuthenticationType(this string value)
+ {
+ switch( value )
+ {
+ case "Invalid":
+ return AuthenticationType.Invalid;
+ case "None":
+ return AuthenticationType.None;
+ case "Basic":
+ return AuthenticationType.Basic;
+ case "NTLM":
+ return AuthenticationType.NTLM;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationEligibility.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationEligibility.cs
index 182a533e6b5ad..5a0f662d06525 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationEligibility.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationEligibility.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AuthorizationEligibility.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AuthorizationEligibility
{
[EnumMember(Value = "InEligible")]
@@ -20,5 +26,35 @@ public enum AuthorizationEligibility
[EnumMember(Value = "Eligible")]
Eligible
}
-}
+ internal static class AuthorizationEligibilityEnumExtension
+ {
+ internal static string ToSerializedValue(this AuthorizationEligibility? value)
+ {
+ return value == null ? null : ((AuthorizationEligibility)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AuthorizationEligibility value)
+ {
+ switch( value )
+ {
+ case AuthorizationEligibility.InEligible:
+ return "InEligible";
+ case AuthorizationEligibility.Eligible:
+ return "Eligible";
+ }
+ return null;
+ }
+ internal static AuthorizationEligibility? ParseAuthorizationEligibility(this string value)
+ {
+ switch( value )
+ {
+ case "InEligible":
+ return AuthorizationEligibility.InEligible;
+ case "Eligible":
+ return AuthorizationEligibility.Eligible;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationStatus.cs
index 7591ed07787e4..8b183c93a40da 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AuthorizationStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for AuthorizationStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum AuthorizationStatus
{
[EnumMember(Value = "Disabled")]
@@ -20,5 +26,35 @@ public enum AuthorizationStatus
[EnumMember(Value = "Enabled")]
Enabled
}
-}
+ internal static class AuthorizationStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this AuthorizationStatus? value)
+ {
+ return value == null ? null : ((AuthorizationStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AuthorizationStatus value)
+ {
+ switch( value )
+ {
+ case AuthorizationStatus.Disabled:
+ return "Disabled";
+ case AuthorizationStatus.Enabled:
+ return "Enabled";
+ }
+ return null;
+ }
+ internal static AuthorizationStatus? ParseAuthorizationStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Disabled":
+ return AuthorizationStatus.Disabled;
+ case "Enabled":
+ return AuthorizationStatus.Enabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperation.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperation.cs
index 8d56ec0fc2eb0..dc94356594990 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperation.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperation.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class AvailableProviderOperation
///
/// Initializes a new instance of the AvailableProviderOperation class.
///
- public AvailableProviderOperation() { }
+ public AvailableProviderOperation()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AvailableProviderOperation class.
@@ -37,8 +46,14 @@ public AvailableProviderOperation() { }
Display = display;
Origin = origin;
Properties = properties;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the name of the operation being performed on a
/// particular object. Name format:
@@ -72,4 +87,3 @@ public AvailableProviderOperation() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperationDisplay.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperationDisplay.cs
index b2f4b04b31988..571f74e02c429 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperationDisplay.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/AvailableProviderOperationDisplay.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -19,7 +25,10 @@ public partial class AvailableProviderOperationDisplay
/// Initializes a new instance of the AvailableProviderOperationDisplay
/// class.
///
- public AvailableProviderOperationDisplay() { }
+ public AvailableProviderOperationDisplay()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the AvailableProviderOperationDisplay
@@ -48,8 +57,14 @@ public AvailableProviderOperationDisplay() { }
Resource = resource;
Operation = operation;
Description = description;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the localized friendly form of the resource provider
/// name - it is expected to also include the publisher/company
@@ -87,4 +102,3 @@ public AvailableProviderOperationDisplay() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Backup.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Backup.cs
index 492c718e6c05b..79fe2de1ec3f7 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Backup.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Backup.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The backup.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class Backup : BaseModel
{
///
/// Initializes a new instance of the Backup class.
///
- public Backup() { }
+ public Backup()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Backup class.
@@ -54,8 +63,14 @@ public Backup() { }
BackupPolicyId = backupPolicyId;
SsmHostName = ssmHostName;
Elements = elements;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the time when the backup was created.
///
@@ -125,4 +140,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupElement.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupElement.cs
index 7c75d91f775ea..914c95373ae78 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupElement.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupElement.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class BackupElement
///
/// Initializes a new instance of the BackupElement class.
///
- public BackupElement() { }
+ public BackupElement()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BackupElement class.
@@ -41,8 +50,14 @@ public BackupElement() { }
VolumeName = volumeName;
VolumeContainerId = volumeContainerId;
VolumeType = volumeType;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the path ID that uniquely identifies the backup
/// element.
@@ -118,4 +133,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupFilter.cs
index f5855c6880260..1d1a9ee36e57b 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class BackupFilter
///
/// Initializes a new instance of the BackupFilter class.
///
- public BackupFilter() { }
+ public BackupFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BackupFilter class.
@@ -35,8 +44,14 @@ public BackupFilter() { }
BackupPolicyId = backupPolicyId;
VolumeId = volumeId;
CreatedTime = createdTime;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the backupPolicyId of the backups to be
/// filtered. Only 'Equality' operator is supported for this property.
@@ -61,4 +76,3 @@ public BackupFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupJobCreationType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupJobCreationType.cs
index e002f2341b357..368bc31df74c0 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupJobCreationType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupJobCreationType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for BackupJobCreationType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum BackupJobCreationType
{
[EnumMember(Value = "Adhoc")]
@@ -22,5 +28,39 @@ public enum BackupJobCreationType
[EnumMember(Value = "BySSM")]
BySSM
}
-}
+ internal static class BackupJobCreationTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this BackupJobCreationType? value)
+ {
+ return value == null ? null : ((BackupJobCreationType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this BackupJobCreationType value)
+ {
+ switch( value )
+ {
+ case BackupJobCreationType.Adhoc:
+ return "Adhoc";
+ case BackupJobCreationType.BySchedule:
+ return "BySchedule";
+ case BackupJobCreationType.BySSM:
+ return "BySSM";
+ }
+ return null;
+ }
+ internal static BackupJobCreationType? ParseBackupJobCreationType(this string value)
+ {
+ switch( value )
+ {
+ case "Adhoc":
+ return BackupJobCreationType.Adhoc;
+ case "BySchedule":
+ return BackupJobCreationType.BySchedule;
+ case "BySSM":
+ return BackupJobCreationType.BySSM;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicy.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicy.cs
index 59113a5668c25..fe08c895b8cfb 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicy.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicy.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The backup policy.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class BackupPolicy : BaseModel
{
///
/// Initializes a new instance of the BackupPolicy class.
///
- public BackupPolicy() { }
+ public BackupPolicy()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BackupPolicy class.
@@ -40,7 +49,7 @@ public BackupPolicy() { }
/// backup policy.
/// The count of schedules the backup
/// policy contains.
- /// Indicates whether atleast one
+ /// Indicates whether at least one
/// of the schedules in the backup policy is active or not. Possible
/// values include: 'Disabled', 'Enabled'
/// The backup policy creation
@@ -60,8 +69,14 @@ public BackupPolicy() { }
ScheduledBackupStatus = scheduledBackupStatus;
BackupPolicyCreationType = backupPolicyCreationType;
SsmHostName = ssmHostName;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the path IDs of the volumes which are part of the
/// backup policy.
@@ -73,27 +88,27 @@ public BackupPolicy() { }
/// Gets the time of the next backup for the backup policy.
///
[JsonProperty(PropertyName = "properties.nextBackupTime")]
- public System.DateTime? NextBackupTime { get; protected set; }
+ public System.DateTime? NextBackupTime { get; private set; }
///
/// Gets the time of the last backup for the backup policy.
///
[JsonProperty(PropertyName = "properties.lastBackupTime")]
- public System.DateTime? LastBackupTime { get; protected set; }
+ public System.DateTime? LastBackupTime { get; private set; }
///
/// Gets the count of schedules the backup policy contains.
///
[JsonProperty(PropertyName = "properties.schedulesCount")]
- public long? SchedulesCount { get; protected set; }
+ public long? SchedulesCount { get; private set; }
///
- /// Gets indicates whether atleast one of the schedules in the backup
+ /// Gets indicates whether at least one of the schedules in the backup
/// policy is active or not. Possible values include: 'Disabled',
/// 'Enabled'
///
[JsonProperty(PropertyName = "properties.scheduledBackupStatus")]
- public ScheduledBackupStatus? ScheduledBackupStatus { get; protected set; }
+ public ScheduledBackupStatus? ScheduledBackupStatus { get; private set; }
///
/// Gets the backup policy creation type. Indicates whether this was
@@ -101,7 +116,7 @@ public BackupPolicy() { }
/// Possible values include: 'BySaaS', 'BySSM'
///
[JsonProperty(PropertyName = "properties.backupPolicyCreationType")]
- public BackupPolicyCreationType? BackupPolicyCreationType { get; protected set; }
+ public BackupPolicyCreationType? BackupPolicyCreationType { get; private set; }
///
/// Gets if the backup policy was created by StorSimple Snapshot
@@ -109,7 +124,7 @@ public BackupPolicy() { }
/// Snapshot Manager.
///
[JsonProperty(PropertyName = "properties.ssmHostName")]
- public string SsmHostName { get; protected set; }
+ public string SsmHostName { get; private set; }
///
/// Validate the object.
@@ -126,4 +141,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicyCreationType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicyCreationType.cs
index d10d82d31eb64..d0610e42326d0 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicyCreationType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupPolicyCreationType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for BackupPolicyCreationType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum BackupPolicyCreationType
{
[EnumMember(Value = "BySaaS")]
@@ -20,5 +26,35 @@ public enum BackupPolicyCreationType
[EnumMember(Value = "BySSM")]
BySSM
}
-}
+ internal static class BackupPolicyCreationTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this BackupPolicyCreationType? value)
+ {
+ return value == null ? null : ((BackupPolicyCreationType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this BackupPolicyCreationType value)
+ {
+ switch( value )
+ {
+ case BackupPolicyCreationType.BySaaS:
+ return "BySaaS";
+ case BackupPolicyCreationType.BySSM:
+ return "BySSM";
+ }
+ return null;
+ }
+ internal static BackupPolicyCreationType? ParseBackupPolicyCreationType(this string value)
+ {
+ switch( value )
+ {
+ case "BySaaS":
+ return BackupPolicyCreationType.BySaaS;
+ case "BySSM":
+ return BackupPolicyCreationType.BySSM;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupSchedule.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupSchedule.cs
index f2f0619942f4d..ae5d13a8bebb5 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupSchedule.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupSchedule.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The backup schedule.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class BackupSchedule : BaseModel
{
///
/// Initializes a new instance of the BackupSchedule class.
///
- public BackupSchedule() { }
+ public BackupSchedule()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BackupSchedule class.
@@ -50,8 +59,14 @@ public BackupSchedule() { }
StartTime = startTime;
ScheduleStatus = scheduleStatus;
LastSuccessfulRun = lastSuccessfulRun;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the schedule recurrence.
///
@@ -89,7 +104,7 @@ public BackupSchedule() { }
/// schedule.
///
[JsonProperty(PropertyName = "properties.lastSuccessfulRun")]
- public System.DateTime? LastSuccessfulRun { get; protected set; }
+ public System.DateTime? LastSuccessfulRun { get; private set; }
///
/// Validate the object.
@@ -110,4 +125,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupStatus.cs
index 50d6003bc7cc5..68f2b296c9d50 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for BackupStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum BackupStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum BackupStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class BackupStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this BackupStatus? value)
+ {
+ return value == null ? null : ((BackupStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this BackupStatus value)
+ {
+ switch( value )
+ {
+ case BackupStatus.Enabled:
+ return "Enabled";
+ case BackupStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static BackupStatus? ParseBackupStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return BackupStatus.Enabled;
+ case "Disabled":
+ return BackupStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupType.cs
index 3d0e07a21970d..c3bd4cf3a1f61 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BackupType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for BackupType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum BackupType
{
[EnumMember(Value = "LocalSnapshot")]
@@ -20,5 +26,35 @@ public enum BackupType
[EnumMember(Value = "CloudSnapshot")]
CloudSnapshot
}
-}
+ internal static class BackupTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this BackupType? value)
+ {
+ return value == null ? null : ((BackupType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this BackupType value)
+ {
+ switch( value )
+ {
+ case BackupType.LocalSnapshot:
+ return "LocalSnapshot";
+ case BackupType.CloudSnapshot:
+ return "CloudSnapshot";
+ }
+ return null;
+ }
+ internal static BackupType? ParseBackupType(this string value)
+ {
+ switch( value )
+ {
+ case "LocalSnapshot":
+ return BackupType.LocalSnapshot;
+ case "CloudSnapshot":
+ return BackupType.CloudSnapshot;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSchedule.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSchedule.cs
index 10087428eb2c4..113a9d3ce6ba1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSchedule.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSchedule.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,12 +24,15 @@ public partial class BandwidthSchedule
///
/// Initializes a new instance of the BandwidthSchedule class.
///
- public BandwidthSchedule() { }
+ public BandwidthSchedule()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BandwidthSchedule class.
///
- /// The start time of the schdule.
+ /// The start time of the schedule.
/// The stop time of the schedule.
/// The rate in Mbps.
/// The days of the week when this schedule is
@@ -34,10 +43,16 @@ public BandwidthSchedule(Time start, Time stop, int rateInMbps, IList
- /// Gets or sets the start time of the schdule.
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the start time of the schedule.
///
[JsonProperty(PropertyName = "start")]
public Time Start { get; set; }
@@ -91,4 +106,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSetting.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSetting.cs
index fa920836ddec9..89a007b2dbecb 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSetting.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BandwidthSetting.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The bandwidth setting.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class BandwidthSetting : BaseModel
{
///
/// Initializes a new instance of the BandwidthSetting class.
///
- public BandwidthSetting() { }
+ public BandwidthSetting()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BandwidthSetting class.
@@ -40,8 +49,14 @@ public BandwidthSetting() { }
{
Schedules = schedules;
VolumeCount = volumeCount;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the schedules.
///
@@ -52,7 +67,7 @@ public BandwidthSetting() { }
/// Gets the number of volumes that uses the bandwidth setting.
///
[JsonProperty(PropertyName = "properties.volumeCount")]
- public int? VolumeCount { get; protected set; }
+ public int? VolumeCount { get; private set; }
///
/// Validate the object.
@@ -79,4 +94,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BaseModel.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BaseModel.cs
index 769271c8140c4..015eb4f6b1b07 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BaseModel.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/BaseModel.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class BaseModel
///
/// Initializes a new instance of the BaseModel class.
///
- public BaseModel() { }
+ public BaseModel()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the BaseModel class.
@@ -33,25 +42,31 @@ public BaseModel() { }
Name = name;
Type = type;
Kind = kind;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets the path ID that uniquely identifies the object.
///
[JsonProperty(PropertyName = "id")]
- public string Id { get; protected set; }
+ public string Id { get; private set; }
///
/// Gets the name of the object.
///
[JsonProperty(PropertyName = "name")]
- public string Name { get; protected set; }
+ public string Name { get; private set; }
///
/// Gets the hierarchical type of the object.
///
[JsonProperty(PropertyName = "type")]
- public string Type { get; protected set; }
+ public string Type { get; private set; }
///
/// Gets or sets the Kind of the object. Currently only Series8000 is
@@ -62,4 +77,3 @@ public BaseModel() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ChapSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ChapSettings.cs
index d221d1318b1b0..34abe8295ef35 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ChapSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ChapSettings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class ChapSettings
///
/// Initializes a new instance of the ChapSettings class.
///
- public ChapSettings() { }
+ public ChapSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ChapSettings class.
@@ -30,8 +39,14 @@ public ChapSettings() { }
InitiatorSecret = initiatorSecret;
TargetUser = targetUser;
TargetSecret = targetSecret;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the CHAP initiator user.
///
@@ -75,4 +90,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ClearAlertRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ClearAlertRequest.cs
index 584c2e49d692f..18d379f1fea34 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ClearAlertRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ClearAlertRequest.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class ClearAlertRequest
///
/// Initializes a new instance of the ClearAlertRequest class.
///
- public ClearAlertRequest() { }
+ public ClearAlertRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ClearAlertRequest class.
@@ -30,8 +39,14 @@ public ClearAlertRequest() { }
{
ResolutionMessage = resolutionMessage;
Alerts = alerts;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the resolution message while clearing the alert
///
@@ -59,4 +74,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloneRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloneRequest.cs
index d79961f93cd58..8e6be3243492f 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloneRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloneRequest.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class CloneRequest
///
/// Initializes a new instance of the CloneRequest class.
///
- public CloneRequest() { }
+ public CloneRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the CloneRequest class.
@@ -38,8 +47,14 @@ public CloneRequest(string targetDeviceId, string targetVolumeName, IList
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the path ID of the device which will act as the clone
/// target.
@@ -98,4 +113,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudAppliance.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudAppliance.cs
index c81e238481530..73dcdb0204893 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudAppliance.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudAppliance.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class CloudAppliance
///
/// Initializes a new instance of the CloudAppliance class.
///
- public CloudAppliance() { }
+ public CloudAppliance()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the CloudAppliance class.
@@ -50,8 +59,14 @@ public CloudAppliance() { }
VmType = vmType;
VmImageName = vmImageName;
ModelNumber = modelNumber;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the name.
///
@@ -139,4 +154,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceConfiguration.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceConfiguration.cs
index 45fcedd646477..d43d4d58c6b2e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceConfiguration.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceConfiguration.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,14 +20,17 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The cloud appliance configuration
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class CloudApplianceConfiguration : BaseModel
{
///
/// Initializes a new instance of the CloudApplianceConfiguration
/// class.
///
- public CloudApplianceConfiguration() { }
+ public CloudApplianceConfiguration()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the CloudApplianceConfiguration
@@ -54,8 +63,14 @@ public CloudApplianceConfiguration() { }
SupportedRegions = supportedRegions;
SupportedVmTypes = supportedVmTypes;
SupportedVmImages = supportedVmImages;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the model number.
///
@@ -151,4 +166,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceSettings.cs
index 621130e81d883..c5459e409b7b9 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/CloudApplianceSettings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class CloudApplianceSettings
///
/// Initializes a new instance of the CloudApplianceSettings class.
///
- public CloudApplianceSettings() { }
+ public CloudApplianceSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the CloudApplianceSettings class.
@@ -28,8 +37,14 @@ public CloudApplianceSettings() { }
{
ServiceDataEncryptionKey = serviceDataEncryptionKey;
ChannelIntegrityKey = channelIntegrityKey;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the service data encryption key (encrypted with DAK).
///
@@ -61,4 +76,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ConfigureDeviceRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ConfigureDeviceRequest.cs
index 2bf0ebfc8d113..4874371302508 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ConfigureDeviceRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ConfigureDeviceRequest.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The mandatory device configuration request.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class ConfigureDeviceRequest : BaseModel
{
///
/// Initializes a new instance of the ConfigureDeviceRequest class.
///
- public ConfigureDeviceRequest() { }
+ public ConfigureDeviceRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ConfigureDeviceRequest class.
@@ -48,8 +57,14 @@ public ConfigureDeviceRequest() { }
TimeZone = timeZone;
DnsSettings = dnsSettings;
NetworkInterfaceData0Settings = networkInterfaceData0Settings;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the friendly name for the device.
///
@@ -103,4 +118,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerId.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerId.cs
index 733365dda28ec..aa1f049446dfb 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerId.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerId.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ControllerId.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ControllerId
{
[EnumMember(Value = "Unknown")]
@@ -24,5 +30,43 @@ public enum ControllerId
[EnumMember(Value = "Controller1")]
Controller1
}
-}
+ internal static class ControllerIdEnumExtension
+ {
+ internal static string ToSerializedValue(this ControllerId? value)
+ {
+ return value == null ? null : ((ControllerId)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ControllerId value)
+ {
+ switch( value )
+ {
+ case ControllerId.Unknown:
+ return "Unknown";
+ case ControllerId.None:
+ return "None";
+ case ControllerId.Controller0:
+ return "Controller0";
+ case ControllerId.Controller1:
+ return "Controller1";
+ }
+ return null;
+ }
+ internal static ControllerId? ParseControllerId(this string value)
+ {
+ switch( value )
+ {
+ case "Unknown":
+ return ControllerId.Unknown;
+ case "None":
+ return ControllerId.None;
+ case "Controller0":
+ return ControllerId.Controller0;
+ case "Controller1":
+ return ControllerId.Controller1;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateAction.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateAction.cs
index eff826d2c0bda..dd1a315fdebec 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateAction.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateAction.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ControllerPowerStateAction.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ControllerPowerStateAction
{
[EnumMember(Value = "Start")]
@@ -22,5 +28,39 @@ public enum ControllerPowerStateAction
[EnumMember(Value = "Shutdown")]
Shutdown
}
-}
+ internal static class ControllerPowerStateActionEnumExtension
+ {
+ internal static string ToSerializedValue(this ControllerPowerStateAction? value)
+ {
+ return value == null ? null : ((ControllerPowerStateAction)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ControllerPowerStateAction value)
+ {
+ switch( value )
+ {
+ case ControllerPowerStateAction.Start:
+ return "Start";
+ case ControllerPowerStateAction.Restart:
+ return "Restart";
+ case ControllerPowerStateAction.Shutdown:
+ return "Shutdown";
+ }
+ return null;
+ }
+ internal static ControllerPowerStateAction? ParseControllerPowerStateAction(this string value)
+ {
+ switch( value )
+ {
+ case "Start":
+ return ControllerPowerStateAction.Start;
+ case "Restart":
+ return ControllerPowerStateAction.Restart;
+ case "Shutdown":
+ return ControllerPowerStateAction.Shutdown;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateChangeRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateChangeRequest.cs
index 9f2d81814f193..1c15aa89ce11a 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateChangeRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerPowerStateChangeRequest.cs
@@ -1,25 +1,34 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The controller power state change request.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class ControllerPowerStateChangeRequest : BaseModel
{
///
/// Initializes a new instance of the ControllerPowerStateChangeRequest
/// class.
///
- public ControllerPowerStateChangeRequest() { }
+ public ControllerPowerStateChangeRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ControllerPowerStateChangeRequest
@@ -53,8 +62,14 @@ public ControllerPowerStateChangeRequest() { }
ActiveController = activeController;
Controller0State = controller0State;
Controller1State = controller1State;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the power state that the request is expecting for the
/// controller of the device. Possible values include: 'Start',
@@ -98,4 +113,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerStatus.cs
index 3182a2f66fcd3..8e89a261f73df 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ControllerStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ControllerStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ControllerStatus
{
[EnumMember(Value = "NotPresent")]
@@ -28,5 +34,51 @@ public enum ControllerStatus
[EnumMember(Value = "Failure")]
Failure
}
-}
+ internal static class ControllerStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this ControllerStatus? value)
+ {
+ return value == null ? null : ((ControllerStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ControllerStatus value)
+ {
+ switch( value )
+ {
+ case ControllerStatus.NotPresent:
+ return "NotPresent";
+ case ControllerStatus.PoweredOff:
+ return "PoweredOff";
+ case ControllerStatus.Ok:
+ return "Ok";
+ case ControllerStatus.Recovering:
+ return "Recovering";
+ case ControllerStatus.Warning:
+ return "Warning";
+ case ControllerStatus.Failure:
+ return "Failure";
+ }
+ return null;
+ }
+ internal static ControllerStatus? ParseControllerStatus(this string value)
+ {
+ switch( value )
+ {
+ case "NotPresent":
+ return ControllerStatus.NotPresent;
+ case "PoweredOff":
+ return ControllerStatus.PoweredOff;
+ case "Ok":
+ return ControllerStatus.Ok;
+ case "Recovering":
+ return ControllerStatus.Recovering;
+ case "Warning":
+ return ControllerStatus.Warning;
+ case "Failure":
+ return ControllerStatus.Failure;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DNSSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DNSSettings.cs
index 5df6aba46da7b..a4c0db00dfc01 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DNSSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DNSSettings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class DNSSettings
///
/// Initializes a new instance of the DNSSettings class.
///
- public DNSSettings() { }
+ public DNSSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DNSSettings class.
@@ -36,8 +45,14 @@ public DNSSettings() { }
PrimaryIpv6DnsServer = primaryIpv6DnsServer;
SecondaryDnsServers = secondaryDnsServers;
SecondaryIpv6DnsServers = secondaryIpv6DnsServers;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the primary IPv4 DNS server for the device
///
@@ -64,4 +79,3 @@ public DNSSettings() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DataStatistics.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DataStatistics.cs
index d9816b68a4c63..c89633e6d7bb1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DataStatistics.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DataStatistics.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class DataStatistics
///
/// Initializes a new instance of the DataStatistics class.
///
- public DataStatistics() { }
+ public DataStatistics()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DataStatistics class.
@@ -35,8 +44,14 @@ public DataStatistics() { }
ProcessedData = processedData;
CloudData = cloudData;
Throughput = throughput;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the total bytes of data to be processed, as part of
/// the job.
@@ -67,4 +82,3 @@ public DataStatistics() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DayOfWeek.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DayOfWeek.cs
index 5c35b583663ea..227dca6e37fcc 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DayOfWeek.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DayOfWeek.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for DayOfWeek.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum DayOfWeek
{
[EnumMember(Value = "Sunday")]
@@ -30,5 +36,55 @@ public enum DayOfWeek
[EnumMember(Value = "Saturday")]
Saturday
}
-}
+ internal static class DayOfWeekEnumExtension
+ {
+ internal static string ToSerializedValue(this DayOfWeek? value)
+ {
+ return value == null ? null : ((DayOfWeek)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this DayOfWeek value)
+ {
+ switch( value )
+ {
+ case DayOfWeek.Sunday:
+ return "Sunday";
+ case DayOfWeek.Monday:
+ return "Monday";
+ case DayOfWeek.Tuesday:
+ return "Tuesday";
+ case DayOfWeek.Wednesday:
+ return "Wednesday";
+ case DayOfWeek.Thursday:
+ return "Thursday";
+ case DayOfWeek.Friday:
+ return "Friday";
+ case DayOfWeek.Saturday:
+ return "Saturday";
+ }
+ return null;
+ }
+ internal static DayOfWeek? ParseDayOfWeek(this string value)
+ {
+ switch( value )
+ {
+ case "Sunday":
+ return DayOfWeek.Sunday;
+ case "Monday":
+ return DayOfWeek.Monday;
+ case "Tuesday":
+ return DayOfWeek.Tuesday;
+ case "Wednesday":
+ return DayOfWeek.Wednesday;
+ case "Thursday":
+ return DayOfWeek.Thursday;
+ case "Friday":
+ return DayOfWeek.Friday;
+ case "Saturday":
+ return DayOfWeek.Saturday;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Device.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Device.cs
index 464fef1259e75..d1eba82054ae3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Device.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Device.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The StorSimple device.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class Device : BaseModel
{
///
/// Initializes a new instance of the Device class.
///
- public Device() { }
+ public Device()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Device class.
@@ -116,8 +125,14 @@ public Device() { }
VirtualMachineApiType = virtualMachineApiType;
Details = details;
RolloverDetails = rolloverDetails;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the friendly name of the device.
///
@@ -285,7 +300,7 @@ public Device() { }
/// 'Classic', 'Arm'
///
[JsonProperty(PropertyName = "properties.virtualMachineApiType")]
- public VirtualMachineApiType? VirtualMachineApiType { get; protected set; }
+ public VirtualMachineApiType? VirtualMachineApiType { get; private set; }
///
/// Gets or sets the additional device details regarding the end point
@@ -344,4 +359,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceConfigurationStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceConfigurationStatus.cs
index 498525a1a69f4..3d561618f18db 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceConfigurationStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceConfigurationStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for DeviceConfigurationStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum DeviceConfigurationStatus
{
[EnumMember(Value = "Complete")]
@@ -20,5 +26,35 @@ public enum DeviceConfigurationStatus
[EnumMember(Value = "Pending")]
Pending
}
-}
+ internal static class DeviceConfigurationStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this DeviceConfigurationStatus? value)
+ {
+ return value == null ? null : ((DeviceConfigurationStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this DeviceConfigurationStatus value)
+ {
+ switch( value )
+ {
+ case DeviceConfigurationStatus.Complete:
+ return "Complete";
+ case DeviceConfigurationStatus.Pending:
+ return "Pending";
+ }
+ return null;
+ }
+ internal static DeviceConfigurationStatus? ParseDeviceConfigurationStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Complete":
+ return DeviceConfigurationStatus.Complete;
+ case "Pending":
+ return DeviceConfigurationStatus.Pending;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceDetails.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceDetails.cs
index c8d9cd3fc72e2..6173cf96bc1df 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceDetails.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceDetails.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class DeviceDetails
///
/// Initializes a new instance of the DeviceDetails class.
///
- public DeviceDetails() { }
+ public DeviceDetails()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DeviceDetails class.
@@ -29,8 +38,14 @@ public DeviceDetails() { }
{
EndpointCount = endpointCount;
VolumeContainerCount = volumeContainerCount;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the total number of endpoints that are currently on
/// the device ( i.e. number of volumes).
@@ -46,4 +61,3 @@ public DeviceDetails() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DevicePatch.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DevicePatch.cs
index 52e007f8b8c95..f09f31c0c3d3d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DevicePatch.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DevicePatch.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The device patch.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class DevicePatch
{
///
/// Initializes a new instance of the DevicePatch class.
///
- public DevicePatch() { }
+ public DevicePatch()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DevicePatch class.
@@ -28,8 +37,14 @@ public DevicePatch() { }
public DevicePatch(string deviceDescription = default(string))
{
DeviceDescription = deviceDescription;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets short description given for the device
///
@@ -38,4 +53,3 @@ public DevicePatch() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceRolloverDetails.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceRolloverDetails.cs
index c6eec2c40437e..1e394d9b0efe3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceRolloverDetails.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceRolloverDetails.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class DeviceRolloverDetails
///
/// Initializes a new instance of the DeviceRolloverDetails class.
///
- public DeviceRolloverDetails() { }
+ public DeviceRolloverDetails()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DeviceRolloverDetails class.
@@ -36,8 +45,14 @@ public DeviceRolloverDetails() { }
AuthorizationEligibility = authorizationEligibility;
AuthorizationStatus = authorizationStatus;
InEligibilityReason = inEligibilityReason;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the eligibility status of device for service data
/// encryption key rollover. Possible values include: 'InEligible',
@@ -65,4 +80,3 @@ public DeviceRolloverDetails() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceStatus.cs
index 147430738762f..dfbce607e5610 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for DeviceStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum DeviceStatus
{
[EnumMember(Value = "Unknown")]
@@ -38,5 +44,71 @@ public enum DeviceStatus
[EnumMember(Value = "ReadyToSetup")]
ReadyToSetup
}
-}
+ internal static class DeviceStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this DeviceStatus? value)
+ {
+ return value == null ? null : ((DeviceStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this DeviceStatus value)
+ {
+ switch( value )
+ {
+ case DeviceStatus.Unknown:
+ return "Unknown";
+ case DeviceStatus.Online:
+ return "Online";
+ case DeviceStatus.Offline:
+ return "Offline";
+ case DeviceStatus.Deactivated:
+ return "Deactivated";
+ case DeviceStatus.RequiresAttention:
+ return "RequiresAttention";
+ case DeviceStatus.MaintenanceMode:
+ return "MaintenanceMode";
+ case DeviceStatus.Creating:
+ return "Creating";
+ case DeviceStatus.Provisioning:
+ return "Provisioning";
+ case DeviceStatus.Deactivating:
+ return "Deactivating";
+ case DeviceStatus.Deleted:
+ return "Deleted";
+ case DeviceStatus.ReadyToSetup:
+ return "ReadyToSetup";
+ }
+ return null;
+ }
+ internal static DeviceStatus? ParseDeviceStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Unknown":
+ return DeviceStatus.Unknown;
+ case "Online":
+ return DeviceStatus.Online;
+ case "Offline":
+ return DeviceStatus.Offline;
+ case "Deactivated":
+ return DeviceStatus.Deactivated;
+ case "RequiresAttention":
+ return DeviceStatus.RequiresAttention;
+ case "MaintenanceMode":
+ return DeviceStatus.MaintenanceMode;
+ case "Creating":
+ return DeviceStatus.Creating;
+ case "Provisioning":
+ return DeviceStatus.Provisioning;
+ case "Deactivating":
+ return DeviceStatus.Deactivating;
+ case "Deleted":
+ return DeviceStatus.Deleted;
+ case "ReadyToSetup":
+ return DeviceStatus.ReadyToSetup;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceType.cs
index 647562598ef22..0a274e87fe0b7 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DeviceType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for DeviceType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum DeviceType
{
[EnumMember(Value = "Invalid")]
@@ -22,5 +28,39 @@ public enum DeviceType
[EnumMember(Value = "Series8000PhysicalAppliance")]
Series8000PhysicalAppliance
}
-}
+ internal static class DeviceTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this DeviceType? value)
+ {
+ return value == null ? null : ((DeviceType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this DeviceType value)
+ {
+ switch( value )
+ {
+ case DeviceType.Invalid:
+ return "Invalid";
+ case DeviceType.Series8000VirtualAppliance:
+ return "Series8000VirtualAppliance";
+ case DeviceType.Series8000PhysicalAppliance:
+ return "Series8000PhysicalAppliance";
+ }
+ return null;
+ }
+ internal static DeviceType? ParseDeviceType(this string value)
+ {
+ switch( value )
+ {
+ case "Invalid":
+ return DeviceType.Invalid;
+ case "Series8000VirtualAppliance":
+ return DeviceType.Series8000VirtualAppliance;
+ case "Series8000PhysicalAppliance":
+ return DeviceType.Series8000PhysicalAppliance;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DimensionFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DimensionFilter.cs
index f0ad076ee0ea2..ef7198de891cd 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DimensionFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/DimensionFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class DimensionFilter
///
/// Initializes a new instance of the DimensionFilter class.
///
- public DimensionFilter() { }
+ public DimensionFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the DimensionFilter class.
@@ -32,8 +41,14 @@ public DimensionFilter() { }
{
Name = name;
Values = values;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the dimension name. E.g., NetworkInterface.
/// Valid values are the ones specified in the field "dimensions" in
@@ -54,4 +69,3 @@ public DimensionFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionAlgorithm.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionAlgorithm.cs
index 6db73e62856e9..569a209e88efd 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionAlgorithm.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionAlgorithm.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for EncryptionAlgorithm.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum EncryptionAlgorithm
{
[EnumMember(Value = "None")]
@@ -22,5 +28,39 @@ public enum EncryptionAlgorithm
[EnumMember(Value = "RSAES_PKCS1_v_1_5")]
RSAESPKCS1V15
}
-}
+ internal static class EncryptionAlgorithmEnumExtension
+ {
+ internal static string ToSerializedValue(this EncryptionAlgorithm? value)
+ {
+ return value == null ? null : ((EncryptionAlgorithm)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this EncryptionAlgorithm value)
+ {
+ switch( value )
+ {
+ case EncryptionAlgorithm.None:
+ return "None";
+ case EncryptionAlgorithm.AES256:
+ return "AES256";
+ case EncryptionAlgorithm.RSAESPKCS1V15:
+ return "RSAES_PKCS1_v_1_5";
+ }
+ return null;
+ }
+ internal static EncryptionAlgorithm? ParseEncryptionAlgorithm(this string value)
+ {
+ switch( value )
+ {
+ case "None":
+ return EncryptionAlgorithm.None;
+ case "AES256":
+ return EncryptionAlgorithm.AES256;
+ case "RSAES_PKCS1_v_1_5":
+ return EncryptionAlgorithm.RSAESPKCS1V15;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionSettings.cs
index e8697cf98a38e..5c888ffb92282 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionSettings.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The encryption settings.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class EncryptionSettings : BaseModel
{
///
/// Initializes a new instance of the EncryptionSettings class.
///
- public EncryptionSettings() { }
+ public EncryptionSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the EncryptionSettings class.
@@ -42,8 +51,14 @@ public EncryptionSettings() { }
{
EncryptionStatus = encryptionStatus;
KeyRolloverStatus = keyRolloverStatus;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the encryption status to indicates if encryption is
/// enabled or not. Possible values include: 'Enabled', 'Disabled'
@@ -71,4 +86,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionStatus.cs
index 5b175e0eac188..594034f8dd9a4 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/EncryptionStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for EncryptionStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum EncryptionStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum EncryptionStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class EncryptionStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this EncryptionStatus? value)
+ {
+ return value == null ? null : ((EncryptionStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this EncryptionStatus value)
+ {
+ switch( value )
+ {
+ case EncryptionStatus.Enabled:
+ return "Enabled";
+ case EncryptionStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static EncryptionStatus? ParseEncryptionStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return EncryptionStatus.Enabled;
+ case "Disabled":
+ return EncryptionStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverRequest.cs
index c116d63104ae4..3d2320ddcaafe 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverRequest.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class FailoverRequest
///
/// Initializes a new instance of the FailoverRequest class.
///
- public FailoverRequest() { }
+ public FailoverRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the FailoverRequest class.
@@ -32,8 +41,14 @@ public FailoverRequest() { }
{
TargetDeviceId = targetDeviceId;
VolumeContainers = volumeContainers;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the ARM path ID of the device which will act as the
/// failover target.
@@ -50,4 +65,3 @@ public FailoverRequest() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSet.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSet.cs
index 3928fec58e926..c68af40128519 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSet.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSet.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class FailoverSet
///
/// Initializes a new instance of the FailoverSet class.
///
- public FailoverSet() { }
+ public FailoverSet()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the FailoverSet class.
@@ -30,8 +39,14 @@ public FailoverSet() { }
{
VolumeContainers = volumeContainers;
EligibilityResult = eligibilityResult;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the list of meta data of volume containers, which are
/// part of the failover set.
@@ -48,4 +63,3 @@ public FailoverSet() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSetEligibilityResult.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSetEligibilityResult.cs
index ba947b642e935..c8d0202d4ab1e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSetEligibilityResult.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverSetEligibilityResult.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class FailoverSetEligibilityResult
/// Initializes a new instance of the FailoverSetEligibilityResult
/// class.
///
- public FailoverSetEligibilityResult() { }
+ public FailoverSetEligibilityResult()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the FailoverSetEligibilityResult
@@ -30,8 +39,14 @@ public FailoverSetEligibilityResult() { }
{
IsEligibleForFailover = isEligibleForFailover;
ErrorMessage = errorMessage;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets represents if this failover set is eligible for
/// failover or not.
@@ -48,4 +63,3 @@ public FailoverSetEligibilityResult() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverTarget.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverTarget.cs
index d5a8a7cca7144..798f63c740c32 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverTarget.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FailoverTarget.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class FailoverTarget
///
/// Initializes a new instance of the FailoverTarget class.
///
- public FailoverTarget() { }
+ public FailoverTarget()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the FailoverTarget class.
@@ -29,7 +38,7 @@ public FailoverTarget() { }
/// device.
/// The software version of the
/// device.
- /// The count of datacontainers on
+ /// The count of data containers on
/// the device.
/// The count of volumes on the
/// device.
@@ -56,8 +65,14 @@ public FailoverTarget() { }
DeviceLocation = deviceLocation;
FriendlyDeviceSoftwareVersion = friendlyDeviceSoftwareVersion;
EligibilityResult = eligibilityResult;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the path ID of the device.
///
@@ -86,7 +101,7 @@ public FailoverTarget() { }
public string DeviceSoftwareVersion { get; set; }
///
- /// Gets or sets the count of datacontainers on the device.
+ /// Gets or sets the count of data containers on the device.
///
[JsonProperty(PropertyName = "dataContainersCount")]
public int? DataContainersCount { get; set; }
@@ -134,4 +149,3 @@ public FailoverTarget() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Feature.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Feature.cs
index 57d4982319262..d765f56131ae9 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Feature.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Feature.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class Feature
///
/// Initializes a new instance of the Feature class.
///
- public Feature() { }
+ public Feature()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Feature class.
@@ -29,8 +38,14 @@ public Feature(string name, FeatureSupportStatus status)
{
Name = name;
Status = status;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the name of the feature.
///
@@ -59,4 +74,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureFilter.cs
index 822f8acb90d53..44f277393eaff 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class FeatureFilter
///
/// Initializes a new instance of the FeatureFilter class.
///
- public FeatureFilter() { }
+ public FeatureFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the FeatureFilter class.
@@ -26,8 +35,14 @@ public FeatureFilter() { }
public FeatureFilter(string deviceId = default(string))
{
DeviceId = deviceId;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the device ID for which the features are
/// required. Only 'Equality' operator is supported for this property.
@@ -37,4 +52,3 @@ public FeatureFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureSupportStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureSupportStatus.cs
index 1c86e281f5a8a..c4d0278ac7f11 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureSupportStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/FeatureSupportStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for FeatureSupportStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum FeatureSupportStatus
{
[EnumMember(Value = "NotAvailable")]
@@ -22,5 +28,39 @@ public enum FeatureSupportStatus
[EnumMember(Value = "Supported")]
Supported
}
-}
+ internal static class FeatureSupportStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this FeatureSupportStatus? value)
+ {
+ return value == null ? null : ((FeatureSupportStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this FeatureSupportStatus value)
+ {
+ switch( value )
+ {
+ case FeatureSupportStatus.NotAvailable:
+ return "NotAvailable";
+ case FeatureSupportStatus.UnsupportedDeviceVersion:
+ return "UnsupportedDeviceVersion";
+ case FeatureSupportStatus.Supported:
+ return "Supported";
+ }
+ return null;
+ }
+ internal static FeatureSupportStatus? ParseFeatureSupportStatus(this string value)
+ {
+ switch( value )
+ {
+ case "NotAvailable":
+ return FeatureSupportStatus.NotAvailable;
+ case "UnsupportedDeviceVersion":
+ return FeatureSupportStatus.UnsupportedDeviceVersion;
+ case "Supported":
+ return FeatureSupportStatus.Supported;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponent.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponent.cs
index 1fc83f79c3545..6538c29af9e7c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponent.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponent.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class HardwareComponent
///
/// Initializes a new instance of the HardwareComponent class.
///
- public HardwareComponent() { }
+ public HardwareComponent()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the HardwareComponent class.
@@ -35,8 +44,14 @@ public HardwareComponent(string componentId, string displayName, HardwareCompone
DisplayName = displayName;
Status = status;
StatusDisplayName = statusDisplayName;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the component ID.
///
@@ -86,4 +101,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentGroup.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentGroup.cs
index 7384a3eec7b37..0acdae0a282ef 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentGroup.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentGroup.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The hardware component group.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class HardwareComponentGroup : BaseModel
{
///
/// Initializes a new instance of the HardwareComponentGroup class.
///
- public HardwareComponentGroup() { }
+ public HardwareComponentGroup()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the HardwareComponentGroup class.
@@ -42,8 +51,14 @@ public HardwareComponentGroup() { }
DisplayName = displayName;
LastUpdatedTime = lastUpdatedTime;
Components = components;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the display name the hardware component group.
///
@@ -91,4 +106,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentStatus.cs
index 423cc8739a6e1..e482295e3a55a 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/HardwareComponentStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for HardwareComponentStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum HardwareComponentStatus
{
[EnumMember(Value = "Unknown")]
@@ -30,5 +36,55 @@ public enum HardwareComponentStatus
[EnumMember(Value = "Failure")]
Failure
}
-}
+ internal static class HardwareComponentStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this HardwareComponentStatus? value)
+ {
+ return value == null ? null : ((HardwareComponentStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this HardwareComponentStatus value)
+ {
+ switch( value )
+ {
+ case HardwareComponentStatus.Unknown:
+ return "Unknown";
+ case HardwareComponentStatus.NotPresent:
+ return "NotPresent";
+ case HardwareComponentStatus.PoweredOff:
+ return "PoweredOff";
+ case HardwareComponentStatus.Ok:
+ return "Ok";
+ case HardwareComponentStatus.Recovering:
+ return "Recovering";
+ case HardwareComponentStatus.Warning:
+ return "Warning";
+ case HardwareComponentStatus.Failure:
+ return "Failure";
+ }
+ return null;
+ }
+ internal static HardwareComponentStatus? ParseHardwareComponentStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Unknown":
+ return HardwareComponentStatus.Unknown;
+ case "NotPresent":
+ return HardwareComponentStatus.NotPresent;
+ case "PoweredOff":
+ return HardwareComponentStatus.PoweredOff;
+ case "Ok":
+ return HardwareComponentStatus.Ok;
+ case "Recovering":
+ return HardwareComponentStatus.Recovering;
+ case "Warning":
+ return HardwareComponentStatus.Warning;
+ case "Failure":
+ return HardwareComponentStatus.Failure;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ISCSIAndCloudStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ISCSIAndCloudStatus.cs
index 28eb3a0d43d58..0460900565509 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ISCSIAndCloudStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ISCSIAndCloudStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ISCSIAndCloudStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ISCSIAndCloudStatus
{
[EnumMember(Value = "Disabled")]
@@ -24,5 +30,43 @@ public enum ISCSIAndCloudStatus
[EnumMember(Value = "IscsiAndCloudEnabled")]
IscsiAndCloudEnabled
}
-}
+ internal static class ISCSIAndCloudStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this ISCSIAndCloudStatus? value)
+ {
+ return value == null ? null : ((ISCSIAndCloudStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ISCSIAndCloudStatus value)
+ {
+ switch( value )
+ {
+ case ISCSIAndCloudStatus.Disabled:
+ return "Disabled";
+ case ISCSIAndCloudStatus.IscsiEnabled:
+ return "IscsiEnabled";
+ case ISCSIAndCloudStatus.CloudEnabled:
+ return "CloudEnabled";
+ case ISCSIAndCloudStatus.IscsiAndCloudEnabled:
+ return "IscsiAndCloudEnabled";
+ }
+ return null;
+ }
+ internal static ISCSIAndCloudStatus? ParseISCSIAndCloudStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Disabled":
+ return ISCSIAndCloudStatus.Disabled;
+ case "IscsiEnabled":
+ return ISCSIAndCloudStatus.IscsiEnabled;
+ case "CloudEnabled":
+ return ISCSIAndCloudStatus.CloudEnabled;
+ case "IscsiAndCloudEnabled":
+ return ISCSIAndCloudStatus.IscsiAndCloudEnabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/InEligibilityCategory.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/InEligibilityCategory.cs
index e57ad5c9b21fe..9256d079ffeee 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/InEligibilityCategory.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/InEligibilityCategory.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for InEligibilityCategory.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum InEligibilityCategory
{
[EnumMember(Value = "DeviceNotOnline")]
@@ -22,5 +28,39 @@ public enum InEligibilityCategory
[EnumMember(Value = "RolloverPending")]
RolloverPending
}
-}
+ internal static class InEligibilityCategoryEnumExtension
+ {
+ internal static string ToSerializedValue(this InEligibilityCategory? value)
+ {
+ return value == null ? null : ((InEligibilityCategory)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this InEligibilityCategory value)
+ {
+ switch( value )
+ {
+ case InEligibilityCategory.DeviceNotOnline:
+ return "DeviceNotOnline";
+ case InEligibilityCategory.NotSupportedAppliance:
+ return "NotSupportedAppliance";
+ case InEligibilityCategory.RolloverPending:
+ return "RolloverPending";
+ }
+ return null;
+ }
+ internal static InEligibilityCategory? ParseInEligibilityCategory(this string value)
+ {
+ switch( value )
+ {
+ case "DeviceNotOnline":
+ return InEligibilityCategory.DeviceNotOnline;
+ case "NotSupportedAppliance":
+ return InEligibilityCategory.NotSupportedAppliance;
+ case "RolloverPending":
+ return InEligibilityCategory.RolloverPending;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Job.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Job.cs
index e0e1cde8d3196..89c8a671fb57d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Job.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Job.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,13 +20,16 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The job.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class Job : BaseModel
{
///
/// Initializes a new instance of the Job class.
///
- public Job() { }
+ public Job()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Job class.
@@ -81,8 +90,14 @@ public Job() { }
BackupType = backupType;
SourceDeviceId = sourceDeviceId;
BackupPointInTime = backupPointInTime;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the current status of the job. Possible values
/// include: 'Running', 'Succeeded', 'Failed', 'Canceled'
@@ -205,4 +220,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorDetails.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorDetails.cs
index bc04c516d7d3c..b5c66eaef664c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorDetails.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorDetails.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class JobErrorDetails
///
/// Initializes a new instance of the JobErrorDetails class.
///
- public JobErrorDetails() { }
+ public JobErrorDetails()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the JobErrorDetails class.
@@ -33,8 +42,14 @@ public JobErrorDetails() { }
ErrorDetails = errorDetails;
Code = code;
Message = message;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the error details.
///
@@ -83,4 +98,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorItem.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorItem.cs
index 120fb475f4c8e..79ff926b1ca45 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorItem.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobErrorItem.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class JobErrorItem
///
/// Initializes a new instance of the JobErrorItem class.
///
- public JobErrorItem() { }
+ public JobErrorItem()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the JobErrorItem class.
@@ -33,8 +42,14 @@ public JobErrorItem() { }
Recommendations = recommendations;
Code = code;
Message = message;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the recommended actions.
///
@@ -73,4 +88,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobFilter.cs
index 6f0044cb572ed..38825fdbef8b8 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class JobFilter
///
/// Initializes a new instance of the JobFilter class.
///
- public JobFilter() { }
+ public JobFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the JobFilter class.
@@ -37,8 +46,14 @@ public JobFilter() { }
Status = status;
JobType = jobType;
StartTime = startTime;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the status of the jobs to be filtered. For
/// e.g., "Running", "Succeeded", "Failed" or "Canceled". Only
@@ -68,4 +83,3 @@ public JobFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStage.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStage.cs
index ac013baedde61..69eddc3f39016 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStage.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStage.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class JobStage
///
/// Initializes a new instance of the JobStage class.
///
- public JobStage() { }
+ public JobStage()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the JobStage class.
@@ -31,8 +40,14 @@ public JobStage() { }
StageStatus = stageStatus;
Detail = detail;
ErrorCode = errorCode;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the message of the job stage.
///
@@ -69,4 +84,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStatus.cs
index 5355a1fc8f1b2..9e120d85460dc 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for JobStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum JobStatus
{
[EnumMember(Value = "Running")]
@@ -24,5 +30,43 @@ public enum JobStatus
[EnumMember(Value = "Canceled")]
Canceled
}
-}
+ internal static class JobStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this JobStatus? value)
+ {
+ return value == null ? null : ((JobStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this JobStatus value)
+ {
+ switch( value )
+ {
+ case JobStatus.Running:
+ return "Running";
+ case JobStatus.Succeeded:
+ return "Succeeded";
+ case JobStatus.Failed:
+ return "Failed";
+ case JobStatus.Canceled:
+ return "Canceled";
+ }
+ return null;
+ }
+ internal static JobStatus? ParseJobStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Running":
+ return JobStatus.Running;
+ case "Succeeded":
+ return JobStatus.Succeeded;
+ case "Failed":
+ return JobStatus.Failed;
+ case "Canceled":
+ return JobStatus.Canceled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobType.cs
index ba556e6fcd391..699e601000d6f 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/JobType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for JobType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum JobType
{
[EnumMember(Value = "ScheduledBackup")]
@@ -36,5 +42,67 @@ public enum JobType
[EnumMember(Value = "CreateCloudAppliance")]
CreateCloudAppliance
}
-}
+ internal static class JobTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this JobType? value)
+ {
+ return value == null ? null : ((JobType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this JobType value)
+ {
+ switch( value )
+ {
+ case JobType.ScheduledBackup:
+ return "ScheduledBackup";
+ case JobType.ManualBackup:
+ return "ManualBackup";
+ case JobType.RestoreBackup:
+ return "RestoreBackup";
+ case JobType.CloneVolume:
+ return "CloneVolume";
+ case JobType.FailoverVolumeContainers:
+ return "FailoverVolumeContainers";
+ case JobType.CreateLocallyPinnedVolume:
+ return "CreateLocallyPinnedVolume";
+ case JobType.ModifyVolume:
+ return "ModifyVolume";
+ case JobType.InstallUpdates:
+ return "InstallUpdates";
+ case JobType.SupportPackageLogs:
+ return "SupportPackageLogs";
+ case JobType.CreateCloudAppliance:
+ return "CreateCloudAppliance";
+ }
+ return null;
+ }
+ internal static JobType? ParseJobType(this string value)
+ {
+ switch( value )
+ {
+ case "ScheduledBackup":
+ return JobType.ScheduledBackup;
+ case "ManualBackup":
+ return JobType.ManualBackup;
+ case "RestoreBackup":
+ return JobType.RestoreBackup;
+ case "CloneVolume":
+ return JobType.CloneVolume;
+ case "FailoverVolumeContainers":
+ return JobType.FailoverVolumeContainers;
+ case "CreateLocallyPinnedVolume":
+ return JobType.CreateLocallyPinnedVolume;
+ case "ModifyVolume":
+ return JobType.ModifyVolume;
+ case "InstallUpdates":
+ return JobType.InstallUpdates;
+ case "SupportPackageLogs":
+ return JobType.SupportPackageLogs;
+ case "CreateCloudAppliance":
+ return JobType.CreateCloudAppliance;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Key.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Key.cs
index 905c5dbcf8e33..9362918f11d72 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Key.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Key.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class Key
///
/// Initializes a new instance of the Key class.
///
- public Key() { }
+ public Key()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Key class.
@@ -26,8 +35,14 @@ public Key() { }
public Key(string activationKey)
{
ActivationKey = activationKey;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the activation key for the device.
///
@@ -49,4 +64,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/KeyRolloverStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/KeyRolloverStatus.cs
index b366f016fcfbe..7f962434d0101 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/KeyRolloverStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/KeyRolloverStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for KeyRolloverStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum KeyRolloverStatus
{
[EnumMember(Value = "Required")]
@@ -20,5 +26,35 @@ public enum KeyRolloverStatus
[EnumMember(Value = "NotRequired")]
NotRequired
}
-}
+ internal static class KeyRolloverStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this KeyRolloverStatus? value)
+ {
+ return value == null ? null : ((KeyRolloverStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this KeyRolloverStatus value)
+ {
+ switch( value )
+ {
+ case KeyRolloverStatus.Required:
+ return "Required";
+ case KeyRolloverStatus.NotRequired:
+ return "NotRequired";
+ }
+ return null;
+ }
+ internal static KeyRolloverStatus? ParseKeyRolloverStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Required":
+ return KeyRolloverStatus.Required;
+ case "NotRequired":
+ return KeyRolloverStatus.NotRequired;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Kind.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Kind.cs
index a61c2ddd5c924..0b2cb67a31e21 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Kind.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Kind.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,11 +18,37 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for Kind.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum Kind
{
[EnumMember(Value = "Series8000")]
Series8000
}
-}
+ internal static class KindEnumExtension
+ {
+ internal static string ToSerializedValue(this Kind? value)
+ {
+ return value == null ? null : ((Kind)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this Kind value)
+ {
+ switch( value )
+ {
+ case Kind.Series8000:
+ return "Series8000";
+ }
+ return null;
+ }
+ internal static Kind? ParseKind(this string value)
+ {
+ switch( value )
+ {
+ case "Series8000":
+ return Kind.Series8000;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ListFailoverTargetsRequest.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ListFailoverTargetsRequest.cs
index 8d37a0aef0cf7..cb84bc250d617 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ListFailoverTargetsRequest.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ListFailoverTargetsRequest.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class ListFailoverTargetsRequest
///
/// Initializes a new instance of the ListFailoverTargetsRequest class.
///
- public ListFailoverTargetsRequest() { }
+ public ListFailoverTargetsRequest()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ListFailoverTargetsRequest class.
@@ -29,8 +38,14 @@ public ListFailoverTargetsRequest() { }
public ListFailoverTargetsRequest(IList volumeContainers = default(IList))
{
VolumeContainers = volumeContainers;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the list of path IDs of the volume containers that
/// needs to be failed-over, for which we want to fetch the eligible
@@ -41,4 +56,3 @@ public ListFailoverTargetsRequest() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Manager.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Manager.cs
index 8f73dbdfb0ab3..d2270c9713180 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Manager.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Manager.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -14,7 +20,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// The StorSimple Manager.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class Manager : Resource
{
///
@@ -22,6 +28,7 @@ public partial class Manager : Resource
///
public Manager()
{
+ CustomInit();
}
///
@@ -44,6 +51,7 @@ public Manager()
CisIntrinsicSettings = cisIntrinsicSettings;
ProvisioningState = provisioningState;
Etag = etag;
+ CustomInit();
}
///
/// Static constructor for Manager class.
@@ -53,6 +61,11 @@ static Manager()
Sku = new ManagerSku();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets represents the type of StorSimple Manager.
///
@@ -95,4 +108,3 @@ public override void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerExtendedInfo.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerExtendedInfo.cs
index da66b08f295c2..a546ddac0f3cc 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerExtendedInfo.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerExtendedInfo.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// The extended info of the manager.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class ManagerExtendedInfo : BaseModel
{
///
/// Initializes a new instance of the ManagerExtendedInfo class.
///
- public ManagerExtendedInfo() { }
+ public ManagerExtendedInfo()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ManagerExtendedInfo class.
@@ -55,8 +64,14 @@ public ManagerExtendedInfo() { }
PortalCertificateThumbprint = portalCertificateThumbprint;
Algorithm = algorithm;
Etag = etag;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the version of the extended info being persisted.
///
@@ -122,4 +137,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerIntrinsicSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerIntrinsicSettings.cs
index c50cc566aaf38..c6d4a4c57042d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerIntrinsicSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerIntrinsicSettings.cs
@@ -1,21 +1,30 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
///
- /// Intrinsic settings which refers to the type of the Storsimple Manager.
+ /// Intrinsic settings which refers to the type of the StorSimple Manager.
///
public partial class ManagerIntrinsicSettings
{
///
/// Initializes a new instance of the ManagerIntrinsicSettings class.
///
- public ManagerIntrinsicSettings() { }
+ public ManagerIntrinsicSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ManagerIntrinsicSettings class.
@@ -25,8 +34,14 @@ public ManagerIntrinsicSettings() { }
public ManagerIntrinsicSettings(ManagerType type)
{
Type = type;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the type of StorSimple Manager. Possible values
/// include: 'GardaV1', 'HelsinkiV1'
@@ -45,4 +60,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerPatch.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerPatch.cs
index 93dcba3b20992..ba0c002f21a18 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerPatch.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerPatch.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class ManagerPatch
///
/// Initializes a new instance of the ManagerPatch class.
///
- public ManagerPatch() { }
+ public ManagerPatch()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ManagerPatch class.
@@ -26,8 +35,14 @@ public ManagerPatch() { }
public ManagerPatch(IDictionary tags = default(IDictionary))
{
Tags = tags;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the tags attached to the Manager.
///
@@ -36,4 +51,3 @@ public ManagerPatch() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerSku.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerSku.cs
index 4da19e031bc09..cccb2c7459d77 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerSku.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerSku.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class ManagerSku
///
/// Initializes a new instance of the ManagerSku class.
///
- public ManagerSku() { }
+ public ManagerSku()
+ {
+ CustomInit();
+ }
///
/// Static constructor for ManagerSku class.
@@ -25,6 +34,11 @@ static ManagerSku()
Name = "Standard";
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Refers to the sku name which should be "Standard"
///
@@ -33,4 +47,3 @@ static ManagerSku()
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerType.cs
index c8a845a115a3d..e02bf094f41e2 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ManagerType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ManagerType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ManagerType
{
[EnumMember(Value = "GardaV1")]
@@ -20,5 +26,35 @@ public enum ManagerType
[EnumMember(Value = "HelsinkiV1")]
HelsinkiV1
}
-}
+ internal static class ManagerTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this ManagerType? value)
+ {
+ return value == null ? null : ((ManagerType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ManagerType value)
+ {
+ switch( value )
+ {
+ case ManagerType.GardaV1:
+ return "GardaV1";
+ case ManagerType.HelsinkiV1:
+ return "HelsinkiV1";
+ }
+ return null;
+ }
+ internal static ManagerType? ParseManagerType(this string value)
+ {
+ switch( value )
+ {
+ case "GardaV1":
+ return ManagerType.GardaV1;
+ case "HelsinkiV1":
+ return ManagerType.HelsinkiV1;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAggregationType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAggregationType.cs
index 1b7cf95e1a4d7..b96afc0a603e5 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAggregationType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAggregationType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for MetricAggregationType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum MetricAggregationType
{
[EnumMember(Value = "Average")]
@@ -28,5 +34,51 @@ public enum MetricAggregationType
[EnumMember(Value = "Total")]
Total
}
-}
+ internal static class MetricAggregationTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this MetricAggregationType? value)
+ {
+ return value == null ? null : ((MetricAggregationType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this MetricAggregationType value)
+ {
+ switch( value )
+ {
+ case MetricAggregationType.Average:
+ return "Average";
+ case MetricAggregationType.Last:
+ return "Last";
+ case MetricAggregationType.Maximum:
+ return "Maximum";
+ case MetricAggregationType.Minimum:
+ return "Minimum";
+ case MetricAggregationType.None:
+ return "None";
+ case MetricAggregationType.Total:
+ return "Total";
+ }
+ return null;
+ }
+ internal static MetricAggregationType? ParseMetricAggregationType(this string value)
+ {
+ switch( value )
+ {
+ case "Average":
+ return MetricAggregationType.Average;
+ case "Last":
+ return MetricAggregationType.Last;
+ case "Maximum":
+ return MetricAggregationType.Maximum;
+ case "Minimum":
+ return MetricAggregationType.Minimum;
+ case "None":
+ return MetricAggregationType.None;
+ case "Total":
+ return MetricAggregationType.Total;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAvailablity.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAvailablity.cs
index 20df8b868e0e5..a721cf0cbaea4 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAvailablity.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricAvailablity.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class MetricAvailablity
///
/// Initializes a new instance of the MetricAvailablity class.
///
- public MetricAvailablity() { }
+ public MetricAvailablity()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricAvailablity class.
@@ -28,8 +37,14 @@ public MetricAvailablity() { }
{
TimeGrain = timeGrain;
Retention = retention;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the aggregation interval for the metric.
///
@@ -45,4 +60,3 @@ public MetricAvailablity() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricData.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricData.cs
index 26ae8108a5a50..7ecf6eaf98324 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricData.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricData.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class MetricData
///
/// Initializes a new instance of the MetricData class.
///
- public MetricData() { }
+ public MetricData()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricData class.
@@ -38,8 +47,14 @@ public MetricData() { }
Average = average;
Minimum = minimum;
Maximum = maximum;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the time stamp of the metric data.
///
@@ -78,4 +93,3 @@ public MetricData() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDefinition.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDefinition.cs
index 5c2a48e29e0a4..6c6c340354b3d 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDefinition.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDefinition.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class MetricDefinition
///
/// Initializes a new instance of the MetricDefinition class.
///
- public MetricDefinition() { }
+ public MetricDefinition()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricDefinition class.
@@ -45,8 +54,14 @@ public MetricDefinition() { }
Dimensions = dimensions;
Category = category;
Type = type;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the metric name.
///
@@ -99,4 +114,3 @@ public MetricDefinition() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDimension.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDimension.cs
index f4940bb285910..3d4da880fba39 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDimension.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricDimension.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class MetricDimension
///
/// Initializes a new instance of the MetricDimension class.
///
- public MetricDimension() { }
+ public MetricDimension()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricDimension class.
@@ -26,8 +35,14 @@ public MetricDimension() { }
{
Name = name;
Value = value;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the metric dimension name.
///
@@ -42,4 +57,3 @@ public MetricDimension() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricFilter.cs
index 5c2253fd87bb5..60c644e7e34d7 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricFilter.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class MetricFilter
///
/// Initializes a new instance of the MetricFilter class.
///
- public MetricFilter() { }
+ public MetricFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricFilter class.
@@ -50,8 +59,14 @@ public MetricFilter() { }
TimeGrain = timeGrain;
Category = category;
Dimensions = dimensions;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the metric name filter specifying the name
/// of the metric to be filtered on. Only 'Equality' operator is
@@ -117,4 +132,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricName.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricName.cs
index 07ad55d62bf04..80897644e2780 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricName.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricName.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class MetricName
///
/// Initializes a new instance of the MetricName class.
///
- public MetricName() { }
+ public MetricName()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricName class.
@@ -26,8 +35,14 @@ public MetricName() { }
{
Value = value;
LocalizedValue = localizedValue;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the metric name.
///
@@ -42,4 +57,3 @@ public MetricName() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricNameFilter.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricNameFilter.cs
index 167597c937173..834c1e70ed917 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricNameFilter.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricNameFilter.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class MetricNameFilter
///
/// Initializes a new instance of the MetricNameFilter class.
///
- public MetricNameFilter() { }
+ public MetricNameFilter()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the MetricNameFilter class.
@@ -28,8 +37,14 @@ public MetricNameFilter() { }
public MetricNameFilter(string value = default(string))
{
Value = value;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets specifies the metric name to be filtered on. E.g.,
/// CloudStorageUsed. Valid values are the ones returned in the field
@@ -41,4 +56,3 @@ public MetricNameFilter() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricUnit.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricUnit.cs
index 53b7acf7ec462..fd7a1043ec4e8 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricUnit.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MetricUnit.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for MetricUnit.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum MetricUnit
{
[EnumMember(Value = "Bytes")]
@@ -28,5 +34,51 @@ public enum MetricUnit
[EnumMember(Value = "Seconds")]
Seconds
}
-}
+ internal static class MetricUnitEnumExtension
+ {
+ internal static string ToSerializedValue(this MetricUnit? value)
+ {
+ return value == null ? null : ((MetricUnit)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this MetricUnit value)
+ {
+ switch( value )
+ {
+ case MetricUnit.Bytes:
+ return "Bytes";
+ case MetricUnit.BytesPerSecond:
+ return "BytesPerSecond";
+ case MetricUnit.Count:
+ return "Count";
+ case MetricUnit.CountPerSecond:
+ return "CountPerSecond";
+ case MetricUnit.Percent:
+ return "Percent";
+ case MetricUnit.Seconds:
+ return "Seconds";
+ }
+ return null;
+ }
+ internal static MetricUnit? ParseMetricUnit(this string value)
+ {
+ switch( value )
+ {
+ case "Bytes":
+ return MetricUnit.Bytes;
+ case "BytesPerSecond":
+ return MetricUnit.BytesPerSecond;
+ case "Count":
+ return MetricUnit.Count;
+ case "CountPerSecond":
+ return MetricUnit.CountPerSecond;
+ case "Percent":
+ return MetricUnit.Percent;
+ case "Seconds":
+ return MetricUnit.Seconds;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Metrics.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Metrics.cs
index 1fbd0c1a43fce..1e38786f0c819 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Metrics.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Metrics.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class Metrics
///
/// Initializes a new instance of the Metrics class.
///
- public Metrics() { }
+ public Metrics()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Metrics class.
@@ -49,8 +58,14 @@ public Metrics() { }
Unit = unit;
Type = type;
Values = values;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the ID of metric source.
///
@@ -116,4 +131,3 @@ public Metrics() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MonitoringStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MonitoringStatus.cs
index 2642e0fb0ed2b..a5550535a0604 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MonitoringStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/MonitoringStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for MonitoringStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum MonitoringStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum MonitoringStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class MonitoringStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this MonitoringStatus? value)
+ {
+ return value == null ? null : ((MonitoringStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this MonitoringStatus value)
+ {
+ switch( value )
+ {
+ case MonitoringStatus.Enabled:
+ return "Enabled";
+ case MonitoringStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static MonitoringStatus? ParseMonitoringStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return MonitoringStatus.Enabled;
+ case "Disabled":
+ return MonitoringStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceId.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceId.cs
index 3b841c7acfbb8..058b54a63d3f3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceId.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceId.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for NetInterfaceId.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum NetInterfaceId
{
[EnumMember(Value = "Invalid")]
@@ -30,5 +36,55 @@ public enum NetInterfaceId
[EnumMember(Value = "Data5")]
Data5
}
-}
+ internal static class NetInterfaceIdEnumExtension
+ {
+ internal static string ToSerializedValue(this NetInterfaceId? value)
+ {
+ return value == null ? null : ((NetInterfaceId)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this NetInterfaceId value)
+ {
+ switch( value )
+ {
+ case NetInterfaceId.Invalid:
+ return "Invalid";
+ case NetInterfaceId.Data0:
+ return "Data0";
+ case NetInterfaceId.Data1:
+ return "Data1";
+ case NetInterfaceId.Data2:
+ return "Data2";
+ case NetInterfaceId.Data3:
+ return "Data3";
+ case NetInterfaceId.Data4:
+ return "Data4";
+ case NetInterfaceId.Data5:
+ return "Data5";
+ }
+ return null;
+ }
+ internal static NetInterfaceId? ParseNetInterfaceId(this string value)
+ {
+ switch( value )
+ {
+ case "Invalid":
+ return NetInterfaceId.Invalid;
+ case "Data0":
+ return NetInterfaceId.Data0;
+ case "Data1":
+ return NetInterfaceId.Data1;
+ case "Data2":
+ return NetInterfaceId.Data2;
+ case "Data3":
+ return NetInterfaceId.Data3;
+ case "Data4":
+ return NetInterfaceId.Data4;
+ case "Data5":
+ return NetInterfaceId.Data5;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceStatus.cs
index 744cbf3e352e4..5d959b9b871d8 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetInterfaceStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for NetInterfaceStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum NetInterfaceStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum NetInterfaceStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class NetInterfaceStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this NetInterfaceStatus? value)
+ {
+ return value == null ? null : ((NetInterfaceStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this NetInterfaceStatus value)
+ {
+ switch( value )
+ {
+ case NetInterfaceStatus.Enabled:
+ return "Enabled";
+ case NetInterfaceStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static NetInterfaceStatus? ParseNetInterfaceStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return NetInterfaceStatus.Enabled;
+ case "Disabled":
+ return NetInterfaceStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapterList.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapterList.cs
index 5f94497ecf1a3..048826614446c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapterList.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapterList.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -18,7 +24,10 @@ public partial class NetworkAdapterList
///
/// Initializes a new instance of the NetworkAdapterList class.
///
- public NetworkAdapterList() { }
+ public NetworkAdapterList()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NetworkAdapterList class.
@@ -27,8 +36,14 @@ public NetworkAdapterList() { }
public NetworkAdapterList(IList value)
{
Value = value;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the value.
///
@@ -60,4 +75,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapters.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapters.cs
index a81e640acf89a..f7ff542129a70 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapters.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkAdapters.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class NetworkAdapters
///
/// Initializes a new instance of the NetworkAdapters class.
///
- public NetworkAdapters() { }
+ public NetworkAdapters()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NetworkAdapters class.
@@ -48,8 +57,14 @@ public NetworkAdapters() { }
Mode = mode;
NicIpv4Settings = nicIpv4Settings;
NicIpv6Settings = nicIpv6Settings;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the ID of the network adapter. Possible values
/// include: 'Invalid', 'Data0', 'Data1', 'Data2', 'Data3', 'Data4',
@@ -115,4 +130,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkInterfaceData0Settings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkInterfaceData0Settings.cs
index a1acf4631713c..a55701a902e7c 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkInterfaceData0Settings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkInterfaceData0Settings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class NetworkInterfaceData0Settings
/// Initializes a new instance of the NetworkInterfaceData0Settings
/// class.
///
- public NetworkInterfaceData0Settings() { }
+ public NetworkInterfaceData0Settings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NetworkInterfaceData0Settings
@@ -30,8 +39,14 @@ public NetworkInterfaceData0Settings() { }
{
ControllerZeroIp = controllerZeroIp;
ControllerOneIp = controllerOneIp;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the controller 0's IPv4 address.
///
@@ -46,4 +61,3 @@ public NetworkInterfaceData0Settings() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkMode.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkMode.cs
index 2bc2b2101b6ca..ef8c6ae622c08 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkMode.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkMode.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for NetworkMode.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum NetworkMode
{
[EnumMember(Value = "Invalid")]
@@ -24,5 +30,43 @@ public enum NetworkMode
[EnumMember(Value = "BOTH")]
BOTH
}
-}
+ internal static class NetworkModeEnumExtension
+ {
+ internal static string ToSerializedValue(this NetworkMode? value)
+ {
+ return value == null ? null : ((NetworkMode)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this NetworkMode value)
+ {
+ switch( value )
+ {
+ case NetworkMode.Invalid:
+ return "Invalid";
+ case NetworkMode.IPV4:
+ return "IPV4";
+ case NetworkMode.IPV6:
+ return "IPV6";
+ case NetworkMode.BOTH:
+ return "BOTH";
+ }
+ return null;
+ }
+ internal static NetworkMode? ParseNetworkMode(this string value)
+ {
+ switch( value )
+ {
+ case "Invalid":
+ return NetworkMode.Invalid;
+ case "IPV4":
+ return NetworkMode.IPV4;
+ case "IPV6":
+ return NetworkMode.IPV6;
+ case "BOTH":
+ return NetworkMode.BOTH;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettings.cs
index 9f72b5b3c30b4..5593ae18a43ab 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettings.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// Represents the network settings of a device.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class NetworkSettings : BaseModel
{
///
/// Initializes a new instance of the NetworkSettings class.
///
- public NetworkSettings() { }
+ public NetworkSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NetworkSettings class.
@@ -42,8 +51,14 @@ public NetworkSettings() { }
DnsSettings = dnsSettings;
NetworkAdapters = networkAdapters;
WebproxySettings = webproxySettings;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the DNS (Domain Name System) settings of device.
///
@@ -93,4 +108,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettingsPatch.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettingsPatch.cs
index 2f4497aed88ad..e88ebb3a48eb3 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettingsPatch.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NetworkSettingsPatch.cs
@@ -1,24 +1,33 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Serialization;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;
///
/// Represents the patch request for the network settings of a device.
///
- [JsonTransformation]
+ [Rest.Serialization.JsonTransformation]
public partial class NetworkSettingsPatch
{
///
/// Initializes a new instance of the NetworkSettingsPatch class.
///
- public NetworkSettingsPatch() { }
+ public NetworkSettingsPatch()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NetworkSettingsPatch class.
@@ -31,8 +40,14 @@ public NetworkSettingsPatch() { }
{
DnsSettings = dnsSettings;
NetworkAdapters = networkAdapters;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the DNS (Domain Name System) settings of device.
///
@@ -60,4 +75,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv4.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv4.cs
index 13bc25d3fb3b4..034d50ae68b81 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv4.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv4.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class NicIPv4
///
/// Initializes a new instance of the NicIPv4 class.
///
- public NicIPv4() { }
+ public NicIPv4()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NicIPv4 class.
@@ -37,8 +46,14 @@ public NicIPv4() { }
Ipv4Gateway = ipv4Gateway;
Controller0Ipv4Address = controller0Ipv4Address;
Controller1Ipv4Address = controller1Ipv4Address;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the IPv4 address of the network adapter.
///
@@ -71,4 +86,3 @@ public NicIPv4() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv6.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv6.cs
index f5c0883d5bd41..18bafab98deff 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv6.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/NicIPv6.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class NicIPv6
///
/// Initializes a new instance of the NicIPv6 class.
///
- public NicIPv6() { }
+ public NicIPv6()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the NicIPv6 class.
@@ -37,8 +46,14 @@ public NicIPv6() { }
Ipv6Gateway = ipv6Gateway;
Controller0Ipv6Address = controller0Ipv6Address;
Controller1Ipv6Address = controller1Ipv6Address;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the IPv6 address of the network adapter.
///
@@ -71,4 +86,3 @@ public NicIPv6() { }
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OperationStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OperationStatus.cs
index aa29cb2e3d859..4a14278a2a423 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OperationStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OperationStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for OperationStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum OperationStatus
{
[EnumMember(Value = "None")]
@@ -24,5 +30,43 @@ public enum OperationStatus
[EnumMember(Value = "Restoring")]
Restoring
}
-}
+ internal static class OperationStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this OperationStatus? value)
+ {
+ return value == null ? null : ((OperationStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this OperationStatus value)
+ {
+ switch( value )
+ {
+ case OperationStatus.None:
+ return "None";
+ case OperationStatus.Updating:
+ return "Updating";
+ case OperationStatus.Deleting:
+ return "Deleting";
+ case OperationStatus.Restoring:
+ return "Restoring";
+ }
+ return null;
+ }
+ internal static OperationStatus? ParseOperationStatus(this string value)
+ {
+ switch( value )
+ {
+ case "None":
+ return OperationStatus.None;
+ case "Updating":
+ return OperationStatus.Updating;
+ case "Deleting":
+ return OperationStatus.Deleting;
+ case "Restoring":
+ return OperationStatus.Restoring;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OwnerShipStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OwnerShipStatus.cs
index e3ab52fc18bea..1415403ec2cbb 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OwnerShipStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/OwnerShipStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for OwnerShipStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum OwnerShipStatus
{
[EnumMember(Value = "Owned")]
@@ -20,5 +26,35 @@ public enum OwnerShipStatus
[EnumMember(Value = "NotOwned")]
NotOwned
}
-}
+ internal static class OwnerShipStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this OwnerShipStatus? value)
+ {
+ return value == null ? null : ((OwnerShipStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this OwnerShipStatus value)
+ {
+ switch( value )
+ {
+ case OwnerShipStatus.Owned:
+ return "Owned";
+ case OwnerShipStatus.NotOwned:
+ return "NotOwned";
+ }
+ return null;
+ }
+ internal static OwnerShipStatus? ParseOwnerShipStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Owned":
+ return OwnerShipStatus.Owned;
+ case "NotOwned":
+ return OwnerShipStatus.NotOwned;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page.cs
index 28ce3f37617f1..6860f259df124 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -45,4 +51,3 @@ IEnumerator IEnumerable.GetEnumerator()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page1.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page1.cs
index f41d4bc9809c4..d522fa247d7b5 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page1.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Page1.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -45,4 +51,3 @@ IEnumerator IEnumerable.GetEnumerator()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/PublicKey.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/PublicKey.cs
index 3e1dc23784536..43d73f5576366 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/PublicKey.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/PublicKey.cs
@@ -1,10 +1,16 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class PublicKey
///
/// Initializes a new instance of the PublicKey class.
///
- public PublicKey() { }
+ public PublicKey()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the PublicKey class.
@@ -25,8 +34,14 @@ public PublicKey() { }
public PublicKey(string key)
{
Key = key;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the key.
///
@@ -48,4 +63,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RecurrenceType.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RecurrenceType.cs
index baec69c4f244c..71beb92f38f9e 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RecurrenceType.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RecurrenceType.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for RecurrenceType.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum RecurrenceType
{
[EnumMember(Value = "Minutes")]
@@ -24,5 +30,43 @@ public enum RecurrenceType
[EnumMember(Value = "Weekly")]
Weekly
}
-}
+ internal static class RecurrenceTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this RecurrenceType? value)
+ {
+ return value == null ? null : ((RecurrenceType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this RecurrenceType value)
+ {
+ switch( value )
+ {
+ case RecurrenceType.Minutes:
+ return "Minutes";
+ case RecurrenceType.Hourly:
+ return "Hourly";
+ case RecurrenceType.Daily:
+ return "Daily";
+ case RecurrenceType.Weekly:
+ return "Weekly";
+ }
+ return null;
+ }
+ internal static RecurrenceType? ParseRecurrenceType(this string value)
+ {
+ switch( value )
+ {
+ case "Minutes":
+ return RecurrenceType.Minutes;
+ case "Hourly":
+ return RecurrenceType.Hourly;
+ case "Daily":
+ return RecurrenceType.Daily;
+ case "Weekly":
+ return RecurrenceType.Weekly;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementModeConfiguration.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementModeConfiguration.cs
index 52840208e7967..8939d45729fd9 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementModeConfiguration.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementModeConfiguration.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for RemoteManagementModeConfiguration.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum RemoteManagementModeConfiguration
{
[EnumMember(Value = "Unknown")]
@@ -24,5 +30,43 @@ public enum RemoteManagementModeConfiguration
[EnumMember(Value = "HttpsAndHttpEnabled")]
HttpsAndHttpEnabled
}
-}
+ internal static class RemoteManagementModeConfigurationEnumExtension
+ {
+ internal static string ToSerializedValue(this RemoteManagementModeConfiguration? value)
+ {
+ return value == null ? null : ((RemoteManagementModeConfiguration)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this RemoteManagementModeConfiguration value)
+ {
+ switch( value )
+ {
+ case RemoteManagementModeConfiguration.Unknown:
+ return "Unknown";
+ case RemoteManagementModeConfiguration.Disabled:
+ return "Disabled";
+ case RemoteManagementModeConfiguration.HttpsEnabled:
+ return "HttpsEnabled";
+ case RemoteManagementModeConfiguration.HttpsAndHttpEnabled:
+ return "HttpsAndHttpEnabled";
+ }
+ return null;
+ }
+ internal static RemoteManagementModeConfiguration? ParseRemoteManagementModeConfiguration(this string value)
+ {
+ switch( value )
+ {
+ case "Unknown":
+ return RemoteManagementModeConfiguration.Unknown;
+ case "Disabled":
+ return RemoteManagementModeConfiguration.Disabled;
+ case "HttpsEnabled":
+ return RemoteManagementModeConfiguration.HttpsEnabled;
+ case "HttpsAndHttpEnabled":
+ return RemoteManagementModeConfiguration.HttpsAndHttpEnabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettings.cs
index 1670d4eab4a14..dc79f29ecc6fb 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -15,7 +21,10 @@ public partial class RemoteManagementSettings
///
/// Initializes a new instance of the RemoteManagementSettings class.
///
- public RemoteManagementSettings() { }
+ public RemoteManagementSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the RemoteManagementSettings class.
@@ -29,8 +38,14 @@ public RemoteManagementSettings() { }
{
RemoteManagementMode = remoteManagementMode;
RemoteManagementCertificate = remoteManagementCertificate;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the remote management mode. Possible values include:
/// 'Unknown', 'Disabled', 'HttpsEnabled', 'HttpsAndHttpEnabled'
@@ -55,4 +70,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettingsPatch.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettingsPatch.cs
index 94c2fc8a96535..f064cb63cb890 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettingsPatch.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/RemoteManagementSettingsPatch.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Linq;
@@ -16,7 +22,10 @@ public partial class RemoteManagementSettingsPatch
/// Initializes a new instance of the RemoteManagementSettingsPatch
/// class.
///
- public RemoteManagementSettingsPatch() { }
+ public RemoteManagementSettingsPatch()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the RemoteManagementSettingsPatch
@@ -28,8 +37,14 @@ public RemoteManagementSettingsPatch() { }
public RemoteManagementSettingsPatch(RemoteManagementModeConfiguration remoteManagementMode)
{
RemoteManagementMode = remoteManagementMode;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the remote management mode. Possible values include:
/// 'Unknown', 'Disabled', 'HttpsEnabled', 'HttpsAndHttpEnabled'
@@ -48,4 +63,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Resource.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Resource.cs
index f4652848046fc..685986d0e5d39 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Resource.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/Resource.cs
@@ -1,11 +1,17 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
- using Rest;
- using Rest.Azure;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -19,7 +25,10 @@ public partial class Resource : IResource
///
/// Initializes a new instance of the Resource class.
///
- public Resource() { }
+ public Resource()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the Resource class.
@@ -36,25 +45,31 @@ public Resource() { }
Type = type;
Location = location;
Tags = tags;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets the resource ID.
///
[JsonProperty(PropertyName = "id")]
- public string Id { get; protected set; }
+ public string Id { get; private set; }
///
/// Gets the resource name.
///
[JsonProperty(PropertyName = "name")]
- public string Name { get; protected set; }
+ public string Name { get; private set; }
///
/// Gets the resource type.
///
[JsonProperty(PropertyName = "type")]
- public string Type { get; protected set; }
+ public string Type { get; private set; }
///
/// Gets or sets the geo location of the resource.
@@ -83,4 +98,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleRecurrence.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleRecurrence.cs
index b08803ad6f3f0..dc0a59b152a2f 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleRecurrence.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleRecurrence.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class ScheduleRecurrence
///
/// Initializes a new instance of the ScheduleRecurrence class.
///
- public ScheduleRecurrence() { }
+ public ScheduleRecurrence()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the ScheduleRecurrence class.
@@ -32,8 +41,14 @@ public ScheduleRecurrence() { }
RecurrenceType = recurrenceType;
RecurrenceValue = recurrenceValue;
WeeklyDaysList = weeklyDaysList;
+ CustomInit();
}
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
///
/// Gets or sets the recurrence type. Possible values include:
/// 'Minutes', 'Hourly', 'Daily', 'Weekly'
@@ -65,4 +80,3 @@ public virtual void Validate()
}
}
}
-
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleStatus.cs
index f2a941ea0c385..df57f916de949 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduleStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ScheduleStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ScheduleStatus
{
[EnumMember(Value = "Enabled")]
@@ -20,5 +26,35 @@ public enum ScheduleStatus
[EnumMember(Value = "Disabled")]
Disabled
}
-}
+ internal static class ScheduleStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this ScheduleStatus? value)
+ {
+ return value == null ? null : ((ScheduleStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ScheduleStatus value)
+ {
+ switch( value )
+ {
+ case ScheduleStatus.Enabled:
+ return "Enabled";
+ case ScheduleStatus.Disabled:
+ return "Disabled";
+ }
+ return null;
+ }
+ internal static ScheduleStatus? ParseScheduleStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Enabled":
+ return ScheduleStatus.Enabled;
+ case "Disabled":
+ return ScheduleStatus.Disabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduledBackupStatus.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduledBackupStatus.cs
index 11dd7f58faf9d..40cb894c2a478 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduledBackupStatus.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/ScheduledBackupStatus.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -12,7 +18,7 @@ namespace Microsoft.Azure.Management.StorSimple8000Series.Models
///
/// Defines values for ScheduledBackupStatus.
///
- [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ [JsonConverter(typeof(StringEnumConverter))]
public enum ScheduledBackupStatus
{
[EnumMember(Value = "Disabled")]
@@ -20,5 +26,35 @@ public enum ScheduledBackupStatus
[EnumMember(Value = "Enabled")]
Enabled
}
-}
+ internal static class ScheduledBackupStatusEnumExtension
+ {
+ internal static string ToSerializedValue(this ScheduledBackupStatus? value)
+ {
+ return value == null ? null : ((ScheduledBackupStatus)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ScheduledBackupStatus value)
+ {
+ switch( value )
+ {
+ case ScheduledBackupStatus.Disabled:
+ return "Disabled";
+ case ScheduledBackupStatus.Enabled:
+ return "Enabled";
+ }
+ return null;
+ }
+ internal static ScheduledBackupStatus? ParseScheduledBackupStatus(this string value)
+ {
+ switch( value )
+ {
+ case "Disabled":
+ return ScheduledBackupStatus.Disabled;
+ case "Enabled":
+ return ScheduledBackupStatus.Enabled;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/SecondaryDNSSettings.cs b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/SecondaryDNSSettings.cs
index 86451f85d3a4a..9b6f41da2afc1 100644
--- a/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/SecondaryDNSSettings.cs
+++ b/sdk/storsimple8000series/Microsoft.Azure.Management.StorSimple8000Series/src/Generated/Models/SecondaryDNSSettings.cs
@@ -1,9 +1,15 @@
+//
+// 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.StorSimple8000Series.Models
{
- using Azure;
- using Management;
- using StorSimple8000Series;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -17,7 +23,10 @@ public partial class SecondaryDNSSettings
///
/// Initializes a new instance of the SecondaryDNSSettings class.
///
- public SecondaryDNSSettings() { }
+ public SecondaryDNSSettings()
+ {
+ CustomInit();
+ }
///
/// Initializes a new instance of the SecondaryDNSSettings class.
@@ -27,8 +36,14 @@ public SecondaryDNSSettings() { }
public SecondaryDNSSettings(IList