From 34c457607e8365653478d3681af77c37efcefca4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 25 Jan 2021 02:08:59 +0000 Subject: [PATCH] CodeGen from PR 12597 in Azure/azure-rest-api-specs Merge 8fb1e341540a20dfc25ae48626d0aa1ecc3ad0e0 into d2d049f482ac1d0387d67f5f51d12f449802d9f3 --- .../src/Generated/Models/Endpoint.cs | 8 +- .../Generated/Models/EndpointMonitorStatus.cs | 101 ++---------------- .../Models/EndpointMonitorStatusConverter.cs | 53 --------- .../src/Generated/Models/EndpointStatus.cs | 89 +-------------- .../Models/EndpointStatusConverter.cs | 53 --------- .../src/Generated/Models/HeatMapModel.cs | 2 +- .../src/Generated/Models/MonitorConfig.cs | 6 +- .../src/Generated/Models/MonitorProtocol.cs | 92 +--------------- .../Models/MonitorProtocolConverter.cs | 53 --------- .../src/Generated/Models/Profile.cs | 10 +- .../Generated/Models/ProfileMonitorStatus.cs | 98 ++--------------- .../Models/ProfileMonitorStatusConverter.cs | 53 --------- .../src/Generated/Models/ProfileStatus.cs | 89 +-------------- .../Models/ProfileStatusConverter.cs | 53 --------- .../src/Generated/Models/ProxyResource.cs | 2 +- .../src/Generated/Models/Resource.cs | 4 +- .../src/Generated/Models/TrackedResource.cs | 2 +- .../TrafficManagerGeographicHierarchy.cs | 2 +- .../Generated/Models/TrafficRoutingMethod.cs | 101 ++---------------- .../Models/TrafficRoutingMethodConverter.cs | 53 --------- .../Models/TrafficViewEnrollmentStatus.cs | 89 +-------------- .../TrafficViewEnrollmentStatusConverter.cs | 55 ---------- .../src/Generated/Models/UserMetricsModel.cs | 2 +- .../SdkInfo_TrafficManagerManagementClient.cs | 11 -- 24 files changed, 52 insertions(+), 1029 deletions(-) delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatusConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatusConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocolConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatusConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatusConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethodConverter.cs delete mode 100644 sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatusConverter.cs 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 index b3e6a7b17c2f..60044d3c5f1c 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Endpoint.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Endpoint.cs @@ -38,7 +38,7 @@ public Endpoint() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. /// The Azure Resource URI of the of the /// endpoint. Not applicable to endpoints of type /// 'ExternalEndpoints'. @@ -76,7 +76,7 @@ public Endpoint() /// 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?), IList geoMapping = default(IList), IList subnets = default(IList), IList customHeaders = default(IList)) + public Endpoint(string id = default(string), string name = default(string), string type = default(string), string targetResourceId = default(string), string target = default(string), string endpointStatus = default(string), long? weight = default(long?), long? priority = default(long?), string endpointLocation = default(string), string endpointMonitorStatus = default(string), long? minChildEndpoints = default(long?), IList geoMapping = default(IList), IList subnets = default(IList), IList customHeaders = default(IList)) : base(id, name, type) { TargetResourceId = targetResourceId; @@ -120,7 +120,7 @@ public Endpoint() /// 'Disabled' /// [JsonProperty(PropertyName = "properties.endpointStatus")] - public EndpointStatus? EndpointStatus { get; set; } + public string EndpointStatus { get; set; } /// /// Gets or sets the weight of this endpoint when using the 'Weighted' @@ -152,7 +152,7 @@ public Endpoint() /// 'Inactive', 'Stopped' /// [JsonProperty(PropertyName = "properties.endpointMonitorStatus")] - public EndpointMonitorStatus? EndpointMonitorStatus { get; set; } + public string EndpointMonitorStatus { get; set; } /// /// Gets or sets the minimum number of endpoints that must be available 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 index 07f258913ac5..336959093668 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatus.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointMonitorStatus.cs @@ -10,104 +10,17 @@ 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 + public static class EndpointMonitorStatus { - 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(); - } - + public const string CheckingEndpoint = "CheckingEndpoint"; + public const string Online = "Online"; + public const string Degraded = "Degraded"; + public const string Disabled = "Disabled"; + public const string Inactive = "Inactive"; + public const string Stopped = "Stopped"; } } 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 3db806c1215a..000000000000 --- 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/EndpointStatus.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs index b37d0b66afd5..984703a0ae60 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/EndpointStatus.cs @@ -10,96 +10,13 @@ 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 + public static class EndpointStatus { - 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(); - } - + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; } } 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 f7380de60200..000000000000 --- 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/HeatMapModel.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs index a87facb82d63..5b52875f3908 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/HeatMapModel.cs @@ -38,7 +38,7 @@ public HeatMapModel() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. /// The beginning of the time window for this /// HeatMap, inclusive. /// The ending of the time window for this 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 index 2cdda6773c91..f6e139df83f3 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfig.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorConfig.cs @@ -56,7 +56,7 @@ public MonitorConfig() /// 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)) + public MonitorConfig(string profileMonitorStatus = default(string), string protocol = default(string), 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; @@ -81,14 +81,14 @@ public MonitorConfig() /// 'Online', 'Degraded', 'Disabled', 'Inactive' /// [JsonProperty(PropertyName = "profileMonitorStatus")] - public ProfileMonitorStatus? ProfileMonitorStatus { get; set; } + public string 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; } + public string Protocol { get; set; } /// /// Gets or sets the TCP port used to probe for endpoint health. 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 index 9f20452d5727..451f02c78e79 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocol.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/MonitorProtocol.cs @@ -10,98 +10,14 @@ 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 + public static class MonitorProtocol { - 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(); - } - + public const string HTTP = "HTTP"; + public const string HTTPS = "HTTPS"; + public const string TCP = "TCP"; } } 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 492df887d82b..000000000000 --- 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/Profile.cs b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs index cfa5b6f29dba..7654f68aebdf 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Profile.cs @@ -38,7 +38,7 @@ public Profile() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. /// Resource tags. /// The Azure Region where the resource /// lives @@ -61,7 +61,7 @@ public Profile() /// 'Enabled', 'Disabled' /// 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?), long? maxReturn = default(long?)) + public Profile(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), string profileStatus = default(string), string trafficRoutingMethod = default(string), DnsConfig dnsConfig = default(DnsConfig), MonitorConfig monitorConfig = default(MonitorConfig), IList endpoints = default(IList), string trafficViewEnrollmentStatus = default(string), long? maxReturn = default(long?)) : base(id, name, type, tags, location) { ProfileStatus = profileStatus; @@ -84,7 +84,7 @@ public Profile() /// values include: 'Enabled', 'Disabled' /// [JsonProperty(PropertyName = "properties.profileStatus")] - public ProfileStatus? ProfileStatus { get; set; } + public string ProfileStatus { get; set; } /// /// Gets or sets the traffic routing method of the Traffic Manager @@ -92,7 +92,7 @@ public Profile() /// 'Weighted', 'Geographic', 'MultiValue', 'Subnet' /// [JsonProperty(PropertyName = "properties.trafficRoutingMethod")] - public TrafficRoutingMethod? TrafficRoutingMethod { get; set; } + public string TrafficRoutingMethod { get; set; } /// /// Gets or sets the DNS settings of the Traffic Manager profile. @@ -121,7 +121,7 @@ public Profile() /// 'Disabled' /// [JsonProperty(PropertyName = "properties.trafficViewEnrollmentStatus")] - public TrafficViewEnrollmentStatus? TrafficViewEnrollmentStatus { get; set; } + public string TrafficViewEnrollmentStatus { get; set; } /// /// Gets or sets maximum number of endpoints to be returned for 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 index 1837646a4517..a21d88124827 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatus.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileMonitorStatus.cs @@ -10,102 +10,16 @@ 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 + public static class ProfileMonitorStatus { - 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(); - } - + public const string CheckingEndpoints = "CheckingEndpoints"; + public const string Online = "Online"; + public const string Degraded = "Degraded"; + public const string Disabled = "Disabled"; + public const string Inactive = "Inactive"; } } 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 149bc37fe470..000000000000 --- 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 index 8e8a6aee0c71..0f7c464d73a8 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatus.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProfileStatus.cs @@ -10,96 +10,13 @@ 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 + public static class ProfileStatus { - 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(); - } - + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; } } 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 82ea466b8d93..000000000000 --- 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 index c9bca654e18d..3bc78225bf24 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProxyResource.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/ProxyResource.cs @@ -33,7 +33,7 @@ public ProxyResource() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. public ProxyResource(string id = default(string), string name = default(string), string type = default(string)) : base(id, name, type) { 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 index 3e73ca9e5d78..0ebe8a3577ac 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Resource.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/Resource.cs @@ -35,7 +35,7 @@ public Resource() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. public Resource(string id = default(string), string name = default(string), string type = default(string)) { Id = id; @@ -64,7 +64,7 @@ public Resource() /// /// Gets or sets the type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// 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 index 5813d9d786e7..22283a01397b 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrackedResource.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrackedResource.cs @@ -35,7 +35,7 @@ public TrackedResource() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. /// Resource tags. /// The Azure Region where the resource /// lives 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 index 617710b181d2..8f7104eab659 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerGeographicHierarchy.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficManagerGeographicHierarchy.cs @@ -39,7 +39,7 @@ public TrafficManagerGeographicHierarchy() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// Microsoft.Network/trafficManagerProfiles. /// The region at the root of the /// hierarchy from all the regions in the hierarchy can be /// retrieved. 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 index 4fe13984f5ea..91646feacdc6 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethod.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficRoutingMethod.cs @@ -10,104 +10,17 @@ 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 + public static class TrafficRoutingMethod { - 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(); - } - + public const string Performance = "Performance"; + public const string Priority = "Priority"; + public const string Weighted = "Weighted"; + public const string Geographic = "Geographic"; + public const string MultiValue = "MultiValue"; + public const string Subnet = "Subnet"; } } 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 02702ae58272..000000000000 --- 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 index c20cc190ff76..ac9a0dcf0361 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatus.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/TrafficViewEnrollmentStatus.cs @@ -10,96 +10,13 @@ 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 + public static class TrafficViewEnrollmentStatus { - 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(); - } - + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; } } 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 51dc0244b239..000000000000 --- 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 index 426fcd60e808..2cd84f3ad69a 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/UserMetricsModel.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/Models/UserMetricsModel.cs @@ -36,7 +36,7 @@ public UserMetricsModel() /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} /// The name of the resource /// The type of the resource. Ex- - /// Microsoft.Network/trafficmanagerProfiles. + /// 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)) 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 index 8909fb2dd277..74b6a9cf19f4 100644 --- a/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/SdkInfo_TrafficManagerManagementClient.cs +++ b/sdk/trafficmanager/Microsoft.Azure.Management.TrafficManager/src/Generated/SdkInfo_TrafficManagerManagementClient.cs @@ -27,16 +27,5 @@ public static IEnumerable> ApiInfo_TrafficManagerM }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/trafficmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --opt-in-extensible-enums --csharp-sdks-folder=D:\\Source\\tatlicioglu\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "07af8ada3a9463d813e3b9271160451e49b2349d"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -