diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/AzSdk.RP.props b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/AzSdk.RP.props
deleted file mode 100644
index cdcc600672527..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/AzSdk.RP.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- Network_2018-08-01;
- $(PackageTags);$(CommonTags);$(AzureApiTag);
-
-
\ No newline at end of file
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/Microsoft.Azure.Management.TrafficManager.sln b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/Microsoft.Azure.Management.TrafficManager.sln
deleted file mode 100644
index 5141b05bbd3df..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/Microsoft.Azure.Management.TrafficManager.sln
+++ /dev/null
@@ -1,40 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.TrafficManager.Tests", "tests\Microsoft.Azure.Management.TrafficManager.Tests.csproj", "{80985D1D-BD35-44B0-BAB4-9701DE4CBE0C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.TrafficManager", "src\Microsoft.Azure.Management.TrafficManager.csproj", "{3BA6DCBB-CE96-4DD3-9AEF-5DCC6E696727}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Test.HttpRecorder", "..\..\mgmtcommon\TestFramework\Microsoft.Azure.Test.HttpRecorder\Microsoft.Azure.Test.HttpRecorder.csproj", "{874E6949-CA8D-46E5-86F1-1DA764DACB75}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "..\..\mgmtcommon\TestFramework\ClientRuntime.Azure.TestFramework\Microsoft.Rest.ClientRuntime.Azure.TestFramework.csproj", "{1E844680-2051-400E-B047-B53F6480C26D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {80985D1D-BD35-44B0-BAB4-9701DE4CBE0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {80985D1D-BD35-44B0-BAB4-9701DE4CBE0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {80985D1D-BD35-44B0-BAB4-9701DE4CBE0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {80985D1D-BD35-44B0-BAB4-9701DE4CBE0C}.Release|Any CPU.Build.0 = Release|Any CPU
- {3BA6DCBB-CE96-4DD3-9AEF-5DCC6E696727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3BA6DCBB-CE96-4DD3-9AEF-5DCC6E696727}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3BA6DCBB-CE96-4DD3-9AEF-5DCC6E696727}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3BA6DCBB-CE96-4DD3-9AEF-5DCC6E696727}.Release|Any CPU.Build.0 = Release|Any CPU
- {874E6949-CA8D-46E5-86F1-1DA764DACB75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {874E6949-CA8D-46E5-86F1-1DA764DACB75}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {874E6949-CA8D-46E5-86F1-1DA764DACB75}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {874E6949-CA8D-46E5-86F1-1DA764DACB75}.Release|Any CPU.Build.0 = Release|Any CPU
- {1E844680-2051-400E-B047-B53F6480C26D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1E844680-2051-400E-B047-B53F6480C26D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1E844680-2051-400E-B047-B53F6480C26D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1E844680-2051-400E-B047-B53F6480C26D}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/TrafficManager-ReRecordAfterCRUpdate.playlist b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/TrafficManager-ReRecordAfterCRUpdate.playlist
deleted file mode 100644
index d173627a758eb..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/TrafficManager-ReRecordAfterCRUpdate.playlist
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperations.cs
deleted file mode 100644
index 150f806d61c1c..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperations.cs
+++ /dev/null
@@ -1,960 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// EndpointsOperations operations.
- ///
- internal partial class EndpointsOperations : IServiceOperations, IEndpointsOperations
- {
- ///
- /// Initializes a new instance of the EndpointsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal EndpointsOperations(TrafficManagerManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the TrafficManagerManagementClient
- ///
- public TrafficManagerManagementClient Client { get; private set; }
-
- ///
- /// Update a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the Update operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (endpointType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointType");
- }
- if (endpointName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("endpointType", endpointType);
- tracingParameters.Add("endpointName", endpointName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{endpointType}", System.Uri.EscapeDataString(endpointType));
- _url = _url.Replace("{endpointName}", System.Uri.EscapeDataString(endpointName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Gets a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager endpoint.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (endpointType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointType");
- }
- if (endpointName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("endpointType", endpointType);
- tracingParameters.Add("endpointName", endpointName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{endpointType}", System.Uri.EscapeDataString(endpointType));
- _url = _url.Replace("{endpointName}", System.Uri.EscapeDataString(endpointName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Create or update a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be created or updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (endpointType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointType");
- }
- if (endpointName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("endpointType", endpointType);
- tracingParameters.Add("endpointName", endpointName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{endpointType}", System.Uri.EscapeDataString(endpointType));
- _url = _url.Replace("{endpointName}", System.Uri.EscapeDataString(endpointName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be deleted.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (endpointType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointType");
- }
- if (endpointName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "endpointName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("endpointType", endpointType);
- tracingParameters.Add("endpointName", endpointName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{endpointType}", System.Uri.EscapeDataString(endpointType));
- _url = _url.Replace("{endpointName}", System.Uri.EscapeDataString(endpointName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperationsExtensions.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperationsExtensions.cs
deleted file mode 100644
index e9608c4c8c244..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/EndpointsOperationsExtensions.cs
+++ /dev/null
@@ -1,253 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for EndpointsOperations.
- ///
- public static partial class EndpointsOperationsExtensions
- {
- ///
- /// Update a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the Update operation.
- ///
- public static Endpoint Update(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
- {
- return operations.UpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Update a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the Update operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task UpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager endpoint.
- ///
- public static Endpoint Get(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
- {
- return operations.GetAsync(resourceGroupName, profileName, endpointType, endpointName).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager endpoint.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Create or update a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be created or updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- public static Endpoint CreateOrUpdate(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Create or update a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be created or updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be deleted.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be deleted.
- ///
- public static DeleteOperationResult Delete(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName)
- {
- return operations.DeleteAsync(resourceGroupName, profileName, endpointType, endpointName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes a Traffic Manager endpoint.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint to
- /// be deleted.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task DeleteAsync(this IEndpointsOperations operations, string resourceGroupName, string profileName, string endpointType, string endpointName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, profileName, endpointType, endpointName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperations.cs
deleted file mode 100644
index 426d13e7ad839..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperations.cs
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// GeographicHierarchiesOperations operations.
- ///
- internal partial class GeographicHierarchiesOperations : IServiceOperations, IGeographicHierarchiesOperations
- {
- ///
- /// Initializes a new instance of the GeographicHierarchiesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal GeographicHierarchiesOperations(TrafficManagerManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the TrafficManagerManagementClient
- ///
- public TrafficManagerManagementClient Client { get; private set; }
-
- ///
- /// Gets the default Geographic Hierarchy used by the Geographic traffic
- /// routing method.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetDefaultWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetDefault", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Network/trafficManagerGeographicHierarchies/default").ToString();
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperationsExtensions.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperationsExtensions.cs
deleted file mode 100644
index 8114d1450db48..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/GeographicHierarchiesOperationsExtensions.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for GeographicHierarchiesOperations.
- ///
- public static partial class GeographicHierarchiesOperationsExtensions
- {
- ///
- /// Gets the default Geographic Hierarchy used by the Geographic traffic
- /// routing method.
- ///
- ///
- /// The operations group for this extension method.
- ///
- public static TrafficManagerGeographicHierarchy GetDefault(this IGeographicHierarchiesOperations operations)
- {
- return operations.GetDefaultAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Gets the default Geographic Hierarchy used by the Geographic traffic
- /// routing method.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetDefaultAsync(this IGeographicHierarchiesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetDefaultWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperations.cs
deleted file mode 100644
index 62e1d6614f2c9..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperations.cs
+++ /dev/null
@@ -1,293 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// HeatMapOperations operations.
- ///
- internal partial class HeatMapOperations : IServiceOperations, IHeatMapOperations
- {
- ///
- /// Initializes a new instance of the HeatMapOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal HeatMapOperations(TrafficManagerManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the TrafficManagerManagementClient
- ///
- public TrafficManagerManagementClient Client { get; private set; }
-
- ///
- /// Gets latest heatmap for Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The top left latitude,longitude pair of the rectangular viewport to query
- /// for.
- ///
- ///
- /// The bottom right latitude,longitude pair of the rectangular viewport to
- /// query for.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, IList topLeft = default(IList), IList botRight = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (topLeft != null)
- {
- if (topLeft.Count > 2)
- {
- throw new ValidationException(ValidationRules.MaxItems, "topLeft", 2);
- }
- if (topLeft.Count < 2)
- {
- throw new ValidationException(ValidationRules.MinItems, "topLeft", 2);
- }
- }
- if (botRight != null)
- {
- if (botRight.Count > 2)
- {
- throw new ValidationException(ValidationRules.MaxItems, "botRight", 2);
- }
- if (botRight.Count < 2)
- {
- throw new ValidationException(ValidationRules.MinItems, "botRight", 2);
- }
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- string heatMapType = "default";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("heatMapType", heatMapType);
- tracingParameters.Add("topLeft", topLeft);
- tracingParameters.Add("botRight", botRight);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{heatMapType}", System.Uri.EscapeDataString(heatMapType));
- List _queryParameters = new List();
- if (topLeft != null)
- {
- _queryParameters.Add(string.Format("topLeft={0}", System.Uri.EscapeDataString(string.Join(",", topLeft))));
- }
- if (botRight != null)
- {
- _queryParameters.Add(string.Format("botRight={0}", System.Uri.EscapeDataString(string.Join(",", botRight))));
- }
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperationsExtensions.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperationsExtensions.cs
deleted file mode 100644
index d43983221f827..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/HeatMapOperationsExtensions.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for HeatMapOperations.
- ///
- public static partial class HeatMapOperationsExtensions
- {
- ///
- /// Gets latest heatmap for Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The top left latitude,longitude pair of the rectangular viewport to query
- /// for.
- ///
- ///
- /// The bottom right latitude,longitude pair of the rectangular viewport to
- /// query for.
- ///
- public static HeatMapModel Get(this IHeatMapOperations operations, string resourceGroupName, string profileName, IList topLeft = default(IList), IList botRight = default(IList))
- {
- return operations.GetAsync(resourceGroupName, profileName, topLeft, botRight).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets latest heatmap for Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The top left latitude,longitude pair of the rectangular viewport to query
- /// for.
- ///
- ///
- /// The bottom right latitude,longitude pair of the rectangular viewport to
- /// query for.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IHeatMapOperations operations, string resourceGroupName, string profileName, IList topLeft = default(IList), IList botRight = default(IList), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, topLeft, botRight, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IEndpointsOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IEndpointsOperations.cs
deleted file mode 100644
index b23f65fbea158..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IEndpointsOperations.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// EndpointsOperations operations.
- ///
- public partial interface IEndpointsOperations
- {
- ///
- /// Update a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// endpoint to be updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the Update
- /// operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint.
- ///
- ///
- /// The name of the Traffic Manager endpoint.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Create or update a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// endpoint to be created or updated.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be created or updated.
- ///
- ///
- /// The Traffic Manager endpoint parameters supplied to the
- /// CreateOrUpdate operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Endpoint parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes a Traffic Manager endpoint.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// endpoint to be deleted.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The type of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The name of the Traffic Manager endpoint to be deleted.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string profileName, string endpointType, string endpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IGeographicHierarchiesOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IGeographicHierarchiesOperations.cs
deleted file mode 100644
index cff406a92f71e..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IGeographicHierarchiesOperations.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// GeographicHierarchiesOperations operations.
- ///
- public partial interface IGeographicHierarchiesOperations
- {
- ///
- /// Gets the default Geographic Hierarchy used by the Geographic
- /// traffic routing method.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetDefaultWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IHeatMapOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IHeatMapOperations.cs
deleted file mode 100644
index 9dca02036de55..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IHeatMapOperations.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// HeatMapOperations operations.
- ///
- public partial interface IHeatMapOperations
- {
- ///
- /// Gets latest heatmap for Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// endpoint.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The top left latitude,longitude pair of the rectangular viewport to
- /// query for.
- ///
- ///
- /// The bottom right latitude,longitude pair of the rectangular
- /// viewport to query for.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, IList topLeft = default(IList), IList botRight = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IProfilesOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IProfilesOperations.cs
deleted file mode 100644
index b8e36e0d82cea..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/IProfilesOperations.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ProfilesOperations operations.
- ///
- public partial interface IProfilesOperations
- {
- ///
- /// Checks the availability of a Traffic Manager Relative DNS name.
- ///
- ///
- /// The name of the resource.
- ///
- ///
- /// The type of the resource.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CheckTrafficManagerRelativeDnsNameAvailabilityWithHttpMessagesAsync(string name = default(string), string type = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all Traffic Manager profiles within a resource group.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// profiles to be listed.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all Traffic Manager profiles within a subscription.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Create or update a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the
- /// CreateOrUpdate operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, Profile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// profile to be deleted.
- ///
- ///
- /// The name of the Traffic Manager profile to be deleted.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string profileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Update a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager
- /// profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the Update
- /// operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, Profile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerManagementClient.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerManagementClient.cs
deleted file mode 100644
index f83e344343974..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerManagementClient.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
-
- ///
- ///
- public partial interface ITrafficManagerManagementClient : System.IDisposable
- {
- ///
- /// The base URI of the service.
- ///
- System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- JsonSerializerSettings SerializationSettings { get; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- JsonSerializerSettings DeserializationSettings { get; }
-
- ///
- /// Credentials needed for the client to connect to Azure.
- ///
- ServiceClientCredentials Credentials { get; }
-
- ///
- /// Gets subscription credentials which uniquely identify Microsoft
- /// Azure subscription. The subscription ID forms part of the URI for
- /// every service call.
- ///
- string SubscriptionId { get; set; }
-
- ///
- /// Client Api Version.
- ///
- string ApiVersion { get; }
-
- ///
- /// The preferred language for the response.
- ///
- string AcceptLanguage { get; set; }
-
- ///
- /// The retry timeout in seconds for Long Running Operations. Default
- /// value is 30.
- ///
- int? LongRunningOperationRetryTimeout { get; set; }
-
- ///
- /// 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; }
-
-
- ///
- /// Gets the IEndpointsOperations.
- ///
- IEndpointsOperations Endpoints { get; }
-
- ///
- /// Gets the IProfilesOperations.
- ///
- IProfilesOperations Profiles { get; }
-
- ///
- /// Gets the IGeographicHierarchiesOperations.
- ///
- IGeographicHierarchiesOperations GeographicHierarchies { get; }
-
- ///
- /// Gets the IHeatMapOperations.
- ///
- IHeatMapOperations HeatMap { get; }
-
- ///
- /// Gets the ITrafficManagerUserMetricsKeysOperations.
- ///
- ITrafficManagerUserMetricsKeysOperations TrafficManagerUserMetricsKeys { get; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerUserMetricsKeysOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerUserMetricsKeysOperations.cs
deleted file mode 100644
index d2651289632e6..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ITrafficManagerUserMetricsKeysOperations.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// TrafficManagerUserMetricsKeysOperations operations.
- ///
- public partial interface ITrafficManagerUserMetricsKeysOperations
- {
- ///
- /// Get the subscription-level key used for Real User Metrics
- /// collection.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Create or update a subscription-level key used for Real User
- /// Metrics collection.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete a subscription-level key used for Real User Metrics
- /// collection.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> DeleteWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordType.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordType.cs
deleted file mode 100644
index 16750c8a599b7..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordType.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for AllowedEndpointRecordType.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(AllowedEndpointRecordTypeConverter))]
- public struct AllowedEndpointRecordType : System.IEquatable
- {
- private AllowedEndpointRecordType(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly AllowedEndpointRecordType DomainName = "DomainName";
-
- public static readonly AllowedEndpointRecordType IPv4Address = "IPv4Address";
-
- public static readonly AllowedEndpointRecordType IPv6Address = "IPv6Address";
-
- public static readonly AllowedEndpointRecordType Any = "Any";
-
-
- ///
- /// Underlying value of enum AllowedEndpointRecordType
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for AllowedEndpointRecordType
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type AllowedEndpointRecordType
- ///
- public bool Equals(AllowedEndpointRecordType e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to AllowedEndpointRecordType
- ///
- public static implicit operator AllowedEndpointRecordType(string value)
- {
- return new AllowedEndpointRecordType(value);
- }
-
- ///
- /// Implicit operator to convert AllowedEndpointRecordType to string
- ///
- public static implicit operator string(AllowedEndpointRecordType e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum AllowedEndpointRecordType
- ///
- public static bool operator == (AllowedEndpointRecordType e1, AllowedEndpointRecordType e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum AllowedEndpointRecordType
- ///
- public static bool operator != (AllowedEndpointRecordType e1, AllowedEndpointRecordType e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for AllowedEndpointRecordType
- ///
- public override bool Equals(object obj)
- {
- return obj is AllowedEndpointRecordType && Equals((AllowedEndpointRecordType)obj);
- }
-
- ///
- /// Returns for hashCode AllowedEndpointRecordType
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordTypeConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordTypeConverter.cs
deleted file mode 100644
index 890cc9208813c..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/AllowedEndpointRecordTypeConverter.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for AllowedEndpointRecordType.
- ///
- public sealed class AllowedEndpointRecordTypeConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to AllowedEndpointRecordType
- /// by the converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(AllowedEndpointRecordType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to AllowedEndpointRecordType.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (AllowedEndpointRecordType)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for AllowedEndpointRecordType for
- /// serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.cs
deleted file mode 100644
index 1b4923bfa6738..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Parameters supplied to check Traffic Manager name operation.
- ///
- public partial class CheckTrafficManagerRelativeDnsNameAvailabilityParameters
- {
- ///
- /// Initializes a new instance of the
- /// CheckTrafficManagerRelativeDnsNameAvailabilityParameters class.
- ///
- public CheckTrafficManagerRelativeDnsNameAvailabilityParameters()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// CheckTrafficManagerRelativeDnsNameAvailabilityParameters class.
- ///
- /// The name of the resource.
- /// The type of the resource.
- public CheckTrafficManagerRelativeDnsNameAvailabilityParameters(string name = default(string), string type = default(string))
- {
- Name = name;
- Type = type;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the name of the resource.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets the type of the resource.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DeleteOperationResult.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DeleteOperationResult.cs
deleted file mode 100644
index 969d3bb44d7a0..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DeleteOperationResult.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The result of the request or operation.
- ///
- public partial class DeleteOperationResult
- {
- ///
- /// Initializes a new instance of the DeleteOperationResult class.
- ///
- public DeleteOperationResult()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the DeleteOperationResult class.
- ///
- /// The result of the operation or
- /// request.
- public DeleteOperationResult(bool? operationResult = default(bool?))
- {
- OperationResult = operationResult;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets the result of the operation or request.
- ///
- [JsonProperty(PropertyName = "boolean")]
- public bool? OperationResult { get; private set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DnsConfig.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DnsConfig.cs
deleted file mode 100644
index de09bce16b96e..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/DnsConfig.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class containing DNS settings in a Traffic Manager profile.
- ///
- public partial class DnsConfig
- {
- ///
- /// Initializes a new instance of the DnsConfig class.
- ///
- public DnsConfig()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the DnsConfig class.
- ///
- /// The relative DNS name provided by this
- /// Traffic Manager profile. This value is combined with the DNS domain
- /// name used by Azure Traffic Manager to form the fully-qualified
- /// domain name (FQDN) of the profile.
- /// The fully-qualified domain name (FQDN) of the
- /// Traffic Manager profile. This is formed from the concatenation of
- /// the RelativeName with the DNS domain used by Azure Traffic
- /// Manager.
- /// The DNS Time-To-Live (TTL), in seconds. This
- /// informs the local DNS resolvers and DNS clients how long to cache
- /// DNS responses provided by this Traffic Manager profile.
- public DnsConfig(string relativeName = default(string), string fqdn = default(string), long? ttl = default(long?))
- {
- RelativeName = relativeName;
- Fqdn = fqdn;
- Ttl = ttl;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the relative DNS name provided by this Traffic Manager
- /// profile. This value is combined with the DNS domain name used by
- /// Azure Traffic Manager to form the fully-qualified domain name
- /// (FQDN) of the profile.
- ///
- [JsonProperty(PropertyName = "relativeName")]
- public string RelativeName { get; set; }
-
- ///
- /// Gets the fully-qualified domain name (FQDN) of the Traffic Manager
- /// profile. This is formed from the concatenation of the RelativeName
- /// with the DNS domain used by Azure Traffic Manager.
- ///
- [JsonProperty(PropertyName = "fqdn")]
- public string Fqdn { get; private set; }
-
- ///
- /// Gets or sets the DNS Time-To-Live (TTL), in seconds. This informs
- /// the local DNS resolvers and DNS clients how long to cache DNS
- /// responses provided by this Traffic Manager profile.
- ///
- [JsonProperty(PropertyName = "ttl")]
- public long? Ttl { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Endpoint.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Endpoint.cs
deleted file mode 100644
index d80513f7ae8b0..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Endpoint.cs
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager endpoint.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class Endpoint : ProxyResource
- {
- ///
- /// Initializes a new instance of the Endpoint class.
- ///
- public Endpoint()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Endpoint class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// The Azure Resource URI of the of the
- /// endpoint. Not applicable to endpoints of type
- /// 'ExternalEndpoints'.
- /// The fully-qualified DNS name or IP address of
- /// the endpoint. Traffic Manager returns this value in DNS responses
- /// to direct traffic to this endpoint.
- /// The status of the endpoint. If the
- /// endpoint is Enabled, it is probed for endpoint health and is
- /// included in the traffic routing method. Possible values include:
- /// 'Enabled', 'Disabled'
- /// The weight of this endpoint when using the
- /// 'Weighted' traffic routing method. Possible values are from 1 to
- /// 1000.
- /// The priority of this endpoint when using the
- /// 'Priority' traffic routing method. Possible values are from 1 to
- /// 1000, lower values represent higher priority. This is an optional
- /// parameter. If specified, it must be specified on all endpoints,
- /// and no two endpoints can share the same priority value.
- /// Specifies the location of the
- /// external or nested endpoints when using the 'Performance' traffic
- /// routing method.
- /// The monitoring status of the
- /// endpoint. Possible values include: 'CheckingEndpoint', 'Online',
- /// 'Degraded', 'Disabled', 'Inactive', 'Stopped'
- /// The minimum number of endpoints
- /// that must be available in the child profile in order for the parent
- /// profile to be considered available. Only applicable to endpoint of
- /// type 'NestedEndpoints'.
- /// The minimum number of IPv4 (DNS
- /// record type A) endpoints that must be available in the child
- /// profile in order for the parent profile to be considered available.
- /// Only applicable to endpoint of type 'NestedEndpoints'.
- /// The minimum number of IPv6 (DNS
- /// record type AAAA) endpoints that must be available in the child
- /// profile in order for the parent profile to be considered available.
- /// Only applicable to endpoint of type 'NestedEndpoints'.
- /// The list of countries/regions mapped to
- /// this endpoint when using the 'Geographic' traffic routing method.
- /// Please consult Traffic Manager Geographic documentation for a full
- /// list of accepted values.
- /// The list of subnets, IP addresses, and/or
- /// address ranges mapped to this endpoint when using the 'Subnet'
- /// traffic routing method. An empty list will match all ranges not
- /// covered by other endpoints.
- /// List of custom headers.
- public Endpoint(string id = default(string), string name = default(string), string type = default(string), string targetResourceId = default(string), string target = default(string), EndpointStatus? endpointStatus = default(EndpointStatus?), long? weight = default(long?), long? priority = default(long?), string endpointLocation = default(string), EndpointMonitorStatus? endpointMonitorStatus = default(EndpointMonitorStatus?), long? minChildEndpoints = default(long?), long? minChildEndpointsIPv4 = default(long?), long? minChildEndpointsIPv6 = default(long?), IList geoMapping = default(IList), IList subnets = default(IList), IList customHeaders = default(IList))
- : base(id, name, type)
- {
- TargetResourceId = targetResourceId;
- Target = target;
- EndpointStatus = endpointStatus;
- Weight = weight;
- Priority = priority;
- EndpointLocation = endpointLocation;
- EndpointMonitorStatus = endpointMonitorStatus;
- MinChildEndpoints = minChildEndpoints;
- MinChildEndpointsIPv4 = minChildEndpointsIPv4;
- MinChildEndpointsIPv6 = minChildEndpointsIPv6;
- GeoMapping = geoMapping;
- Subnets = subnets;
- CustomHeaders = customHeaders;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the Azure Resource URI of the of the endpoint. Not
- /// applicable to endpoints of type 'ExternalEndpoints'.
- ///
- [JsonProperty(PropertyName = "properties.targetResourceId")]
- public string TargetResourceId { get; set; }
-
- ///
- /// Gets or sets the fully-qualified DNS name or IP address of the
- /// endpoint. Traffic Manager returns this value in DNS responses to
- /// direct traffic to this endpoint.
- ///
- [JsonProperty(PropertyName = "properties.target")]
- public string Target { get; set; }
-
- ///
- /// Gets or sets the status of the endpoint. If the endpoint is
- /// Enabled, it is probed for endpoint health and is included in the
- /// traffic routing method. Possible values include: 'Enabled',
- /// 'Disabled'
- ///
- [JsonProperty(PropertyName = "properties.endpointStatus")]
- public EndpointStatus? EndpointStatus { get; set; }
-
- ///
- /// Gets or sets the weight of this endpoint when using the 'Weighted'
- /// traffic routing method. Possible values are from 1 to 1000.
- ///
- [JsonProperty(PropertyName = "properties.weight")]
- public long? Weight { get; set; }
-
- ///
- /// Gets or sets the priority of this endpoint when using the
- /// 'Priority' traffic routing method. Possible values are from 1 to
- /// 1000, lower values represent higher priority. This is an optional
- /// parameter. If specified, it must be specified on all endpoints,
- /// and no two endpoints can share the same priority value.
- ///
- [JsonProperty(PropertyName = "properties.priority")]
- public long? Priority { get; set; }
-
- ///
- /// Gets or sets specifies the location of the external or nested
- /// endpoints when using the 'Performance' traffic routing method.
- ///
- [JsonProperty(PropertyName = "properties.endpointLocation")]
- public string EndpointLocation { get; set; }
-
- ///
- /// Gets or sets the monitoring status of the endpoint. Possible values
- /// include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled',
- /// 'Inactive', 'Stopped'
- ///
- [JsonProperty(PropertyName = "properties.endpointMonitorStatus")]
- public EndpointMonitorStatus? EndpointMonitorStatus { get; set; }
-
- ///
- /// Gets or sets the minimum number of endpoints that must be available
- /// in the child profile in order for the parent profile to be
- /// considered available. Only applicable to endpoint of type
- /// 'NestedEndpoints'.
- ///
- [JsonProperty(PropertyName = "properties.minChildEndpoints")]
- public long? MinChildEndpoints { get; set; }
-
- ///
- /// Gets or sets the minimum number of IPv4 (DNS record type A)
- /// endpoints that must be available in the child profile in order for
- /// the parent profile to be considered available. Only applicable to
- /// endpoint of type 'NestedEndpoints'.
- ///
- [JsonProperty(PropertyName = "properties.minChildEndpointsIPv4")]
- public long? MinChildEndpointsIPv4 { get; set; }
-
- ///
- /// Gets or sets the minimum number of IPv6 (DNS record type AAAA)
- /// endpoints that must be available in the child profile in order for
- /// the parent profile to be considered available. Only applicable to
- /// endpoint of type 'NestedEndpoints'.
- ///
- [JsonProperty(PropertyName = "properties.minChildEndpointsIPv6")]
- public long? MinChildEndpointsIPv6 { get; set; }
-
- ///
- /// Gets or sets the list of countries/regions mapped to this endpoint
- /// when using the 'Geographic' traffic routing method. Please consult
- /// Traffic Manager Geographic documentation for a full list of
- /// accepted values.
- ///
- [JsonProperty(PropertyName = "properties.geoMapping")]
- public IList GeoMapping { get; set; }
-
- ///
- /// Gets or sets the list of subnets, IP addresses, and/or address
- /// ranges mapped to this endpoint when using the 'Subnet' traffic
- /// routing method. An empty list will match all ranges not covered by
- /// other endpoints.
- ///
- [JsonProperty(PropertyName = "properties.subnets")]
- public IList Subnets { get; set; }
-
- ///
- /// Gets or sets list of custom headers.
- ///
- [JsonProperty(PropertyName = "properties.customHeaders")]
- public IList CustomHeaders { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatus.cs
deleted file mode 100644
index 07f258913ac55..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatus.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for EndpointMonitorStatus.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(EndpointMonitorStatusConverter))]
- public struct EndpointMonitorStatus : System.IEquatable
- {
- private EndpointMonitorStatus(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly EndpointMonitorStatus CheckingEndpoint = "CheckingEndpoint";
-
- public static readonly EndpointMonitorStatus Online = "Online";
-
- public static readonly EndpointMonitorStatus Degraded = "Degraded";
-
- public static readonly EndpointMonitorStatus Disabled = "Disabled";
-
- public static readonly EndpointMonitorStatus Inactive = "Inactive";
-
- public static readonly EndpointMonitorStatus Stopped = "Stopped";
-
-
- ///
- /// Underlying value of enum EndpointMonitorStatus
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for EndpointMonitorStatus
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type EndpointMonitorStatus
- ///
- public bool Equals(EndpointMonitorStatus e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to EndpointMonitorStatus
- ///
- public static implicit operator EndpointMonitorStatus(string value)
- {
- return new EndpointMonitorStatus(value);
- }
-
- ///
- /// Implicit operator to convert EndpointMonitorStatus to string
- ///
- public static implicit operator string(EndpointMonitorStatus e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum EndpointMonitorStatus
- ///
- public static bool operator == (EndpointMonitorStatus e1, EndpointMonitorStatus e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum EndpointMonitorStatus
- ///
- public static bool operator != (EndpointMonitorStatus e1, EndpointMonitorStatus e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for EndpointMonitorStatus
- ///
- public override bool Equals(object obj)
- {
- return obj is EndpointMonitorStatus && Equals((EndpointMonitorStatus)obj);
- }
-
- ///
- /// Returns for hashCode EndpointMonitorStatus
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatusConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatusConverter.cs
deleted file mode 100644
index 3db806c1215a3..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatusConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for EndpointMonitorStatus.
- ///
- public sealed class EndpointMonitorStatusConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to EndpointMonitorStatus by
- /// the converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(EndpointMonitorStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to EndpointMonitorStatus.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (EndpointMonitorStatus)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for EndpointMonitorStatus for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesCustomHeadersItem.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesCustomHeadersItem.cs
deleted file mode 100644
index 975ed8009c4dd..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesCustomHeadersItem.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Custom header name and value.
- ///
- public partial class EndpointPropertiesCustomHeadersItem
- {
- ///
- /// Initializes a new instance of the
- /// EndpointPropertiesCustomHeadersItem class.
- ///
- public EndpointPropertiesCustomHeadersItem()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// EndpointPropertiesCustomHeadersItem class.
- ///
- /// Header name.
- /// Header value.
- public EndpointPropertiesCustomHeadersItem(string name = default(string), string value = default(string))
- {
- Name = name;
- Value = value;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets header name.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets header value.
- ///
- [JsonProperty(PropertyName = "value")]
- public string Value { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesSubnetsItem.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesSubnetsItem.cs
deleted file mode 100644
index bbee6cd131b43..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointPropertiesSubnetsItem.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Subnet first address, scope, and/or last address.
- ///
- public partial class EndpointPropertiesSubnetsItem
- {
- ///
- /// Initializes a new instance of the EndpointPropertiesSubnetsItem
- /// class.
- ///
- public EndpointPropertiesSubnetsItem()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the EndpointPropertiesSubnetsItem
- /// class.
- ///
- /// First address in the subnet.
- /// Last address in the subnet.
- /// Block size (number of leading bits in the
- /// subnet mask).
- public EndpointPropertiesSubnetsItem(string first = default(string), string last = default(string), int? scope = default(int?))
- {
- First = first;
- Last = last;
- Scope = scope;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets first address in the subnet.
- ///
- [JsonProperty(PropertyName = "first")]
- public string First { get; set; }
-
- ///
- /// Gets or sets last address in the subnet.
- ///
- [JsonProperty(PropertyName = "last")]
- public string Last { get; set; }
-
- ///
- /// Gets or sets block size (number of leading bits in the subnet
- /// mask).
- ///
- [JsonProperty(PropertyName = "scope")]
- public int? Scope { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs
deleted file mode 100644
index b37d0b66afd59..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for EndpointStatus.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(EndpointStatusConverter))]
- public struct EndpointStatus : System.IEquatable
- {
- private EndpointStatus(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly EndpointStatus Enabled = "Enabled";
-
- public static readonly EndpointStatus Disabled = "Disabled";
-
-
- ///
- /// Underlying value of enum EndpointStatus
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for EndpointStatus
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type EndpointStatus
- ///
- public bool Equals(EndpointStatus e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to EndpointStatus
- ///
- public static implicit operator EndpointStatus(string value)
- {
- return new EndpointStatus(value);
- }
-
- ///
- /// Implicit operator to convert EndpointStatus to string
- ///
- public static implicit operator string(EndpointStatus e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum EndpointStatus
- ///
- public static bool operator == (EndpointStatus e1, EndpointStatus e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum EndpointStatus
- ///
- public static bool operator != (EndpointStatus e1, EndpointStatus e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for EndpointStatus
- ///
- public override bool Equals(object obj)
- {
- return obj is EndpointStatus && Equals((EndpointStatus)obj);
- }
-
- ///
- /// Returns for hashCode EndpointStatus
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatusConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatusConverter.cs
deleted file mode 100644
index f7380de602002..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatusConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for EndpointStatus.
- ///
- public sealed class EndpointStatusConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to EndpointStatus by the
- /// converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(EndpointStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to EndpointStatus.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (EndpointStatus)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for EndpointStatus for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapEndpoint.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapEndpoint.cs
deleted file mode 100644
index b07e8cdf01492..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapEndpoint.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class which is a sparse representation of a Traffic Manager endpoint.
- ///
- public partial class HeatMapEndpoint
- {
- ///
- /// Initializes a new instance of the HeatMapEndpoint class.
- ///
- public HeatMapEndpoint()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the HeatMapEndpoint class.
- ///
- /// The ARM Resource ID of this Traffic
- /// Manager endpoint.
- /// A number uniquely identifying this
- /// endpoint in query experiences.
- public HeatMapEndpoint(string resourceId = default(string), int? endpointId = default(int?))
- {
- ResourceId = resourceId;
- EndpointId = endpointId;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the ARM Resource ID of this Traffic Manager endpoint.
- ///
- [JsonProperty(PropertyName = "resourceId")]
- public string ResourceId { get; set; }
-
- ///
- /// Gets or sets a number uniquely identifying this endpoint in query
- /// experiences.
- ///
- [JsonProperty(PropertyName = "endpointId")]
- public int? EndpointId { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs
deleted file mode 100644
index 5b52875f39088..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager HeatMap.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class HeatMapModel : ProxyResource
- {
- ///
- /// Initializes a new instance of the HeatMapModel class.
- ///
- public HeatMapModel()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the HeatMapModel class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// The beginning of the time window for this
- /// HeatMap, inclusive.
- /// The ending of the time window for this
- /// HeatMap, exclusive.
- /// The endpoints used in this HeatMap
- /// calculation.
- /// The traffic flows produced in this
- /// HeatMap calculation.
- public HeatMapModel(string id = default(string), string name = default(string), string type = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList endpoints = default(IList), IList trafficFlows = default(IList))
- : base(id, name, type)
- {
- StartTime = startTime;
- EndTime = endTime;
- Endpoints = endpoints;
- TrafficFlows = trafficFlows;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the beginning of the time window for this HeatMap,
- /// inclusive.
- ///
- [JsonProperty(PropertyName = "properties.startTime")]
- public System.DateTime? StartTime { get; set; }
-
- ///
- /// Gets or sets the ending of the time window for this HeatMap,
- /// exclusive.
- ///
- [JsonProperty(PropertyName = "properties.endTime")]
- public System.DateTime? EndTime { get; set; }
-
- ///
- /// Gets or sets the endpoints used in this HeatMap calculation.
- ///
- [JsonProperty(PropertyName = "properties.endpoints")]
- public IList Endpoints { get; set; }
-
- ///
- /// Gets or sets the traffic flows produced in this HeatMap
- /// calculation.
- ///
- [JsonProperty(PropertyName = "properties.trafficFlows")]
- public IList TrafficFlows { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfig.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfig.cs
deleted file mode 100644
index 2cdda6773c912..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfig.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class containing endpoint monitoring settings in a Traffic Manager
- /// profile.
- ///
- public partial class MonitorConfig
- {
- ///
- /// Initializes a new instance of the MonitorConfig class.
- ///
- public MonitorConfig()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the MonitorConfig class.
- ///
- /// The profile-level monitoring
- /// status of the Traffic Manager profile. Possible values include:
- /// 'CheckingEndpoints', 'Online', 'Degraded', 'Disabled',
- /// 'Inactive'
- /// The protocol (HTTP, HTTPS or TCP) used to
- /// probe for endpoint health. Possible values include: 'HTTP',
- /// 'HTTPS', 'TCP'
- /// The TCP port used to probe for endpoint
- /// health.
- /// The path relative to the endpoint domain name
- /// used to probe for endpoint health.
- /// The monitor interval for endpoints
- /// in this profile. This is the interval at which Traffic Manager will
- /// check the health of each endpoint in this profile.
- /// The monitor timeout for endpoints in
- /// this profile. This is the time that Traffic Manager allows
- /// endpoints in this profile to response to the health check.
- /// The number of consecutive
- /// failed health check that Traffic Manager tolerates before declaring
- /// an endpoint in this profile Degraded after the next failed health
- /// check.
- /// List of custom headers.
- /// List of expected status code
- /// ranges.
- public MonitorConfig(ProfileMonitorStatus? profileMonitorStatus = default(ProfileMonitorStatus?), MonitorProtocol? protocol = default(MonitorProtocol?), long? port = default(long?), string path = default(string), long? intervalInSeconds = default(long?), long? timeoutInSeconds = default(long?), long? toleratedNumberOfFailures = default(long?), IList customHeaders = default(IList), IList expectedStatusCodeRanges = default(IList))
- {
- ProfileMonitorStatus = profileMonitorStatus;
- Protocol = protocol;
- Port = port;
- Path = path;
- IntervalInSeconds = intervalInSeconds;
- TimeoutInSeconds = timeoutInSeconds;
- ToleratedNumberOfFailures = toleratedNumberOfFailures;
- CustomHeaders = customHeaders;
- ExpectedStatusCodeRanges = expectedStatusCodeRanges;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the profile-level monitoring status of the Traffic
- /// Manager profile. Possible values include: 'CheckingEndpoints',
- /// 'Online', 'Degraded', 'Disabled', 'Inactive'
- ///
- [JsonProperty(PropertyName = "profileMonitorStatus")]
- public ProfileMonitorStatus? ProfileMonitorStatus { get; set; }
-
- ///
- /// Gets or sets the protocol (HTTP, HTTPS or TCP) used to probe for
- /// endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP'
- ///
- [JsonProperty(PropertyName = "protocol")]
- public MonitorProtocol? Protocol { get; set; }
-
- ///
- /// Gets or sets the TCP port used to probe for endpoint health.
- ///
- [JsonProperty(PropertyName = "port")]
- public long? Port { get; set; }
-
- ///
- /// Gets or sets the path relative to the endpoint domain name used to
- /// probe for endpoint health.
- ///
- [JsonProperty(PropertyName = "path")]
- public string Path { get; set; }
-
- ///
- /// Gets or sets the monitor interval for endpoints in this profile.
- /// This is the interval at which Traffic Manager will check the health
- /// of each endpoint in this profile.
- ///
- [JsonProperty(PropertyName = "intervalInSeconds")]
- public long? IntervalInSeconds { get; set; }
-
- ///
- /// Gets or sets the monitor timeout for endpoints in this profile.
- /// This is the time that Traffic Manager allows endpoints in this
- /// profile to response to the health check.
- ///
- [JsonProperty(PropertyName = "timeoutInSeconds")]
- public long? TimeoutInSeconds { get; set; }
-
- ///
- /// Gets or sets the number of consecutive failed health check that
- /// Traffic Manager tolerates before declaring an endpoint in this
- /// profile Degraded after the next failed health check.
- ///
- [JsonProperty(PropertyName = "toleratedNumberOfFailures")]
- public long? ToleratedNumberOfFailures { get; set; }
-
- ///
- /// Gets or sets list of custom headers.
- ///
- [JsonProperty(PropertyName = "customHeaders")]
- public IList CustomHeaders { get; set; }
-
- ///
- /// Gets or sets list of expected status code ranges.
- ///
- [JsonProperty(PropertyName = "expectedStatusCodeRanges")]
- public IList ExpectedStatusCodeRanges { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigCustomHeadersItem.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigCustomHeadersItem.cs
deleted file mode 100644
index e312216bb872f..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigCustomHeadersItem.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Custom header name and value.
- ///
- public partial class MonitorConfigCustomHeadersItem
- {
- ///
- /// Initializes a new instance of the MonitorConfigCustomHeadersItem
- /// class.
- ///
- public MonitorConfigCustomHeadersItem()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the MonitorConfigCustomHeadersItem
- /// class.
- ///
- /// Header name.
- /// Header value.
- public MonitorConfigCustomHeadersItem(string name = default(string), string value = default(string))
- {
- Name = name;
- Value = value;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets header name.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets header value.
- ///
- [JsonProperty(PropertyName = "value")]
- public string Value { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigExpectedStatusCodeRangesItem.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigExpectedStatusCodeRangesItem.cs
deleted file mode 100644
index bc7e238d43195..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfigExpectedStatusCodeRangesItem.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Min and max value of a status code range.
- ///
- public partial class MonitorConfigExpectedStatusCodeRangesItem
- {
- ///
- /// Initializes a new instance of the
- /// MonitorConfigExpectedStatusCodeRangesItem class.
- ///
- public MonitorConfigExpectedStatusCodeRangesItem()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// MonitorConfigExpectedStatusCodeRangesItem class.
- ///
- /// Min status code.
- /// Max status code.
- public MonitorConfigExpectedStatusCodeRangesItem(int? min = default(int?), int? max = default(int?))
- {
- Min = min;
- Max = max;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets min status code.
- ///
- [JsonProperty(PropertyName = "min")]
- public int? Min { get; set; }
-
- ///
- /// Gets or sets max status code.
- ///
- [JsonProperty(PropertyName = "max")]
- public int? Max { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocol.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocol.cs
deleted file mode 100644
index 9f20452d5727b..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocol.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for MonitorProtocol.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(MonitorProtocolConverter))]
- public struct MonitorProtocol : System.IEquatable
- {
- private MonitorProtocol(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly MonitorProtocol HTTP = "HTTP";
-
- public static readonly MonitorProtocol HTTPS = "HTTPS";
-
- public static readonly MonitorProtocol TCP = "TCP";
-
-
- ///
- /// Underlying value of enum MonitorProtocol
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for MonitorProtocol
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type MonitorProtocol
- ///
- public bool Equals(MonitorProtocol e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to MonitorProtocol
- ///
- public static implicit operator MonitorProtocol(string value)
- {
- return new MonitorProtocol(value);
- }
-
- ///
- /// Implicit operator to convert MonitorProtocol to string
- ///
- public static implicit operator string(MonitorProtocol e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum MonitorProtocol
- ///
- public static bool operator == (MonitorProtocol e1, MonitorProtocol e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum MonitorProtocol
- ///
- public static bool operator != (MonitorProtocol e1, MonitorProtocol e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for MonitorProtocol
- ///
- public override bool Equals(object obj)
- {
- return obj is MonitorProtocol && Equals((MonitorProtocol)obj);
- }
-
- ///
- /// Returns for hashCode MonitorProtocol
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocolConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocolConverter.cs
deleted file mode 100644
index 492df887d82b8..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocolConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for MonitorProtocol.
- ///
- public sealed class MonitorProtocolConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to MonitorProtocol by the
- /// converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(MonitorProtocol).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to MonitorProtocol.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (MonitorProtocol)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for MonitorProtocol for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Page.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Page.cs
deleted file mode 100644
index af159a6a332bc..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Page.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
-
- ///
- /// Defines a page in Azure responses.
- ///
- /// Type of the page content items
- [JsonObject]
- public class Page : IPage
- {
- ///
- /// Gets the link to the next page.
- ///
- [JsonProperty("")]
- public string NextPageLink { get; private set; }
-
- [JsonProperty("value")]
- private IList Items{ get; set; }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- public IEnumerator GetEnumerator()
- {
- return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
- }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs
deleted file mode 100644
index 3282147b6d368..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager profile.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class Profile : TrackedResource
- {
- ///
- /// Initializes a new instance of the Profile class.
- ///
- public Profile()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Profile class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// Resource tags.
- /// The Azure Region where the resource
- /// lives
- /// The status of the Traffic Manager
- /// profile. Possible values include: 'Enabled', 'Disabled'
- /// The traffic routing method of
- /// the Traffic Manager profile. Possible values include:
- /// 'Performance', 'Priority', 'Weighted', 'Geographic', 'MultiValue',
- /// 'Subnet'
- /// The DNS settings of the Traffic Manager
- /// profile.
- /// The endpoint monitoring settings of the
- /// Traffic Manager profile.
- /// The list of endpoints in the Traffic
- /// Manager profile.
- /// Indicates whether Traffic
- /// View is 'Enabled' or 'Disabled' for the Traffic Manager profile.
- /// Null, indicates 'Disabled'. Enabling this feature will increase the
- /// cost of the Traffic Manage profile. Possible values include:
- /// 'Enabled', 'Disabled'
- /// The list of allowed
- /// endpoint record types.
- /// Maximum number of endpoints to be returned
- /// for MultiValue routing type.
- public Profile(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), ProfileStatus? profileStatus = default(ProfileStatus?), TrafficRoutingMethod? trafficRoutingMethod = default(TrafficRoutingMethod?), DnsConfig dnsConfig = default(DnsConfig), MonitorConfig monitorConfig = default(MonitorConfig), IList endpoints = default(IList), TrafficViewEnrollmentStatus? trafficViewEnrollmentStatus = default(TrafficViewEnrollmentStatus?), IList allowedEndpointRecordTypes = default(IList), long? maxReturn = default(long?))
- : base(id, name, type, tags, location)
- {
- ProfileStatus = profileStatus;
- TrafficRoutingMethod = trafficRoutingMethod;
- DnsConfig = dnsConfig;
- MonitorConfig = monitorConfig;
- Endpoints = endpoints;
- TrafficViewEnrollmentStatus = trafficViewEnrollmentStatus;
- AllowedEndpointRecordTypes = allowedEndpointRecordTypes;
- MaxReturn = maxReturn;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the status of the Traffic Manager profile. Possible
- /// values include: 'Enabled', 'Disabled'
- ///
- [JsonProperty(PropertyName = "properties.profileStatus")]
- public ProfileStatus? ProfileStatus { get; set; }
-
- ///
- /// Gets or sets the traffic routing method of the Traffic Manager
- /// profile. Possible values include: 'Performance', 'Priority',
- /// 'Weighted', 'Geographic', 'MultiValue', 'Subnet'
- ///
- [JsonProperty(PropertyName = "properties.trafficRoutingMethod")]
- public TrafficRoutingMethod? TrafficRoutingMethod { get; set; }
-
- ///
- /// Gets or sets the DNS settings of the Traffic Manager profile.
- ///
- [JsonProperty(PropertyName = "properties.dnsConfig")]
- public DnsConfig DnsConfig { get; set; }
-
- ///
- /// Gets or sets the endpoint monitoring settings of the Traffic
- /// Manager profile.
- ///
- [JsonProperty(PropertyName = "properties.monitorConfig")]
- public MonitorConfig MonitorConfig { get; set; }
-
- ///
- /// Gets or sets the list of endpoints in the Traffic Manager profile.
- ///
- [JsonProperty(PropertyName = "properties.endpoints")]
- public IList Endpoints { get; set; }
-
- ///
- /// Gets or sets indicates whether Traffic View is 'Enabled' or
- /// 'Disabled' for the Traffic Manager profile. Null, indicates
- /// 'Disabled'. Enabling this feature will increase the cost of the
- /// Traffic Manage profile. Possible values include: 'Enabled',
- /// 'Disabled'
- ///
- [JsonProperty(PropertyName = "properties.trafficViewEnrollmentStatus")]
- public TrafficViewEnrollmentStatus? TrafficViewEnrollmentStatus { get; set; }
-
- ///
- /// Gets or sets the list of allowed endpoint record types.
- ///
- [JsonProperty(PropertyName = "properties.allowedEndpointRecordTypes")]
- public IList AllowedEndpointRecordTypes { get; set; }
-
- ///
- /// Gets or sets maximum number of endpoints to be returned for
- /// MultiValue routing type.
- ///
- [JsonProperty(PropertyName = "properties.maxReturn")]
- public long? MaxReturn { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatus.cs
deleted file mode 100644
index 1837646a45177..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatus.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for ProfileMonitorStatus.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(ProfileMonitorStatusConverter))]
- public struct ProfileMonitorStatus : System.IEquatable
- {
- private ProfileMonitorStatus(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly ProfileMonitorStatus CheckingEndpoints = "CheckingEndpoints";
-
- public static readonly ProfileMonitorStatus Online = "Online";
-
- public static readonly ProfileMonitorStatus Degraded = "Degraded";
-
- public static readonly ProfileMonitorStatus Disabled = "Disabled";
-
- public static readonly ProfileMonitorStatus Inactive = "Inactive";
-
-
- ///
- /// Underlying value of enum ProfileMonitorStatus
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for ProfileMonitorStatus
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type ProfileMonitorStatus
- ///
- public bool Equals(ProfileMonitorStatus e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to ProfileMonitorStatus
- ///
- public static implicit operator ProfileMonitorStatus(string value)
- {
- return new ProfileMonitorStatus(value);
- }
-
- ///
- /// Implicit operator to convert ProfileMonitorStatus to string
- ///
- public static implicit operator string(ProfileMonitorStatus e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum ProfileMonitorStatus
- ///
- public static bool operator == (ProfileMonitorStatus e1, ProfileMonitorStatus e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum ProfileMonitorStatus
- ///
- public static bool operator != (ProfileMonitorStatus e1, ProfileMonitorStatus e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for ProfileMonitorStatus
- ///
- public override bool Equals(object obj)
- {
- return obj is ProfileMonitorStatus && Equals((ProfileMonitorStatus)obj);
- }
-
- ///
- /// Returns for hashCode ProfileMonitorStatus
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatusConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatusConverter.cs
deleted file mode 100644
index 149bc37fe4704..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatusConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for ProfileMonitorStatus.
- ///
- public sealed class ProfileMonitorStatusConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to ProfileMonitorStatus by
- /// the converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(ProfileMonitorStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to ProfileMonitorStatus.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (ProfileMonitorStatus)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for ProfileMonitorStatus for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatus.cs
deleted file mode 100644
index 8e8a6aee0c713..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatus.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for ProfileStatus.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(ProfileStatusConverter))]
- public struct ProfileStatus : System.IEquatable
- {
- private ProfileStatus(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly ProfileStatus Enabled = "Enabled";
-
- public static readonly ProfileStatus Disabled = "Disabled";
-
-
- ///
- /// Underlying value of enum ProfileStatus
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for ProfileStatus
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type ProfileStatus
- ///
- public bool Equals(ProfileStatus e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to ProfileStatus
- ///
- public static implicit operator ProfileStatus(string value)
- {
- return new ProfileStatus(value);
- }
-
- ///
- /// Implicit operator to convert ProfileStatus to string
- ///
- public static implicit operator string(ProfileStatus e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum ProfileStatus
- ///
- public static bool operator == (ProfileStatus e1, ProfileStatus e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum ProfileStatus
- ///
- public static bool operator != (ProfileStatus e1, ProfileStatus e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for ProfileStatus
- ///
- public override bool Equals(object obj)
- {
- return obj is ProfileStatus && Equals((ProfileStatus)obj);
- }
-
- ///
- /// Returns for hashCode ProfileStatus
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatusConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatusConverter.cs
deleted file mode 100644
index 82ea466b8d937..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatusConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for ProfileStatus.
- ///
- public sealed class ProfileStatusConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to ProfileStatus by the
- /// converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(ProfileStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to ProfileStatus.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (ProfileStatus)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for ProfileStatus for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProxyResource.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProxyResource.cs
deleted file mode 100644
index 3bc78225bf248..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProxyResource.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using System.Linq;
-
- ///
- /// The resource model definition for a ARM proxy resource. It will have
- /// everything other than required location and tags
- ///
- public partial class ProxyResource : Resource
- {
- ///
- /// Initializes a new instance of the ProxyResource class.
- ///
- public ProxyResource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ProxyResource class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
- : base(id, name, type)
- {
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/QueryExperience.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/QueryExperience.cs
deleted file mode 100644
index c346241fcb40e..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/QueryExperience.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager HeatMap query experience
- /// properties.
- ///
- public partial class QueryExperience
- {
- ///
- /// Initializes a new instance of the QueryExperience class.
- ///
- public QueryExperience()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the QueryExperience class.
- ///
- /// The id of the endpoint from the
- /// 'endpoints' array which these queries were routed to.
- /// The number of queries originating from
- /// this location.
- /// The latency experienced by queries
- /// originating from this location.
- public QueryExperience(int endpointId, int queryCount, double? latency = default(double?))
- {
- EndpointId = endpointId;
- QueryCount = queryCount;
- Latency = latency;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the id of the endpoint from the 'endpoints' array
- /// which these queries were routed to.
- ///
- [JsonProperty(PropertyName = "endpointId")]
- public int EndpointId { get; set; }
-
- ///
- /// Gets or sets the number of queries originating from this location.
- ///
- [JsonProperty(PropertyName = "queryCount")]
- public int QueryCount { get; set; }
-
- ///
- /// Gets or sets the latency experienced by queries originating from
- /// this location.
- ///
- [JsonProperty(PropertyName = "latency")]
- public double? Latency { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- //Nothing to validate
- }
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Region.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Region.cs
deleted file mode 100644
index a1d29b4e8ab7d..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Region.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class representing a region in the Geographic hierarchy used with the
- /// Geographic traffic routing method.
- ///
- public partial class Region
- {
- ///
- /// Initializes a new instance of the Region class.
- ///
- public Region()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Region class.
- ///
- /// The code of the region
- /// The name of the region
- /// The list of Regions grouped under this Region
- /// in the Geographic Hierarchy.
- public Region(string code = default(string), string name = default(string), IList regions = default(IList))
- {
- Code = code;
- Name = name;
- Regions = regions;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the code of the region
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets the name of the region
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets the list of Regions grouped under this Region in the
- /// Geographic Hierarchy.
- ///
- [JsonProperty(PropertyName = "regions")]
- public IList Regions { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Resource.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Resource.cs
deleted file mode 100644
index 0ebe8a3577ac8..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Resource.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The core properties of ARM resources
- ///
- public partial class Resource : IResource
- {
- ///
- /// Initializes a new instance of the Resource class.
- ///
- public Resource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Resource class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- public Resource(string id = default(string), string name = default(string), string type = default(string))
- {
- Id = id;
- Name = name;
- Type = type;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; set; }
-
- ///
- /// Gets or sets the name of the resource
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets the type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrackedResource.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrackedResource.cs
deleted file mode 100644
index 22283a01397b5..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrackedResource.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// The resource model definition for a ARM tracked top level resource
- ///
- public partial class TrackedResource : Resource
- {
- ///
- /// Initializes a new instance of the TrackedResource class.
- ///
- public TrackedResource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the TrackedResource class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// Resource tags.
- /// The Azure Region where the resource
- /// lives
- public TrackedResource(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string))
- : base(id, name, type)
- {
- Tags = tags;
- Location = location;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets resource tags.
- ///
- [JsonProperty(PropertyName = "tags")]
- public IDictionary Tags { get; set; }
-
- ///
- /// Gets or sets the Azure Region where the resource lives
- ///
- [JsonProperty(PropertyName = "location")]
- public string Location { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficFlow.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficFlow.cs
deleted file mode 100644
index 5687c84a4744f..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficFlow.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager HeatMap traffic flow properties.
- ///
- public partial class TrafficFlow
- {
- ///
- /// Initializes a new instance of the TrafficFlow class.
- ///
- public TrafficFlow()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the TrafficFlow class.
- ///
- /// The IP address that this query experience
- /// originated from.
- /// The approximate latitude that these queries
- /// originated from.
- /// The approximate longitude that these
- /// queries originated from.
- /// The query experiences produced in
- /// this HeatMap calculation.
- public TrafficFlow(string sourceIp = default(string), double? latitude = default(double?), double? longitude = default(double?), IList queryExperiences = default(IList))
- {
- SourceIp = sourceIp;
- Latitude = latitude;
- Longitude = longitude;
- QueryExperiences = queryExperiences;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the IP address that this query experience originated
- /// from.
- ///
- [JsonProperty(PropertyName = "sourceIp")]
- public string SourceIp { get; set; }
-
- ///
- /// Gets or sets the approximate latitude that these queries originated
- /// from.
- ///
- [JsonProperty(PropertyName = "latitude")]
- public double? Latitude { get; set; }
-
- ///
- /// Gets or sets the approximate longitude that these queries
- /// originated from.
- ///
- [JsonProperty(PropertyName = "longitude")]
- public double? Longitude { get; set; }
-
- ///
- /// Gets or sets the query experiences produced in this HeatMap
- /// calculation.
- ///
- [JsonProperty(PropertyName = "queryExperiences")]
- public IList QueryExperiences { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerGeographicHierarchy.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerGeographicHierarchy.cs
deleted file mode 100644
index 8f7104eab659f..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerGeographicHierarchy.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class representing the Geographic hierarchy used with the Geographic
- /// traffic routing method.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class TrafficManagerGeographicHierarchy : ProxyResource
- {
- ///
- /// Initializes a new instance of the TrafficManagerGeographicHierarchy
- /// class.
- ///
- public TrafficManagerGeographicHierarchy()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerGeographicHierarchy
- /// class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// The region at the root of the
- /// hierarchy from all the regions in the hierarchy can be
- /// retrieved.
- public TrafficManagerGeographicHierarchy(string id = default(string), string name = default(string), string type = default(string), Region geographicHierarchy = default(Region))
- : base(id, name, type)
- {
- GeographicHierarchy = geographicHierarchy;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the region at the root of the hierarchy from all the
- /// regions in the hierarchy can be retrieved.
- ///
- [JsonProperty(PropertyName = "properties.geographicHierarchy")]
- public Region GeographicHierarchy { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerNameAvailability.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerNameAvailability.cs
deleted file mode 100644
index bc02445211fc7..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerNameAvailability.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class representing a Traffic Manager Name Availability response.
- ///
- public partial class TrafficManagerNameAvailability
- {
- ///
- /// Initializes a new instance of the TrafficManagerNameAvailability
- /// class.
- ///
- public TrafficManagerNameAvailability()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerNameAvailability
- /// class.
- ///
- /// The relative name.
- /// Traffic Manager profile resource type.
- /// Describes whether the relative name is
- /// available or not.
- /// The reason why the name is not available, when
- /// applicable.
- /// Descriptive message that explains why the
- /// name is not available, when applicable.
- public TrafficManagerNameAvailability(string name = default(string), string type = default(string), bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
- {
- Name = name;
- Type = type;
- NameAvailable = nameAvailable;
- Reason = reason;
- Message = message;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the relative name.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets traffic Manager profile resource type.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
- ///
- /// Gets or sets describes whether the relative name is available or
- /// not.
- ///
- [JsonProperty(PropertyName = "nameAvailable")]
- public bool? NameAvailable { get; set; }
-
- ///
- /// Gets or sets the reason why the name is not available, when
- /// applicable.
- ///
- [JsonProperty(PropertyName = "reason")]
- public string Reason { get; set; }
-
- ///
- /// Gets or sets descriptive message that explains why the name is not
- /// available, when applicable.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethod.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethod.cs
deleted file mode 100644
index 4fe13984f5ea8..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethod.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for TrafficRoutingMethod.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(TrafficRoutingMethodConverter))]
- public struct TrafficRoutingMethod : System.IEquatable
- {
- private TrafficRoutingMethod(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly TrafficRoutingMethod Performance = "Performance";
-
- public static readonly TrafficRoutingMethod Priority = "Priority";
-
- public static readonly TrafficRoutingMethod Weighted = "Weighted";
-
- public static readonly TrafficRoutingMethod Geographic = "Geographic";
-
- public static readonly TrafficRoutingMethod MultiValue = "MultiValue";
-
- public static readonly TrafficRoutingMethod Subnet = "Subnet";
-
-
- ///
- /// Underlying value of enum TrafficRoutingMethod
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for TrafficRoutingMethod
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type TrafficRoutingMethod
- ///
- public bool Equals(TrafficRoutingMethod e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to TrafficRoutingMethod
- ///
- public static implicit operator TrafficRoutingMethod(string value)
- {
- return new TrafficRoutingMethod(value);
- }
-
- ///
- /// Implicit operator to convert TrafficRoutingMethod to string
- ///
- public static implicit operator string(TrafficRoutingMethod e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum TrafficRoutingMethod
- ///
- public static bool operator == (TrafficRoutingMethod e1, TrafficRoutingMethod e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum TrafficRoutingMethod
- ///
- public static bool operator != (TrafficRoutingMethod e1, TrafficRoutingMethod e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for TrafficRoutingMethod
- ///
- public override bool Equals(object obj)
- {
- return obj is TrafficRoutingMethod && Equals((TrafficRoutingMethod)obj);
- }
-
- ///
- /// Returns for hashCode TrafficRoutingMethod
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethodConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethodConverter.cs
deleted file mode 100644
index 02702ae582721..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethodConverter.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for TrafficRoutingMethod.
- ///
- public sealed class TrafficRoutingMethodConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to TrafficRoutingMethod by
- /// the converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(TrafficRoutingMethod).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to TrafficRoutingMethod.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (TrafficRoutingMethod)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for TrafficRoutingMethod for serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatus.cs
deleted file mode 100644
index c20cc190ff760..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatus.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- ///
- /// Defines values for TrafficViewEnrollmentStatus.
- ///
- ///
- /// Determine base value for a given allowed value if exists, else return
- /// the value itself
- ///
- [JsonConverter(typeof(TrafficViewEnrollmentStatusConverter))]
- public struct TrafficViewEnrollmentStatus : System.IEquatable
- {
- private TrafficViewEnrollmentStatus(string underlyingValue)
- {
- UnderlyingValue=underlyingValue;
- }
-
- public static readonly TrafficViewEnrollmentStatus Enabled = "Enabled";
-
- public static readonly TrafficViewEnrollmentStatus Disabled = "Disabled";
-
-
- ///
- /// Underlying value of enum TrafficViewEnrollmentStatus
- ///
- private readonly string UnderlyingValue;
-
- ///
- /// Returns string representation for TrafficViewEnrollmentStatus
- ///
- public override string ToString()
- {
- return UnderlyingValue == null ? null : UnderlyingValue.ToString();
- }
-
- ///
- /// Compares enums of type TrafficViewEnrollmentStatus
- ///
- public bool Equals(TrafficViewEnrollmentStatus e)
- {
- return UnderlyingValue.Equals(e.UnderlyingValue);
- }
-
- ///
- /// Implicit operator to convert string to TrafficViewEnrollmentStatus
- ///
- public static implicit operator TrafficViewEnrollmentStatus(string value)
- {
- return new TrafficViewEnrollmentStatus(value);
- }
-
- ///
- /// Implicit operator to convert TrafficViewEnrollmentStatus to string
- ///
- public static implicit operator string(TrafficViewEnrollmentStatus e)
- {
- return e.UnderlyingValue;
- }
-
- ///
- /// Overriding == operator for enum TrafficViewEnrollmentStatus
- ///
- public static bool operator == (TrafficViewEnrollmentStatus e1, TrafficViewEnrollmentStatus e2)
- {
- return e2.Equals(e1);
- }
-
- ///
- /// Overriding != operator for enum TrafficViewEnrollmentStatus
- ///
- public static bool operator != (TrafficViewEnrollmentStatus e1, TrafficViewEnrollmentStatus e2)
- {
- return !e2.Equals(e1);
- }
-
- ///
- /// Overrides Equals operator for TrafficViewEnrollmentStatus
- ///
- public override bool Equals(object obj)
- {
- return obj is TrafficViewEnrollmentStatus && Equals((TrafficViewEnrollmentStatus)obj);
- }
-
- ///
- /// Returns for hashCode TrafficViewEnrollmentStatus
- ///
- public override int GetHashCode()
- {
- return UnderlyingValue.GetHashCode();
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatusConverter.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatusConverter.cs
deleted file mode 100644
index 51dc0244b239f..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatusConverter.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Newtonsoft.Json;
-
- using System.Reflection;
-
- ///
- /// Defines values for TrafficViewEnrollmentStatus.
- ///
- public sealed class TrafficViewEnrollmentStatusConverter : JsonConverter
- {
-
- ///
- /// Returns if objectType can be converted to
- /// TrafficViewEnrollmentStatus by the converter.
- ///
- public override bool CanConvert(System.Type objectType)
- {
- return typeof(TrafficViewEnrollmentStatus).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
- }
-
- ///
- /// Overrides ReadJson and converts token to
- /// TrafficViewEnrollmentStatus.
- ///
- public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
- {
- if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
- {
- return null;
- }
- return (TrafficViewEnrollmentStatus)serializer.Deserialize(reader);
- }
-
- ///
- /// Overriding WriteJson for TrafficViewEnrollmentStatus for
- /// serialization.
- ///
- public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
- {
- writer.WriteValue(value.ToString());
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/UserMetricsModel.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/UserMetricsModel.cs
deleted file mode 100644
index 2cd84f3ad69a0..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/UserMetricsModel.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// 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.TrafficManager.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Class representing Traffic Manager User Metrics.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class UserMetricsModel : ProxyResource
- {
- ///
- /// Initializes a new instance of the UserMetricsModel class.
- ///
- public UserMetricsModel()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the UserMetricsModel class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Network/trafficManagerProfiles.
- /// The key returned by the User Metrics
- /// operation.
- public UserMetricsModel(string id = default(string), string name = default(string), string type = default(string), string key = default(string))
- : base(id, name, type)
- {
- Key = key;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the key returned by the User Metrics operation.
- ///
- [JsonProperty(PropertyName = "properties.key")]
- public string Key { get; set; }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperations.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperations.cs
deleted file mode 100644
index d67b99e1e5354..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperations.cs
+++ /dev/null
@@ -1,1444 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ProfilesOperations operations.
- ///
- internal partial class ProfilesOperations : IServiceOperations, IProfilesOperations
- {
- ///
- /// Initializes a new instance of the ProfilesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal ProfilesOperations(TrafficManagerManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the TrafficManagerManagementClient
- ///
- public TrafficManagerManagementClient Client { get; private set; }
-
- ///
- /// Checks the availability of a Traffic Manager Relative DNS name.
- ///
- ///
- /// The name of the resource.
- ///
- ///
- /// The type of the resource.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CheckTrafficManagerRelativeDnsNameAvailabilityWithHttpMessagesAsync(string name = default(string), string type = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters = new CheckTrafficManagerRelativeDnsNameAvailabilityParameters();
- if (name != null || type != null)
- {
- parameters.Name = name;
- parameters.Type = type;
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckTrafficManagerRelativeDnsNameAvailability", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Network/checkTrafficManagerNameAvailability").ToString();
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all Traffic Manager profiles within a resource group.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profiles to
- /// be listed.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all Traffic Manager profiles within a subscription.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Gets a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string profileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Create or update a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, Profile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile to be
- /// deleted.
- ///
- ///
- /// The name of the Traffic Manager profile to be deleted.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string profileName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Update a Traffic Manager profile.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the Update operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string profileName, Profile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (profileName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "profileName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("profileName", profileName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{profileName}", System.Uri.EscapeDataString(profileName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(parameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperationsExtensions.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperationsExtensions.cs
deleted file mode 100644
index 8ab996b3aebda..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/ProfilesOperationsExtensions.cs
+++ /dev/null
@@ -1,307 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for ProfilesOperations.
- ///
- public static partial class ProfilesOperationsExtensions
- {
- ///
- /// Checks the availability of a Traffic Manager Relative DNS name.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource.
- ///
- ///
- /// The type of the resource.
- ///
- public static TrafficManagerNameAvailability CheckTrafficManagerRelativeDnsNameAvailability(this IProfilesOperations operations, string name = default(string), string type = default(string))
- {
- return operations.CheckTrafficManagerRelativeDnsNameAvailabilityAsync(name, type).GetAwaiter().GetResult();
- }
-
- ///
- /// Checks the availability of a Traffic Manager Relative DNS name.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource.
- ///
- ///
- /// The type of the resource.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CheckTrafficManagerRelativeDnsNameAvailabilityAsync(this IProfilesOperations operations, string name = default(string), string type = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CheckTrafficManagerRelativeDnsNameAvailabilityWithHttpMessagesAsync(name, type, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all Traffic Manager profiles within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profiles to
- /// be listed.
- ///
- public static IEnumerable ListByResourceGroup(this IProfilesOperations operations, string resourceGroupName)
- {
- return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all Traffic Manager profiles within a resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profiles to
- /// be listed.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListByResourceGroupAsync(this IProfilesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all Traffic Manager profiles within a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- public static IEnumerable ListBySubscription(this IProfilesOperations operations)
- {
- return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all Traffic Manager profiles within a subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListBySubscriptionAsync(this IProfilesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- public static Profile Get(this IProfilesOperations operations, string resourceGroupName, string profileName)
- {
- return operations.GetAsync(resourceGroupName, profileName).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Create or update a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- public static Profile CreateOrUpdate(this IProfilesOperations operations, string resourceGroupName, string profileName, Profile parameters)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, profileName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Create or update a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the CreateOrUpdate
- /// operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, Profile parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, profileName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile to be
- /// deleted.
- ///
- ///
- /// The name of the Traffic Manager profile to be deleted.
- ///
- public static DeleteOperationResult Delete(this IProfilesOperations operations, string resourceGroupName, string profileName)
- {
- return operations.DeleteAsync(resourceGroupName, profileName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile to be
- /// deleted.
- ///
- ///
- /// The name of the Traffic Manager profile to be deleted.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task DeleteAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, profileName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Update a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the Update operation.
- ///
- public static Profile Update(this IProfilesOperations operations, string resourceGroupName, string profileName, Profile parameters)
- {
- return operations.UpdateAsync(resourceGroupName, profileName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Update a Traffic Manager profile.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group containing the Traffic Manager profile.
- ///
- ///
- /// The name of the Traffic Manager profile.
- ///
- ///
- /// The Traffic Manager profile parameters supplied to the Update operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task UpdateAsync(this IProfilesOperations operations, string resourceGroupName, string profileName, Profile parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, profileName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/SdkInfo_TrafficManagerManagementClient.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/SdkInfo_TrafficManagerManagementClient.cs
deleted file mode 100644
index 1da11ad88ecc6..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/SdkInfo_TrafficManagerManagementClient.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-
-//
-// 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.TrafficManager
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
-
- internal static partial class SdkInfo
- {
- public static IEnumerable> ApiInfo_TrafficManagerManagementClient
- {
- get
- {
- return new Tuple[]
- {
- new Tuple("Network", "Endpoints", "2018-08-01"),
- new Tuple("Network", "GeographicHierarchies", "2018-08-01"),
- new Tuple("Network", "HeatMap", "2018-08-01"),
- new Tuple("Network", "Profiles", "2018-08-01"),
- new Tuple("Network", "TrafficManagerUserMetricsKeys", "2018-08-01"),
- }.AsEnumerable();
- }
- }
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/trafficmanager/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --opt-in-extensible-enums --csharp-sdks-folder=D:\\GitHub\\Repos\\AllenCalMinChild\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "3f1e770aa89c7d306d7cdb4f7aa852819d2f9fa8";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
- }
-}
-
diff --git a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/TrafficManagerManagementClient.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/TrafficManagerManagementClient.cs
deleted file mode 100644
index 53c207fde9c54..0000000000000
--- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/TrafficManagerManagementClient.cs
+++ /dev/null
@@ -1,383 +0,0 @@
-//
-// 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.TrafficManager
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Serialization;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
-
- public partial class TrafficManagerManagementClient : ServiceClient, ITrafficManagerManagementClient, IAzureClient
- {
- ///
- /// The base URI of the service.
- ///
- public System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- public JsonSerializerSettings SerializationSettings { get; private set; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- public JsonSerializerSettings DeserializationSettings { get; private set; }
-
- ///
- /// Credentials needed for the client to connect to Azure.
- ///
- public ServiceClientCredentials Credentials { get; private set; }
-
- ///
- /// Gets subscription credentials which uniquely identify Microsoft Azure
- /// subscription. The subscription ID forms part of the URI for every service
- /// call.
- ///
- public string SubscriptionId { get; set; }
-
- ///
- /// Client Api Version.
- ///
- public string ApiVersion { get; private set; }
-
- ///
- /// The preferred language for the response.
- ///
- public string AcceptLanguage { get; set; }
-
- ///
- /// The retry timeout in seconds for Long Running Operations. Default value is
- /// 30.
- ///
- public int? LongRunningOperationRetryTimeout { get; set; }
-
- ///
- /// 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.
- ///
- public bool? GenerateClientRequestId { get; set; }
-
- ///
- /// Gets the IEndpointsOperations.
- ///
- public virtual IEndpointsOperations Endpoints { get; private set; }
-
- ///
- /// Gets the IProfilesOperations.
- ///
- public virtual IProfilesOperations Profiles { get; private set; }
-
- ///
- /// Gets the IGeographicHierarchiesOperations.
- ///
- public virtual IGeographicHierarchiesOperations GeographicHierarchies { get; private set; }
-
- ///
- /// Gets the IHeatMapOperations.
- ///
- public virtual IHeatMapOperations HeatMap { get; private set; }
-
- ///
- /// Gets the ITrafficManagerUserMetricsKeysOperations.
- ///
- public virtual ITrafficManagerUserMetricsKeysOperations TrafficManagerUserMetricsKeys { get; private set; }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// HttpClient to be used
- ///
- ///
- /// True: will dispose the provided httpClient on calling TrafficManagerManagementClient.Dispose(). False: will not dispose provided httpClient
- protected TrafficManagerManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- protected TrafficManagerManagementClient(params DelegatingHandler[] handlers) : base(handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- protected TrafficManagerManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- protected TrafficManagerManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- protected TrafficManagerManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public TrafficManagerManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// HttpClient to be used
- ///
- ///
- /// True: will dispose the provided httpClient on calling TrafficManagerManagementClient.Dispose(). False: will not dispose provided httpClient
- ///
- /// Thrown when a required parameter is null
- ///
- public TrafficManagerManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
- {
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public TrafficManagerManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public TrafficManagerManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- BaseUri = baseUri;
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the TrafficManagerManagementClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public TrafficManagerManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- BaseUri = baseUri;
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// An optional partial-method to perform custom initialization.
- ///
- partial void CustomInitialize();
- ///
- /// Initializes client properties.
- ///
- private void Initialize()
- {
- Endpoints = new EndpointsOperations(this);
- Profiles = new ProfilesOperations(this);
- GeographicHierarchies = new GeographicHierarchiesOperations(this);
- HeatMap = new HeatMapOperations(this);
- TrafficManagerUserMetricsKeys = new TrafficManagerUserMetricsKeysOperations(this);
- BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2018-08-01";
- AcceptLanguage = "en-US";
- LongRunningOperationRetryTimeout = 30;
- GenerateClientRequestId = true;
- SerializationSettings = new JsonSerializerSettings
- {
- Formatting = Newtonsoft.Json.Formatting.Indented,
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- SerializationSettings.Converters.Add(new TransformationJsonConverter());
- DeserializationSettings = new JsonSerializerSettings
- {
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List