diff --git a/src/SDKs/Media/Management.Media/Generated/AssetsOperations.cs b/src/SDKs/Media/Management.Media/Generated/AssetsOperations.cs index c149aee2c392..c799f6dd3319 100644 --- a/src/SDKs/Media/Management.Media/Generated/AssetsOperations.cs +++ b/src/SDKs/Media/Management.Media/Generated/AssetsOperations.cs @@ -1141,7 +1141,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { diff --git a/src/SDKs/Media/Management.Media/Generated/AssetsOperationsExtensions.cs b/src/SDKs/Media/Management.Media/Generated/AssetsOperationsExtensions.cs index 887e407442cd..730aca31a24a 100644 --- a/src/SDKs/Media/Management.Media/Generated/AssetsOperationsExtensions.cs +++ b/src/SDKs/Media/Management.Media/Generated/AssetsOperationsExtensions.cs @@ -321,7 +321,7 @@ public static Asset Update(this IAssetsOperations operations, string resourceGro /// The SAS URL expiration time. This must be less than 24 hours from the /// current time. /// - public static AssetContainerSas ListContainerSas(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?)) + public static AssetContainerSas ListContainerSas(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?)) { return operations.ListContainerSasAsync(resourceGroupName, accountName, assetName, permissions, expiryTime).GetAwaiter().GetResult(); } @@ -357,7 +357,7 @@ public static Asset Update(this IAssetsOperations operations, string resourceGro /// /// The cancellation token. /// - public static async Task ListContainerSasAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListContainerSasAsync(this IAssetsOperations operations, string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListContainerSasWithHttpMessagesAsync(resourceGroupName, accountName, assetName, permissions, expiryTime, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/Media/Management.Media/Generated/IAssetsOperations.cs b/src/SDKs/Media/Management.Media/Generated/IAssetsOperations.cs index 8c814068c5ee..39ea9bd4c3fd 100644 --- a/src/SDKs/Media/Management.Media/Generated/IAssetsOperations.cs +++ b/src/SDKs/Media/Management.Media/Generated/IAssetsOperations.cs @@ -223,7 +223,7 @@ public partial interface IAssetsOperations /// /// Thrown when a required parameter is null /// - Task> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListContainerSasWithHttpMessagesAsync(string resourceGroupName, string accountName, string assetName, string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the Asset storage key /// diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AacAudio.cs b/src/SDKs/Media/Management.Media/Generated/Models/AacAudio.cs index 06128eb026f2..3e01c3e7287e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AacAudio.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AacAudio.cs @@ -40,7 +40,7 @@ public AacAudio() /// The encoding profile to be used when encoding /// audio with AAC. Possible values include: 'AacLc', 'HeAacV1', /// 'HeAacV2' - public AacAudio(string label = default(string), int? channels = default(int?), int? samplingRate = default(int?), int? bitrate = default(int?), AacAudioProfile? profile = default(AacAudioProfile?)) + public AacAudio(string label = default(string), int? channels = default(int?), int? samplingRate = default(int?), int? bitrate = default(int?), string profile = default(string)) : base(label, channels, samplingRate, bitrate) { Profile = profile; @@ -57,7 +57,7 @@ public AacAudio() /// with AAC. Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2' /// [JsonProperty(PropertyName = "profile")] - public AacAudioProfile? Profile { get; set; } + public string Profile { get; set; } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfile.cs b/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfile.cs index 360bfed49cfe..199e6d90c10f 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfile.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfile.cs @@ -10,110 +10,26 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for AacAudioProfile. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AacAudioProfileConverter))] - public struct AacAudioProfile : System.IEquatable + public static class AacAudioProfile { - private AacAudioProfile(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Specifies that the output audio is to be encoded into AAC Low /// Complexity profile (AAC-LC). /// - public static readonly AacAudioProfile AacLc = "AacLc"; - + public const string AacLc = "AacLc"; /// /// Specifies that the output audio is to be encoded into HE-AAC v1 /// profile. /// - public static readonly AacAudioProfile HeAacV1 = "HeAacV1"; - + public const string HeAacV1 = "HeAacV1"; /// /// Specifies that the output audio is to be encoded into HE-AAC v2 /// profile. /// - public static readonly AacAudioProfile HeAacV2 = "HeAacV2"; - - - /// - /// Underlying value of enum AacAudioProfile - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AacAudioProfile - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AacAudioProfile - /// - public bool Equals(AacAudioProfile e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AacAudioProfile - /// - public static implicit operator AacAudioProfile(string value) - { - return new AacAudioProfile(value); - } - - /// - /// Implicit operator to convert AacAudioProfile to string - /// - public static implicit operator string(AacAudioProfile e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AacAudioProfile - /// - public static bool operator == (AacAudioProfile e1, AacAudioProfile e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AacAudioProfile - /// - public static bool operator != (AacAudioProfile e1, AacAudioProfile e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AacAudioProfile - /// - public override bool Equals(object obj) - { - return obj is AacAudioProfile && Equals((AacAudioProfile)obj); - } - - /// - /// Returns for hashCode AacAudioProfile - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string HeAacV2 = "HeAacV2"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfileConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfileConverter.cs deleted file mode 100644 index 356d8350c76e..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/AacAudioProfileConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for AacAudioProfile. - /// - public sealed class AacAudioProfileConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to AacAudioProfile by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AacAudioProfile).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to AacAudioProfile. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AacAudioProfile)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AacAudioProfile for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AnalysisResolution.cs b/src/SDKs/Media/Management.Media/Generated/Models/AnalysisResolution.cs new file mode 100644 index 000000000000..392705b65233 --- /dev/null +++ b/src/SDKs/Media/Management.Media/Generated/Models/AnalysisResolution.cs @@ -0,0 +1,22 @@ +// +// 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.Media.Models +{ + + /// + /// Defines values for AnalysisResolution. + /// + public static class AnalysisResolution + { + public const string SourceResolution = "SourceResolution"; + public const string StandardDefinition = "StandardDefinition"; + } +} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Asset.cs b/src/SDKs/Media/Management.Media/Generated/Models/Asset.cs index 75ed1edebd4c..d5954e4917dd 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Asset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Asset.cs @@ -49,7 +49,7 @@ public Asset() /// The Asset encryption format. /// One of None or MediaStorageEncryption. Possible values include: /// 'None', 'MediaStorageClientEncryption' - public Asset(string id = default(string), string name = default(string), string type = default(string), System.Guid assetId = default(System.Guid), System.DateTime created = default(System.DateTime), System.DateTime lastModified = default(System.DateTime), string alternateId = default(string), string description = default(string), string container = default(string), string storageAccountName = default(string), AssetStorageEncryptionFormat storageEncryptionFormat = default(AssetStorageEncryptionFormat)) + public Asset(string id = default(string), string name = default(string), string type = default(string), System.Guid assetId = default(System.Guid), System.DateTime created = default(System.DateTime), System.DateTime lastModified = default(System.DateTime), string alternateId = default(string), string description = default(string), string container = default(string), string storageAccountName = default(string), string storageEncryptionFormat = default(string)) : base(id, name, type) { AssetId = assetId; @@ -116,7 +116,7 @@ public Asset() /// 'MediaStorageClientEncryption' /// [JsonProperty(PropertyName = "properties.storageEncryptionFormat")] - public AssetStorageEncryptionFormat StorageEncryptionFormat { get; private set; } + public string StorageEncryptionFormat { get; private set; } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermission.cs b/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermission.cs index 586c8c61b500..99ff6f989b1d 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermission.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermission.cs @@ -10,108 +10,24 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for AssetContainerPermission. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AssetContainerPermissionConverter))] - public struct AssetContainerPermission : System.IEquatable + public static class AssetContainerPermission { - private AssetContainerPermission(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The SAS URL will allow read access to the container. /// - public static readonly AssetContainerPermission Read = "Read"; - + public const string Read = "Read"; /// /// The SAS URL will allow read and write access to the container. /// - public static readonly AssetContainerPermission ReadWrite = "ReadWrite"; - + public const string ReadWrite = "ReadWrite"; /// /// The SAS URL will allow read, write and delete access to the /// container. /// - public static readonly AssetContainerPermission ReadWriteDelete = "ReadWriteDelete"; - - - /// - /// Underlying value of enum AssetContainerPermission - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AssetContainerPermission - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AssetContainerPermission - /// - public bool Equals(AssetContainerPermission e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AssetContainerPermission - /// - public static implicit operator AssetContainerPermission(string value) - { - return new AssetContainerPermission(value); - } - - /// - /// Implicit operator to convert AssetContainerPermission to string - /// - public static implicit operator string(AssetContainerPermission e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AssetContainerPermission - /// - public static bool operator == (AssetContainerPermission e1, AssetContainerPermission e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AssetContainerPermission - /// - public static bool operator != (AssetContainerPermission e1, AssetContainerPermission e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AssetContainerPermission - /// - public override bool Equals(object obj) - { - return obj is AssetContainerPermission && Equals((AssetContainerPermission)obj); - } - - /// - /// Returns for hashCode AssetContainerPermission - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string ReadWriteDelete = "ReadWriteDelete"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermissionConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermissionConverter.cs deleted file mode 100644 index 8b76b6150017..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/AssetContainerPermissionConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for AssetContainerPermission. - /// - public sealed class AssetContainerPermissionConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to AssetContainerPermission - /// by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AssetContainerPermission).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to AssetContainerPermission. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AssetContainerPermission)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AssetContainerPermission for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormat.cs index c18f46f3f565..4226b8babff7 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormat.cs @@ -10,103 +10,20 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for AssetStorageEncryptionFormat. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AssetStorageEncryptionFormatConverter))] - public struct AssetStorageEncryptionFormat : System.IEquatable + public static class AssetStorageEncryptionFormat { - private AssetStorageEncryptionFormat(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The Asset does not use client-side storage encryption (this is the /// only allowed value for new Assets). /// - public static readonly AssetStorageEncryptionFormat None = "None"; - + public const string None = "None"; /// /// The Asset is encrypted with Media Services client-side encryption. /// - public static readonly AssetStorageEncryptionFormat MediaStorageClientEncryption = "MediaStorageClientEncryption"; - - - /// - /// Underlying value of enum AssetStorageEncryptionFormat - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AssetStorageEncryptionFormat - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AssetStorageEncryptionFormat - /// - public bool Equals(AssetStorageEncryptionFormat e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AssetStorageEncryptionFormat - /// - public static implicit operator AssetStorageEncryptionFormat(string value) - { - return new AssetStorageEncryptionFormat(value); - } - - /// - /// Implicit operator to convert AssetStorageEncryptionFormat to string - /// - public static implicit operator string(AssetStorageEncryptionFormat e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AssetStorageEncryptionFormat - /// - public static bool operator == (AssetStorageEncryptionFormat e1, AssetStorageEncryptionFormat e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AssetStorageEncryptionFormat - /// - public static bool operator != (AssetStorageEncryptionFormat e1, AssetStorageEncryptionFormat e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AssetStorageEncryptionFormat - /// - public override bool Equals(object obj) - { - return obj is AssetStorageEncryptionFormat && Equals((AssetStorageEncryptionFormat)obj); - } - - /// - /// Returns for hashCode AssetStorageEncryptionFormat - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string MediaStorageClientEncryption = "MediaStorageClientEncryption"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormatConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormatConverter.cs deleted file mode 100644 index 747de16e2f89..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/AssetStorageEncryptionFormatConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for AssetStorageEncryptionFormat. - /// - public sealed class AssetStorageEncryptionFormatConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// AssetStorageEncryptionFormat by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AssetStorageEncryptionFormat).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// AssetStorageEncryptionFormat. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AssetStorageEncryptionFormat)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AssetStorageEncryptionFormat for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AudioAnalyzerPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/AudioAnalyzerPreset.cs index 19a689c51abe..6f095a9fa91b 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AudioAnalyzerPreset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AudioAnalyzerPreset.cs @@ -34,15 +34,22 @@ public AudioAnalyzerPreset() /// /// The language for the audio payload in /// the input using the BCP-47 format of 'language tag-region' (e.g: - /// 'en-US'). The list of supported languages are, 'en-US', 'en-GB', - /// 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', - /// 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If not specified, automatic - /// language detection would be employed. This feature currently - /// supports English, Chinese, French, German, Italian, Japanese, - /// Spanish, Russian, and Portuguese. The automatic detection works + /// 'en-US'). The list of supported languages are English ('en-US' and + /// 'en-GB'), Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian + /// ('it-IT'), Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese + /// ('zh-CN'), German ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian + /// ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If you know the + /// language of your content, it is recommended that you specify it. If + /// the language isn't specified or set to null, automatic language + /// detection will choose the first language detected and process with + /// the selected language for the duration of the file. This language + /// detection feature currently supports English, Chinese, French, + /// German, Italian, Japanese, Spanish, Russian, and Portuguese. It + /// does not currently support dynamically switching between languages + /// after the first language is detected. The automatic detection works /// best with audio recordings with clearly discernable speech. If /// automatic detection fails to find the language, transcription would - /// fallback to English. + /// fallback to 'en-US'." public AudioAnalyzerPreset(string audioLanguage = default(string)) { AudioLanguage = audioLanguage; @@ -56,16 +63,23 @@ public AudioAnalyzerPreset() /// /// Gets or sets the language for the audio payload in the input using - /// the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list - /// of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', - /// 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', - /// 'ru-RU', 'hi-IN'. If not specified, automatic language detection - /// would be employed. This feature currently supports English, - /// Chinese, French, German, Italian, Japanese, Spanish, Russian, and - /// Portuguese. The automatic detection works best with audio - /// recordings with clearly discernable speech. If automatic detection - /// fails to find the language, transcription would fallback to - /// English. + /// the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The + /// list of supported languages are English ('en-US' and 'en-GB'), + /// Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), + /// Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German + /// ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi + /// ('hi-IN'), and Korean ('ko-KR'). If you know the language of your + /// content, it is recommended that you specify it. If the language + /// isn't specified or set to null, automatic language detection will + /// choose the first language detected and process with the selected + /// language for the duration of the file. This language detection + /// feature currently supports English, Chinese, French, German, + /// Italian, Japanese, Spanish, Russian, and Portuguese. It does not + /// currently support dynamically switching between languages after the + /// first language is detected. The automatic detection works best with + /// audio recordings with clearly discernable speech. If automatic + /// detection fails to find the language, transcription would fallback + /// to 'en-US'." /// [JsonProperty(PropertyName = "audioLanguage")] public string AudioLanguage { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/AudioOverlay.cs b/src/SDKs/Media/Management.Media/Generated/Models/AudioOverlay.cs index 27b23744627c..6234d8cdcd60 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/AudioOverlay.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/AudioOverlay.cs @@ -59,7 +59,7 @@ public AudioOverlay() /// The gain level of audio in the /// overlay. The value should be in the range [0, 1.0]. The default is /// 1.0. - public AudioOverlay(string inputLabel = default(string), System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?)) + public AudioOverlay(string inputLabel, System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?)) : base(inputLabel, start, end, fadeInDuration, fadeOutDuration, audioGainLevel) { CustomInit(); @@ -70,5 +70,15 @@ public AudioOverlay() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/BuiltInStandardEncoderPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/BuiltInStandardEncoderPreset.cs index 8cedc4860844..8721de5564d3 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/BuiltInStandardEncoderPreset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/BuiltInStandardEncoderPreset.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -37,9 +38,9 @@ public BuiltInStandardEncoderPreset() /// encoding videos. Possible values include: 'H264SingleBitrateSD', /// 'H264SingleBitrate720p', 'H264SingleBitrate1080p', /// 'AdaptiveStreaming', 'AACGoodQualityAudio', - /// 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', - /// 'H264MultipleBitrateSD' - public BuiltInStandardEncoderPreset(EncoderNamedPreset presetName) + /// 'ContentAwareEncodingExperimental', 'H264MultipleBitrate1080p', + /// 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' + public BuiltInStandardEncoderPreset(string presetName) { PresetName = presetName; CustomInit(); @@ -55,20 +56,24 @@ public BuiltInStandardEncoderPreset(EncoderNamedPreset presetName) /// Possible values include: 'H264SingleBitrateSD', /// 'H264SingleBitrate720p', 'H264SingleBitrate1080p', /// 'AdaptiveStreaming', 'AACGoodQualityAudio', - /// 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', - /// 'H264MultipleBitrateSD' + /// 'ContentAwareEncodingExperimental', 'H264MultipleBitrate1080p', + /// 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' /// [JsonProperty(PropertyName = "presetName")] - public EncoderNamedPreset PresetName { get; set; } + public string PresetName { get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (PresetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PresetName"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayConfiguration.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayConfiguration.cs index 15aa129fdd52..d3649377de5a 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayConfiguration.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayConfiguration.cs @@ -45,7 +45,7 @@ public ContentKeyPolicyFairPlayConfiguration() /// 'PersistentUnlimited', 'PersistentLimited' /// The rental duration. Must be greater /// than or equal to 0. - public ContentKeyPolicyFairPlayConfiguration(byte[] ask, string fairPlayPfxPassword, string fairPlayPfx, ContentKeyPolicyFairPlayRentalAndLeaseKeyType rentalAndLeaseKeyType, long rentalDuration) + public ContentKeyPolicyFairPlayConfiguration(byte[] ask, string fairPlayPfxPassword, string fairPlayPfx, string rentalAndLeaseKeyType, long rentalDuration) { Ask = ask; FairPlayPfxPassword = fairPlayPfxPassword; @@ -87,7 +87,7 @@ public ContentKeyPolicyFairPlayConfiguration(byte[] ask, string fairPlayPfxPassw /// 'PersistentLimited' /// [JsonProperty(PropertyName = "rentalAndLeaseKeyType")] - public ContentKeyPolicyFairPlayRentalAndLeaseKeyType RentalAndLeaseKeyType { get; set; } + public string RentalAndLeaseKeyType { get; set; } /// /// Gets or sets the rental duration. Must be greater than or equal to @@ -116,6 +116,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "FairPlayPfx"); } + if (RentalAndLeaseKeyType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RentalAndLeaseKeyType"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs index 704b8ea29a0e..b5cb7a69e169 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyType.cs @@ -10,122 +10,29 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for ContentKeyPolicyFairPlayRentalAndLeaseKeyType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeConverter))] - public struct ContentKeyPolicyFairPlayRentalAndLeaseKeyType : System.IEquatable + public static class ContentKeyPolicyFairPlayRentalAndLeaseKeyType { - private ContentKeyPolicyFairPlayRentalAndLeaseKeyType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Represents a ContentKeyPolicyFairPlayRentalAndLeaseKeyType that is /// unavailable in current API version. /// - public static readonly ContentKeyPolicyFairPlayRentalAndLeaseKeyType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Key duration is not specified. /// - public static readonly ContentKeyPolicyFairPlayRentalAndLeaseKeyType Undefined = "Undefined"; - + public const string Undefined = "Undefined"; /// /// Content key can be persisted with an unlimited duration /// - public static readonly ContentKeyPolicyFairPlayRentalAndLeaseKeyType PersistentUnlimited = "PersistentUnlimited"; - + public const string PersistentUnlimited = "PersistentUnlimited"; /// /// Content key can be persisted and the valid duration is limited by /// the Rental Duration value /// - public static readonly ContentKeyPolicyFairPlayRentalAndLeaseKeyType PersistentLimited = "PersistentLimited"; - - - /// - /// Underlying value of enum - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public bool Equals(ContentKeyPolicyFairPlayRentalAndLeaseKeyType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public static implicit operator ContentKeyPolicyFairPlayRentalAndLeaseKeyType(string value) - { - return new ContentKeyPolicyFairPlayRentalAndLeaseKeyType(value); - } - - /// - /// Implicit operator to convert - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType to string - /// - public static implicit operator string(ContentKeyPolicyFairPlayRentalAndLeaseKeyType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public static bool operator == (ContentKeyPolicyFairPlayRentalAndLeaseKeyType e1, ContentKeyPolicyFairPlayRentalAndLeaseKeyType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public static bool operator != (ContentKeyPolicyFairPlayRentalAndLeaseKeyType e1, ContentKeyPolicyFairPlayRentalAndLeaseKeyType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public override bool Equals(object obj) - { - return obj is ContentKeyPolicyFairPlayRentalAndLeaseKeyType && Equals((ContentKeyPolicyFairPlayRentalAndLeaseKeyType)obj); - } - - /// - /// Returns for hashCode ContentKeyPolicyFairPlayRentalAndLeaseKeyType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string PersistentLimited = "PersistentLimited"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeConverter.cs deleted file mode 100644 index 62951008dd9b..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for ContentKeyPolicyFairPlayRentalAndLeaseKeyType. - /// - public sealed class ContentKeyPolicyFairPlayRentalAndLeaseKeyTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ContentKeyPolicyFairPlayRentalAndLeaseKeyType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ContentKeyPolicyFairPlayRentalAndLeaseKeyType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for - /// ContentKeyPolicyFairPlayRentalAndLeaseKeyType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentType.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentType.cs index 3b257add9e55..773d03e996b1 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentType.cs @@ -10,118 +10,28 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for ContentKeyPolicyPlayReadyContentType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ContentKeyPolicyPlayReadyContentTypeConverter))] - public struct ContentKeyPolicyPlayReadyContentType : System.IEquatable + public static class ContentKeyPolicyPlayReadyContentType { - private ContentKeyPolicyPlayReadyContentType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Represents a ContentKeyPolicyPlayReadyContentType that is /// unavailable in current API version. /// - public static readonly ContentKeyPolicyPlayReadyContentType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Unspecified content type. /// - public static readonly ContentKeyPolicyPlayReadyContentType Unspecified = "Unspecified"; - + public const string Unspecified = "Unspecified"; /// /// Ultraviolet download content type. /// - public static readonly ContentKeyPolicyPlayReadyContentType UltraVioletDownload = "UltraVioletDownload"; - + public const string UltraVioletDownload = "UltraVioletDownload"; /// /// Ultraviolet streaming content type. /// - public static readonly ContentKeyPolicyPlayReadyContentType UltraVioletStreaming = "UltraVioletStreaming"; - - - /// - /// Underlying value of enum ContentKeyPolicyPlayReadyContentType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// ContentKeyPolicyPlayReadyContentType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type ContentKeyPolicyPlayReadyContentType - /// - public bool Equals(ContentKeyPolicyPlayReadyContentType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// ContentKeyPolicyPlayReadyContentType - /// - public static implicit operator ContentKeyPolicyPlayReadyContentType(string value) - { - return new ContentKeyPolicyPlayReadyContentType(value); - } - - /// - /// Implicit operator to convert ContentKeyPolicyPlayReadyContentType - /// to string - /// - public static implicit operator string(ContentKeyPolicyPlayReadyContentType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum - /// ContentKeyPolicyPlayReadyContentType - /// - public static bool operator == (ContentKeyPolicyPlayReadyContentType e1, ContentKeyPolicyPlayReadyContentType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum - /// ContentKeyPolicyPlayReadyContentType - /// - public static bool operator != (ContentKeyPolicyPlayReadyContentType e1, ContentKeyPolicyPlayReadyContentType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for ContentKeyPolicyPlayReadyContentType - /// - public override bool Equals(object obj) - { - return obj is ContentKeyPolicyPlayReadyContentType && Equals((ContentKeyPolicyPlayReadyContentType)obj); - } - - /// - /// Returns for hashCode ContentKeyPolicyPlayReadyContentType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string UltraVioletStreaming = "UltraVioletStreaming"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentTypeConverter.cs deleted file mode 100644 index 475cb0bb80a3..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyContentTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for ContentKeyPolicyPlayReadyContentType. - /// - public sealed class ContentKeyPolicyPlayReadyContentTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// ContentKeyPolicyPlayReadyContentType by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ContentKeyPolicyPlayReadyContentType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// ContentKeyPolicyPlayReadyContentType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ContentKeyPolicyPlayReadyContentType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for ContentKeyPolicyPlayReadyContentType for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicense.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicense.cs index 90b36c4dcde6..a0d326346227 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicense.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicense.cs @@ -49,7 +49,7 @@ public ContentKeyPolicyPlayReadyLicense() /// of license. /// The grace period of license. /// The license PlayRight - public ContentKeyPolicyPlayReadyLicense(bool allowTestDevices, ContentKeyPolicyPlayReadyLicenseType licenseType, ContentKeyPolicyPlayReadyContentKeyLocation contentKeyLocation, ContentKeyPolicyPlayReadyContentType contentType, System.DateTime? beginDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), System.TimeSpan? relativeBeginDate = default(System.TimeSpan?), System.TimeSpan? relativeExpirationDate = default(System.TimeSpan?), System.TimeSpan? gracePeriod = default(System.TimeSpan?), ContentKeyPolicyPlayReadyPlayRight playRight = default(ContentKeyPolicyPlayReadyPlayRight)) + public ContentKeyPolicyPlayReadyLicense(bool allowTestDevices, string licenseType, ContentKeyPolicyPlayReadyContentKeyLocation contentKeyLocation, string contentType, System.DateTime? beginDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), System.TimeSpan? relativeBeginDate = default(System.TimeSpan?), System.TimeSpan? relativeExpirationDate = default(System.TimeSpan?), System.TimeSpan? gracePeriod = default(System.TimeSpan?), ContentKeyPolicyPlayReadyPlayRight playRight = default(ContentKeyPolicyPlayReadyPlayRight)) { AllowTestDevices = allowTestDevices; BeginDate = beginDate; @@ -117,7 +117,7 @@ public ContentKeyPolicyPlayReadyLicense() /// 'NonPersistent', 'Persistent' /// [JsonProperty(PropertyName = "licenseType")] - public ContentKeyPolicyPlayReadyLicenseType LicenseType { get; set; } + public string LicenseType { get; set; } /// /// Gets or sets the content key location. @@ -131,7 +131,7 @@ public ContentKeyPolicyPlayReadyLicense() /// 'UltraVioletStreaming' /// [JsonProperty(PropertyName = "contentType")] - public ContentKeyPolicyPlayReadyContentType ContentType { get; set; } + public string ContentType { get; set; } /// /// Validate the object. @@ -141,10 +141,18 @@ public ContentKeyPolicyPlayReadyLicense() /// public virtual void Validate() { + if (LicenseType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LicenseType"); + } if (ContentKeyLocation == null) { throw new ValidationException(ValidationRules.CannotBeNull, "ContentKeyLocation"); } + if (ContentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContentType"); + } if (PlayRight != null) { PlayRight.Validate(); diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseType.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseType.cs index 1ac4e0807fae..ed3b1e2c381a 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseType.cs @@ -10,113 +10,24 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for ContentKeyPolicyPlayReadyLicenseType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ContentKeyPolicyPlayReadyLicenseTypeConverter))] - public struct ContentKeyPolicyPlayReadyLicenseType : System.IEquatable + public static class ContentKeyPolicyPlayReadyLicenseType { - private ContentKeyPolicyPlayReadyLicenseType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Represents a ContentKeyPolicyPlayReadyLicenseType that is /// unavailable in current API version. /// - public static readonly ContentKeyPolicyPlayReadyLicenseType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Non persistent license. /// - public static readonly ContentKeyPolicyPlayReadyLicenseType NonPersistent = "NonPersistent"; - + public const string NonPersistent = "NonPersistent"; /// /// Persistent license. Allows offline playback. /// - public static readonly ContentKeyPolicyPlayReadyLicenseType Persistent = "Persistent"; - - - /// - /// Underlying value of enum ContentKeyPolicyPlayReadyLicenseType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// ContentKeyPolicyPlayReadyLicenseType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type ContentKeyPolicyPlayReadyLicenseType - /// - public bool Equals(ContentKeyPolicyPlayReadyLicenseType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// ContentKeyPolicyPlayReadyLicenseType - /// - public static implicit operator ContentKeyPolicyPlayReadyLicenseType(string value) - { - return new ContentKeyPolicyPlayReadyLicenseType(value); - } - - /// - /// Implicit operator to convert ContentKeyPolicyPlayReadyLicenseType - /// to string - /// - public static implicit operator string(ContentKeyPolicyPlayReadyLicenseType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum - /// ContentKeyPolicyPlayReadyLicenseType - /// - public static bool operator == (ContentKeyPolicyPlayReadyLicenseType e1, ContentKeyPolicyPlayReadyLicenseType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum - /// ContentKeyPolicyPlayReadyLicenseType - /// - public static bool operator != (ContentKeyPolicyPlayReadyLicenseType e1, ContentKeyPolicyPlayReadyLicenseType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for ContentKeyPolicyPlayReadyLicenseType - /// - public override bool Equals(object obj) - { - return obj is ContentKeyPolicyPlayReadyLicenseType && Equals((ContentKeyPolicyPlayReadyLicenseType)obj); - } - - /// - /// Returns for hashCode ContentKeyPolicyPlayReadyLicenseType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Persistent = "Persistent"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseTypeConverter.cs deleted file mode 100644 index 532c7191681c..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyLicenseTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for ContentKeyPolicyPlayReadyLicenseType. - /// - public sealed class ContentKeyPolicyPlayReadyLicenseTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// ContentKeyPolicyPlayReadyLicenseType by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ContentKeyPolicyPlayReadyLicenseType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// ContentKeyPolicyPlayReadyLicenseType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ContentKeyPolicyPlayReadyLicenseType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for ContentKeyPolicyPlayReadyLicenseType for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyPlayRight.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyPlayRight.cs index cc60ff87e5d4..4cdf867746f7 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyPlayRight.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyPlayRight.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -68,7 +69,7 @@ public ContentKeyPolicyPlayReadyPlayRight() /// protection level for compressed digital audio. /// Specifies the output /// protection level for uncompressed digital audio. - public ContentKeyPolicyPlayReadyPlayRight(bool digitalVideoOnlyContentRestriction, bool imageConstraintForAnalogComponentVideoRestriction, bool imageConstraintForAnalogComputerMonitorRestriction, ContentKeyPolicyPlayReadyUnknownOutputPassingOption allowPassingVideoContentToUnknownOutput, System.TimeSpan? firstPlayExpiration = default(System.TimeSpan?), int? scmsRestriction = default(int?), int? agcAndColorStripeRestriction = default(int?), ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction = default(ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction), int? uncompressedDigitalVideoOpl = default(int?), int? compressedDigitalVideoOpl = default(int?), int? analogVideoOpl = default(int?), int? compressedDigitalAudioOpl = default(int?), int? uncompressedDigitalAudioOpl = default(int?)) + public ContentKeyPolicyPlayReadyPlayRight(bool digitalVideoOnlyContentRestriction, bool imageConstraintForAnalogComponentVideoRestriction, bool imageConstraintForAnalogComputerMonitorRestriction, string allowPassingVideoContentToUnknownOutput, System.TimeSpan? firstPlayExpiration = default(System.TimeSpan?), int? scmsRestriction = default(int?), int? agcAndColorStripeRestriction = default(int?), ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction explicitAnalogTelevisionOutputRestriction = default(ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction), int? uncompressedDigitalVideoOpl = default(int?), int? compressedDigitalVideoOpl = default(int?), int? analogVideoOpl = default(int?), int? compressedDigitalAudioOpl = default(int?), int? uncompressedDigitalAudioOpl = default(int?)) { FirstPlayExpiration = firstPlayExpiration; ScmsRestriction = scmsRestriction; @@ -147,7 +148,7 @@ public ContentKeyPolicyPlayReadyPlayRight() /// 'Allowed', 'AllowedWithVideoConstriction' /// [JsonProperty(PropertyName = "allowPassingVideoContentToUnknownOutput")] - public ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowPassingVideoContentToUnknownOutput { get; set; } + public string AllowPassingVideoContentToUnknownOutput { get; set; } /// /// Gets or sets specifies the output protection level for uncompressed @@ -187,11 +188,15 @@ public ContentKeyPolicyPlayReadyPlayRight() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (AllowPassingVideoContentToUnknownOutput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AllowPassingVideoContentToUnknownOutput"); + } if (ExplicitAnalogTelevisionOutputRestriction != null) { ExplicitAnalogTelevisionOutputRestriction.Validate(); diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs index 2974781c0b1d..492ab38c9d31 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOption.cs @@ -10,125 +10,31 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for ContentKeyPolicyPlayReadyUnknownOutputPassingOption. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ContentKeyPolicyPlayReadyUnknownOutputPassingOptionConverter))] - public struct ContentKeyPolicyPlayReadyUnknownOutputPassingOption : System.IEquatable + public static class ContentKeyPolicyPlayReadyUnknownOutputPassingOption { - private ContentKeyPolicyPlayReadyUnknownOutputPassingOption(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption /// that is unavailable in current API version. /// - public static readonly ContentKeyPolicyPlayReadyUnknownOutputPassingOption Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Passing the video portion of protected content to an Unknown Output /// is not allowed. /// - public static readonly ContentKeyPolicyPlayReadyUnknownOutputPassingOption NotAllowed = "NotAllowed"; - + public const string NotAllowed = "NotAllowed"; /// /// Passing the video portion of protected content to an Unknown Output /// is allowed. /// - public static readonly ContentKeyPolicyPlayReadyUnknownOutputPassingOption Allowed = "Allowed"; - + public const string Allowed = "Allowed"; /// /// Passing the video portion of protected content to an Unknown Output /// is allowed but with constrained resolution. /// - public static readonly ContentKeyPolicyPlayReadyUnknownOutputPassingOption AllowedWithVideoConstriction = "AllowedWithVideoConstriction"; - - - /// - /// Underlying value of enum - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public bool Equals(ContentKeyPolicyPlayReadyUnknownOutputPassingOption e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public static implicit operator ContentKeyPolicyPlayReadyUnknownOutputPassingOption(string value) - { - return new ContentKeyPolicyPlayReadyUnknownOutputPassingOption(value); - } - - /// - /// Implicit operator to convert - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption to string - /// - public static implicit operator string(ContentKeyPolicyPlayReadyUnknownOutputPassingOption e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public static bool operator == (ContentKeyPolicyPlayReadyUnknownOutputPassingOption e1, ContentKeyPolicyPlayReadyUnknownOutputPassingOption e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public static bool operator != (ContentKeyPolicyPlayReadyUnknownOutputPassingOption e1, ContentKeyPolicyPlayReadyUnknownOutputPassingOption e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public override bool Equals(object obj) - { - return obj is ContentKeyPolicyPlayReadyUnknownOutputPassingOption && Equals((ContentKeyPolicyPlayReadyUnknownOutputPassingOption)obj); - } - - /// - /// Returns for hashCode - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string AllowedWithVideoConstriction = "AllowedWithVideoConstriction"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOptionConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOptionConverter.cs deleted file mode 100644 index 644897df10ec..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyPlayReadyUnknownOutputPassingOptionConverter.cs +++ /dev/null @@ -1,57 +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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for ContentKeyPolicyPlayReadyUnknownOutputPassingOption. - /// - public sealed class ContentKeyPolicyPlayReadyUnknownOutputPassingOptionConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ContentKeyPolicyPlayReadyUnknownOutputPassingOption).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ContentKeyPolicyPlayReadyUnknownOutputPassingOption)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for - /// ContentKeyPolicyPlayReadyUnknownOutputPassingOption for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenType.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenType.cs index f1c33e33bc96..7cb7db29c8f6 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenType.cs @@ -10,113 +10,24 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for ContentKeyPolicyRestrictionTokenType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ContentKeyPolicyRestrictionTokenTypeConverter))] - public struct ContentKeyPolicyRestrictionTokenType : System.IEquatable + public static class ContentKeyPolicyRestrictionTokenType { - private ContentKeyPolicyRestrictionTokenType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Represents a ContentKeyPolicyRestrictionTokenType that is /// unavailable in current API version. /// - public static readonly ContentKeyPolicyRestrictionTokenType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Simple Web Token. /// - public static readonly ContentKeyPolicyRestrictionTokenType Swt = "Swt"; - + public const string Swt = "Swt"; /// /// JSON Web Token. /// - public static readonly ContentKeyPolicyRestrictionTokenType Jwt = "Jwt"; - - - /// - /// Underlying value of enum ContentKeyPolicyRestrictionTokenType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// ContentKeyPolicyRestrictionTokenType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type ContentKeyPolicyRestrictionTokenType - /// - public bool Equals(ContentKeyPolicyRestrictionTokenType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// ContentKeyPolicyRestrictionTokenType - /// - public static implicit operator ContentKeyPolicyRestrictionTokenType(string value) - { - return new ContentKeyPolicyRestrictionTokenType(value); - } - - /// - /// Implicit operator to convert ContentKeyPolicyRestrictionTokenType - /// to string - /// - public static implicit operator string(ContentKeyPolicyRestrictionTokenType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum - /// ContentKeyPolicyRestrictionTokenType - /// - public static bool operator == (ContentKeyPolicyRestrictionTokenType e1, ContentKeyPolicyRestrictionTokenType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum - /// ContentKeyPolicyRestrictionTokenType - /// - public static bool operator != (ContentKeyPolicyRestrictionTokenType e1, ContentKeyPolicyRestrictionTokenType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for ContentKeyPolicyRestrictionTokenType - /// - public override bool Equals(object obj) - { - return obj is ContentKeyPolicyRestrictionTokenType && Equals((ContentKeyPolicyRestrictionTokenType)obj); - } - - /// - /// Returns for hashCode ContentKeyPolicyRestrictionTokenType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Jwt = "Jwt"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenTypeConverter.cs deleted file mode 100644 index fde27b3f6e30..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyRestrictionTokenTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for ContentKeyPolicyRestrictionTokenType. - /// - public sealed class ContentKeyPolicyRestrictionTokenTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// ContentKeyPolicyRestrictionTokenType by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ContentKeyPolicyRestrictionTokenType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// ContentKeyPolicyRestrictionTokenType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ContentKeyPolicyRestrictionTokenType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for ContentKeyPolicyRestrictionTokenType for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyTokenRestriction.cs b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyTokenRestriction.cs index dec7b3ac547e..3d672a0f1d5b 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyTokenRestriction.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ContentKeyPolicyTokenRestriction.cs @@ -48,7 +48,7 @@ public ContentKeyPolicyTokenRestriction() /// claims. /// The OpenID connect /// discovery document. - public ContentKeyPolicyTokenRestriction(string issuer, string audience, ContentKeyPolicyRestrictionTokenKey primaryVerificationKey, ContentKeyPolicyRestrictionTokenType restrictionTokenType, IList alternateVerificationKeys = default(IList), IList requiredClaims = default(IList), string openIdConnectDiscoveryDocument = default(string)) + public ContentKeyPolicyTokenRestriction(string issuer, string audience, ContentKeyPolicyRestrictionTokenKey primaryVerificationKey, string restrictionTokenType, IList alternateVerificationKeys = default(IList), IList requiredClaims = default(IList), string openIdConnectDiscoveryDocument = default(string)) { Issuer = issuer; Audience = audience; @@ -100,7 +100,7 @@ public ContentKeyPolicyTokenRestriction() /// 'Swt', 'Jwt' /// [JsonProperty(PropertyName = "restrictionTokenType")] - public ContentKeyPolicyRestrictionTokenType RestrictionTokenType { get; set; } + public string RestrictionTokenType { get; set; } /// /// Gets or sets the OpenID connect discovery document. @@ -128,6 +128,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryVerificationKey"); } + if (RestrictionTokenType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RestrictionTokenType"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Deinterlace.cs b/src/SDKs/Media/Management.Media/Generated/Models/Deinterlace.cs index fda87a4ae009..00dadbcc7f01 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Deinterlace.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Deinterlace.cs @@ -35,7 +35,7 @@ public Deinterlace() /// The deinterlacing mode. Defaults to /// AutoPixelAdaptive. Possible values include: 'Off', /// 'AutoPixelAdaptive' - public Deinterlace(DeinterlaceParity? parity = default(DeinterlaceParity?), DeinterlaceMode? mode = default(DeinterlaceMode?)) + public Deinterlace(string parity = default(string), string mode = default(string)) { Parity = parity; Mode = mode; @@ -53,14 +53,14 @@ public Deinterlace() /// 'BottomFieldFirst' /// [JsonProperty(PropertyName = "parity")] - public DeinterlaceParity? Parity { get; set; } + public string Parity { get; set; } /// /// Gets or sets the deinterlacing mode. Defaults to AutoPixelAdaptive. /// Possible values include: 'Off', 'AutoPixelAdaptive' /// [JsonProperty(PropertyName = "mode")] - public DeinterlaceMode? Mode { get; set; } + public string Mode { get; set; } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceMode.cs b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceMode.cs index c8cf95371bdd..c7fc0e790d44 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceMode.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceMode.cs @@ -10,103 +10,20 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for DeinterlaceMode. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(DeinterlaceModeConverter))] - public struct DeinterlaceMode : System.IEquatable + public static class DeinterlaceMode { - private DeinterlaceMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Disables de-interlacing of the source video. /// - public static readonly DeinterlaceMode Off = "Off"; - + public const string Off = "Off"; /// /// Apply automatic pixel adaptive de-interlacing on each frame in the /// input video. /// - public static readonly DeinterlaceMode AutoPixelAdaptive = "AutoPixelAdaptive"; - - - /// - /// Underlying value of enum DeinterlaceMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for DeinterlaceMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type DeinterlaceMode - /// - public bool Equals(DeinterlaceMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to DeinterlaceMode - /// - public static implicit operator DeinterlaceMode(string value) - { - return new DeinterlaceMode(value); - } - - /// - /// Implicit operator to convert DeinterlaceMode to string - /// - public static implicit operator string(DeinterlaceMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum DeinterlaceMode - /// - public static bool operator == (DeinterlaceMode e1, DeinterlaceMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum DeinterlaceMode - /// - public static bool operator != (DeinterlaceMode e1, DeinterlaceMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for DeinterlaceMode - /// - public override bool Equals(object obj) - { - return obj is DeinterlaceMode && Equals((DeinterlaceMode)obj); - } - - /// - /// Returns for hashCode DeinterlaceMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string AutoPixelAdaptive = "AutoPixelAdaptive"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceModeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceModeConverter.cs deleted file mode 100644 index 2050dd5380b7..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceModeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for DeinterlaceMode. - /// - public sealed class DeinterlaceModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to DeinterlaceMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(DeinterlaceMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to DeinterlaceMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (DeinterlaceMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for DeinterlaceMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParity.cs b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParity.cs index dc024535656a..ad5e9033db06 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParity.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParity.cs @@ -10,107 +10,23 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for DeinterlaceParity. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(DeinterlaceParityConverter))] - public struct DeinterlaceParity : System.IEquatable + public static class DeinterlaceParity { - private DeinterlaceParity(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Automatically detect the order of fields /// - public static readonly DeinterlaceParity Auto = "Auto"; - + public const string Auto = "Auto"; /// /// Apply top field first processing of input video. /// - public static readonly DeinterlaceParity TopFieldFirst = "TopFieldFirst"; - + public const string TopFieldFirst = "TopFieldFirst"; /// /// Apply bottom field first processing of input video. /// - public static readonly DeinterlaceParity BottomFieldFirst = "BottomFieldFirst"; - - - /// - /// Underlying value of enum DeinterlaceParity - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for DeinterlaceParity - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type DeinterlaceParity - /// - public bool Equals(DeinterlaceParity e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to DeinterlaceParity - /// - public static implicit operator DeinterlaceParity(string value) - { - return new DeinterlaceParity(value); - } - - /// - /// Implicit operator to convert DeinterlaceParity to string - /// - public static implicit operator string(DeinterlaceParity e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum DeinterlaceParity - /// - public static bool operator == (DeinterlaceParity e1, DeinterlaceParity e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum DeinterlaceParity - /// - public static bool operator != (DeinterlaceParity e1, DeinterlaceParity e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for DeinterlaceParity - /// - public override bool Equals(object obj) - { - return obj is DeinterlaceParity && Equals((DeinterlaceParity)obj); - } - - /// - /// Returns for hashCode DeinterlaceParity - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string BottomFieldFirst = "BottomFieldFirst"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParityConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParityConverter.cs deleted file mode 100644 index ad9b0c2a8f8a..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/DeinterlaceParityConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for DeinterlaceParity. - /// - public sealed class DeinterlaceParityConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to DeinterlaceParity by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(DeinterlaceParity).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to DeinterlaceParity. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (DeinterlaceParity)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for DeinterlaceParity for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPreset.cs index cdddae179fc1..f71b97f92aa5 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPreset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPreset.cs @@ -10,44 +10,30 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for EncoderNamedPreset. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(EncoderNamedPresetConverter))] - public struct EncoderNamedPreset : System.IEquatable + public static class EncoderNamedPreset { - private EncoderNamedPreset(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Produces an MP4 file where the video is encoded with H.264 codec at /// 2200 kbps and a picture height of 480 pixels, and the stereo audio /// is encoded with AAC-LC codec at 64 kbps. /// - public static readonly EncoderNamedPreset H264SingleBitrateSD = "H264SingleBitrateSD"; - + public const string H264SingleBitrateSD = "H264SingleBitrateSD"; /// /// Produces an MP4 file where the video is encoded with H.264 codec at /// 4500 kbps and a picture height of 720 pixels, and the stereo audio /// is encoded with AAC-LC codec at 64 kbps. /// - public static readonly EncoderNamedPreset H264SingleBitrate720p = "H264SingleBitrate720p"; - + public const string H264SingleBitrate720p = "H264SingleBitrate720p"; /// /// Produces an MP4 file where the video is encoded with H.264 codec at /// 6750 kbps and a picture height of 1080 pixels, and the stereo audio /// is encoded with AAC-LC codec at 64 kbps. /// - public static readonly EncoderNamedPreset H264SingleBitrate1080p = "H264SingleBitrate1080p"; - + public const string H264SingleBitrate1080p = "H264SingleBitrate1080p"; /// /// Produces a set of GOP aligned MP4 files with H.264 video and stereo /// AAC audio. Auto-generates a bitrate ladder based on the input @@ -57,104 +43,38 @@ private EncoderNamedPreset(string underlyingValue) /// lower than 3 Mbps. The output will have video and audio in separate /// MP4 files, which is optimal for adaptive streaming. /// - public static readonly EncoderNamedPreset AdaptiveStreaming = "AdaptiveStreaming"; - + public const string AdaptiveStreaming = "AdaptiveStreaming"; /// /// Produces a single MP4 file containing only stereo audio encoded at /// 192 kbps. /// - public static readonly EncoderNamedPreset AACGoodQualityAudio = "AACGoodQualityAudio"; - + public const string AACGoodQualityAudio = "AACGoodQualityAudio"; + /// + /// Exposes an experimental preset for content-aware encoding. Given + /// any input content, the service attempts to automatically determine + /// the optimal number of layers, appropriate bitrate and resolution + /// settings for delivery by adaptive streaming. The underlying + /// algorithms will continue to evolve over time. The output will + /// contain MP4 files with video and audio interleaved. + /// + public const string ContentAwareEncodingExperimental = "ContentAwareEncodingExperimental"; /// /// Produces a set of 8 GOP-aligned MP4 files, ranging from 6000 kbps /// to 400 kbps, and stereo AAC audio. Resolution starts at 1080p and /// goes down to 360p. /// - public static readonly EncoderNamedPreset H264MultipleBitrate1080p = "H264MultipleBitrate1080p"; - + public const string H264MultipleBitrate1080p = "H264MultipleBitrate1080p"; /// /// Produces a set of 6 GOP-aligned MP4 files, ranging from 3400 kbps /// to 400 kbps, and stereo AAC audio. Resolution starts at 720p and /// goes down to 360p. /// - public static readonly EncoderNamedPreset H264MultipleBitrate720p = "H264MultipleBitrate720p"; - + public const string H264MultipleBitrate720p = "H264MultipleBitrate720p"; /// /// Produces a set of 5 GOP-aligned MP4 files, ranging from 1600kbps to /// 400 kbps, and stereo AAC audio. Resolution starts at 480p and goes /// down to 360p. /// - public static readonly EncoderNamedPreset H264MultipleBitrateSD = "H264MultipleBitrateSD"; - - - /// - /// Underlying value of enum EncoderNamedPreset - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for EncoderNamedPreset - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type EncoderNamedPreset - /// - public bool Equals(EncoderNamedPreset e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to EncoderNamedPreset - /// - public static implicit operator EncoderNamedPreset(string value) - { - return new EncoderNamedPreset(value); - } - - /// - /// Implicit operator to convert EncoderNamedPreset to string - /// - public static implicit operator string(EncoderNamedPreset e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum EncoderNamedPreset - /// - public static bool operator == (EncoderNamedPreset e1, EncoderNamedPreset e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum EncoderNamedPreset - /// - public static bool operator != (EncoderNamedPreset e1, EncoderNamedPreset e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for EncoderNamedPreset - /// - public override bool Equals(object obj) - { - return obj is EncoderNamedPreset && Equals((EncoderNamedPreset)obj); - } - - /// - /// Returns for hashCode EncoderNamedPreset - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string H264MultipleBitrateSD = "H264MultipleBitrateSD"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPresetConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPresetConverter.cs deleted file mode 100644 index 5bfe0f453b18..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/EncoderNamedPresetConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for EncoderNamedPreset. - /// - public sealed class EncoderNamedPresetConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to EncoderNamedPreset by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(EncoderNamedPreset).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to EncoderNamedPreset. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (EncoderNamedPreset)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for EncoderNamedPreset for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EncryptionScheme.cs b/src/SDKs/Media/Management.Media/Generated/Models/EncryptionScheme.cs index e63570a9968d..aad95638bda0 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/EncryptionScheme.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/EncryptionScheme.cs @@ -10,112 +10,27 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for EncryptionScheme. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(EncryptionSchemeConverter))] - public struct EncryptionScheme : System.IEquatable + public static class EncryptionScheme { - private EncryptionScheme(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// NoEncryption scheme /// - public static readonly EncryptionScheme NoEncryption = "NoEncryption"; - + public const string NoEncryption = "NoEncryption"; /// /// EnvelopeEncryption scheme /// - public static readonly EncryptionScheme EnvelopeEncryption = "EnvelopeEncryption"; - + public const string EnvelopeEncryption = "EnvelopeEncryption"; /// /// CommonEncryptionCenc scheme /// - public static readonly EncryptionScheme CommonEncryptionCenc = "CommonEncryptionCenc"; - + public const string CommonEncryptionCenc = "CommonEncryptionCenc"; /// /// CommonEncryptionCbcs scheme /// - public static readonly EncryptionScheme CommonEncryptionCbcs = "CommonEncryptionCbcs"; - - - /// - /// Underlying value of enum EncryptionScheme - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for EncryptionScheme - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type EncryptionScheme - /// - public bool Equals(EncryptionScheme e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to EncryptionScheme - /// - public static implicit operator EncryptionScheme(string value) - { - return new EncryptionScheme(value); - } - - /// - /// Implicit operator to convert EncryptionScheme to string - /// - public static implicit operator string(EncryptionScheme e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum EncryptionScheme - /// - public static bool operator == (EncryptionScheme e1, EncryptionScheme e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum EncryptionScheme - /// - public static bool operator != (EncryptionScheme e1, EncryptionScheme e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for EncryptionScheme - /// - public override bool Equals(object obj) - { - return obj is EncryptionScheme && Equals((EncryptionScheme)obj); - } - - /// - /// Returns for hashCode EncryptionScheme - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string CommonEncryptionCbcs = "CommonEncryptionCbcs"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EncryptionSchemeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/EncryptionSchemeConverter.cs deleted file mode 100644 index 89d1bc301b82..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/EncryptionSchemeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for EncryptionScheme. - /// - public sealed class EncryptionSchemeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to EncryptionScheme by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(EncryptionScheme).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to EncryptionScheme. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (EncryptionScheme)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for EncryptionScheme for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EntropyMode.cs b/src/SDKs/Media/Management.Media/Generated/Models/EntropyMode.cs index c955bc53a948..3d4cf9e40c89 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/EntropyMode.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/EntropyMode.cs @@ -10,102 +10,19 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for EntropyMode. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(EntropyModeConverter))] - public struct EntropyMode : System.IEquatable + public static class EntropyMode { - private EntropyMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding. /// - public static readonly EntropyMode Cabac = "Cabac"; - + public const string Cabac = "Cabac"; /// /// Context Adaptive Variable Length Coder (CAVLC) entropy encoding. /// - public static readonly EntropyMode Cavlc = "Cavlc"; - - - /// - /// Underlying value of enum EntropyMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for EntropyMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type EntropyMode - /// - public bool Equals(EntropyMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to EntropyMode - /// - public static implicit operator EntropyMode(string value) - { - return new EntropyMode(value); - } - - /// - /// Implicit operator to convert EntropyMode to string - /// - public static implicit operator string(EntropyMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum EntropyMode - /// - public static bool operator == (EntropyMode e1, EntropyMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum EntropyMode - /// - public static bool operator != (EntropyMode e1, EntropyMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for EntropyMode - /// - public override bool Equals(object obj) - { - return obj is EntropyMode && Equals((EntropyMode)obj); - } - - /// - /// Returns for hashCode EntropyMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Cavlc = "Cavlc"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EntropyModeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/EntropyModeConverter.cs deleted file mode 100644 index 704aecbe6168..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/EntropyModeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for EntropyMode. - /// - public sealed class EntropyModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to EntropyMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(EntropyMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to EntropyMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (EntropyMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for EntropyMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/EnvelopeEncryption.cs b/src/SDKs/Media/Management.Media/Generated/Models/EnvelopeEncryption.cs index a981da82b4c0..51aab7864c56 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/EnvelopeEncryption.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/EnvelopeEncryption.cs @@ -38,10 +38,15 @@ public EnvelopeEncryption() /// Representing default content key for each /// encryption scheme and separate content keys for specific /// tracks - /// KeyAcquisitionUrlTemplate is - /// used to point to user specified service to delivery content - /// keys + /// Template for the URL + /// of the custom service delivering keys to end user players. Not + /// required when using Azure Media Services for issuing keys. The + /// template supports replaceable tokens that the service will update + /// at runtime with the value specific to the request. The currently + /// supported token values are {AlternativeMediaId}, which is replaced + /// with the value of StreamingLocatorId.AlternativeMediaId, and + /// {ContentKeyId}, which is replaced with the value of identifier of + /// the key being requested. public EnvelopeEncryption(EnabledProtocols enabledProtocols = default(EnabledProtocols), IList clearTracks = default(IList), StreamingPolicyContentKeys contentKeys = default(StreamingPolicyContentKeys), string customKeyAcquisitionUrlTemplate = default(string)) { EnabledProtocols = enabledProtocols; @@ -76,8 +81,14 @@ public EnvelopeEncryption() public StreamingPolicyContentKeys ContentKeys { get; set; } /// - /// Gets or sets keyAcquisitionUrlTemplate is used to point to user - /// specified service to delivery content keys + /// Gets or sets template for the URL of the custom service delivering + /// keys to end user players. Not required when using Azure Media + /// Services for issuing keys. The template supports replaceable + /// tokens that the service will update at runtime with the value + /// specific to the request. The currently supported token values are + /// {AlternativeMediaId}, which is replaced with the value of + /// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + /// replaced with the value of identifier of the key being requested. /// [JsonProperty(PropertyName = "customKeyAcquisitionUrlTemplate")] public string CustomKeyAcquisitionUrlTemplate { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FaceDetectorPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/FaceDetectorPreset.cs new file mode 100644 index 000000000000..731b7f43fc58 --- /dev/null +++ b/src/SDKs/Media/Management.Media/Generated/Models/FaceDetectorPreset.cs @@ -0,0 +1,79 @@ +// +// 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.Media.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes all the settings to be used when analyzing a video in order + /// to detect all the faces present. + /// + [Newtonsoft.Json.JsonObject("#Microsoft.Media.FaceDetectorPreset")] + public partial class FaceDetectorPreset : Preset + { + /// + /// Initializes a new instance of the FaceDetectorPreset class. + /// + public FaceDetectorPreset() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FaceDetectorPreset class. + /// + /// Specifies the maximum resolution at which + /// your video is analyzed. The default behavior is "SourceResolution," + /// which will keep the input video at its original resolution when + /// analyzed. Using "StandardDefinition" will resize input videos to + /// standard definition while preserving the appropriate aspect ratio. + /// It will only resize if the video is of higher resolution. For + /// example, a 1920x1080 input would be scaled to 640x360 before + /// processing. Switching to "StandardDefinition" will reduce the time + /// it takes to process high resolution video. It may also reduce the + /// cost of using this component (see + /// https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the + /// resized video may not be detected. Possible values include: + /// 'SourceResolution', 'StandardDefinition' + public FaceDetectorPreset(string resolution = default(string)) + { + Resolution = resolution; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the maximum resolution at which your video + /// is analyzed. The default behavior is "SourceResolution," which will + /// keep the input video at its original resolution when analyzed. + /// Using "StandardDefinition" will resize input videos to standard + /// definition while preserving the appropriate aspect ratio. It will + /// only resize if the video is of higher resolution. For example, a + /// 1920x1080 input would be scaled to 640x360 before processing. + /// Switching to "StandardDefinition" will reduce the time it takes to + /// process high resolution video. It may also reduce the cost of using + /// this component (see + /// https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + /// for details). However, faces that end up being too small in the + /// resized video may not be detected. Possible values include: + /// 'SourceResolution', 'StandardDefinition' + /// + [JsonProperty(PropertyName = "resolution")] + public string Resolution { get; set; } + + } +} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperation.cs b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperation.cs index cb8452e52ffc..203695161281 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperation.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperation.cs @@ -10,105 +10,19 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for FilterTrackPropertyCompareOperation. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(FilterTrackPropertyCompareOperationConverter))] - public struct FilterTrackPropertyCompareOperation : System.IEquatable + public static class FilterTrackPropertyCompareOperation { - private FilterTrackPropertyCompareOperation(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The equal operation. /// - public static readonly FilterTrackPropertyCompareOperation Equal = "Equal"; - + public const string Equal = "Equal"; /// /// The not equal operation. /// - public static readonly FilterTrackPropertyCompareOperation NotEqual = "NotEqual"; - - - /// - /// Underlying value of enum FilterTrackPropertyCompareOperation - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for - /// FilterTrackPropertyCompareOperation - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type FilterTrackPropertyCompareOperation - /// - public bool Equals(FilterTrackPropertyCompareOperation e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// FilterTrackPropertyCompareOperation - /// - public static implicit operator FilterTrackPropertyCompareOperation(string value) - { - return new FilterTrackPropertyCompareOperation(value); - } - - /// - /// Implicit operator to convert FilterTrackPropertyCompareOperation to - /// string - /// - public static implicit operator string(FilterTrackPropertyCompareOperation e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum FilterTrackPropertyCompareOperation - /// - public static bool operator == (FilterTrackPropertyCompareOperation e1, FilterTrackPropertyCompareOperation e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum FilterTrackPropertyCompareOperation - /// - public static bool operator != (FilterTrackPropertyCompareOperation e1, FilterTrackPropertyCompareOperation e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for FilterTrackPropertyCompareOperation - /// - public override bool Equals(object obj) - { - return obj is FilterTrackPropertyCompareOperation && Equals((FilterTrackPropertyCompareOperation)obj); - } - - /// - /// Returns for hashCode FilterTrackPropertyCompareOperation - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string NotEqual = "NotEqual"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperationConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperationConverter.cs deleted file mode 100644 index 01b2bdd898d7..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCompareOperationConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for FilterTrackPropertyCompareOperation. - /// - public sealed class FilterTrackPropertyCompareOperationConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// FilterTrackPropertyCompareOperation by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(FilterTrackPropertyCompareOperation).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// FilterTrackPropertyCompareOperation. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (FilterTrackPropertyCompareOperation)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for FilterTrackPropertyCompareOperation for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCondition.cs b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCondition.cs index f4718a2dd77a..7094b2f725fb 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCondition.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyCondition.cs @@ -38,7 +38,7 @@ public FilterTrackPropertyCondition() /// The track proprty value. /// The track property condition operation. /// Possible values include: 'Equal', 'NotEqual' - public FilterTrackPropertyCondition(FilterTrackPropertyType property, string value, FilterTrackPropertyCompareOperation operation) + public FilterTrackPropertyCondition(string property, string value, string operation) { Property = property; Value = value; @@ -56,7 +56,7 @@ public FilterTrackPropertyCondition(FilterTrackPropertyType property, string val /// 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' /// [JsonProperty(PropertyName = "property")] - public FilterTrackPropertyType Property { get; set; } + public string Property { get; set; } /// /// Gets or sets the track proprty value. @@ -69,7 +69,7 @@ public FilterTrackPropertyCondition(FilterTrackPropertyType property, string val /// values include: 'Equal', 'NotEqual' /// [JsonProperty(PropertyName = "operation")] - public FilterTrackPropertyCompareOperation Operation { get; set; } + public string Operation { get; set; } /// /// Validate the object. @@ -79,10 +79,18 @@ public FilterTrackPropertyCondition(FilterTrackPropertyType property, string val /// public virtual void Validate() { + if (Property == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Property"); + } if (Value == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Value"); } + if (Operation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Operation"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyType.cs b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyType.cs index 09055c94b6a2..a7487b82a8c6 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyType.cs @@ -10,122 +10,35 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for FilterTrackPropertyType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(FilterTrackPropertyTypeConverter))] - public struct FilterTrackPropertyType : System.IEquatable + public static class FilterTrackPropertyType { - private FilterTrackPropertyType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The unknown track property type. /// - public static readonly FilterTrackPropertyType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// The type. /// - public static readonly FilterTrackPropertyType Type = "Type"; - + public const string Type = "Type"; /// /// The name. /// - public static readonly FilterTrackPropertyType Name = "Name"; - + public const string Name = "Name"; /// /// The language. /// - public static readonly FilterTrackPropertyType Language = "Language"; - + public const string Language = "Language"; /// /// The fourCC. /// - public static readonly FilterTrackPropertyType FourCC = "FourCC"; - + public const string FourCC = "FourCC"; /// /// The bitrate. /// - public static readonly FilterTrackPropertyType Bitrate = "Bitrate"; - - - /// - /// Underlying value of enum FilterTrackPropertyType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for FilterTrackPropertyType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type FilterTrackPropertyType - /// - public bool Equals(FilterTrackPropertyType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to FilterTrackPropertyType - /// - public static implicit operator FilterTrackPropertyType(string value) - { - return new FilterTrackPropertyType(value); - } - - /// - /// Implicit operator to convert FilterTrackPropertyType to string - /// - public static implicit operator string(FilterTrackPropertyType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum FilterTrackPropertyType - /// - public static bool operator == (FilterTrackPropertyType e1, FilterTrackPropertyType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum FilterTrackPropertyType - /// - public static bool operator != (FilterTrackPropertyType e1, FilterTrackPropertyType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for FilterTrackPropertyType - /// - public override bool Equals(object obj) - { - return obj is FilterTrackPropertyType && Equals((FilterTrackPropertyType)obj); - } - - /// - /// Returns for hashCode FilterTrackPropertyType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Bitrate = "Bitrate"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyTypeConverter.cs deleted file mode 100644 index c82804eab7d9..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/FilterTrackPropertyTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for FilterTrackPropertyType. - /// - public sealed class FilterTrackPropertyTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to FilterTrackPropertyType - /// by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(FilterTrackPropertyType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to FilterTrackPropertyType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (FilterTrackPropertyType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for FilterTrackPropertyType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Filters.cs b/src/SDKs/Media/Management.Media/Generated/Models/Filters.cs index faf1f4d4dbca..e4620c2a3351 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Filters.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Filters.cs @@ -43,7 +43,7 @@ public Filters() /// The properties of overlays to be applied to /// the input video. These could be audio, image or video /// overlays. - public Filters(Deinterlace deinterlace = default(Deinterlace), Rotation? rotation = default(Rotation?), Rectangle crop = default(Rectangle), IList overlays = default(IList)) + public Filters(Deinterlace deinterlace = default(Deinterlace), string rotation = default(string), Rectangle crop = default(Rectangle), IList overlays = default(IList)) { Deinterlace = deinterlace; Rotation = rotation; @@ -70,7 +70,7 @@ public Filters() /// 'Rotate270' /// [JsonProperty(PropertyName = "rotation")] - public Rotation? Rotation { get; set; } + public string Rotation { get; set; } /// /// Gets or sets the parameters for the rectangular window with which diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Format.cs b/src/SDKs/Media/Management.Media/Generated/Models/Format.cs index 5a8660669157..4db5cacf646d 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Format.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Format.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -38,7 +39,7 @@ public Format() /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The /// type of the audio/video codec. Any unsubstituted macros will be /// collapsed and removed from the filename. - public Format(string filenamePattern = default(string)) + public Format(string filenamePattern) { FilenamePattern = filenamePattern; CustomInit(); @@ -63,5 +64,18 @@ public Format() [JsonProperty(PropertyName = "filenamePattern")] public string FilenamePattern { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FilenamePattern == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FilenamePattern"); + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264Complexity.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264Complexity.cs index a3e4da523a95..88a7e18648f5 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264Complexity.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/H264Complexity.cs @@ -10,110 +10,26 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for H264Complexity. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(H264ComplexityConverter))] - public struct H264Complexity : System.IEquatable + public static class H264Complexity { - private H264Complexity(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Tells the encoder to use settings that are optimized for faster /// encoding. Quality is sacrificed to decrease encoding time. /// - public static readonly H264Complexity Speed = "Speed"; - + public const string Speed = "Speed"; /// /// Tells the encoder to use settings that achieve a balance between /// speed and quality. /// - public static readonly H264Complexity Balanced = "Balanced"; - + public const string Balanced = "Balanced"; /// /// Tells the encoder to use settings that are optimized to produce /// higher quality output at the expense of slower overall encode time. /// - public static readonly H264Complexity Quality = "Quality"; - - - /// - /// Underlying value of enum H264Complexity - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for H264Complexity - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type H264Complexity - /// - public bool Equals(H264Complexity e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to H264Complexity - /// - public static implicit operator H264Complexity(string value) - { - return new H264Complexity(value); - } - - /// - /// Implicit operator to convert H264Complexity to string - /// - public static implicit operator string(H264Complexity e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum H264Complexity - /// - public static bool operator == (H264Complexity e1, H264Complexity e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum H264Complexity - /// - public static bool operator != (H264Complexity e1, H264Complexity e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for H264Complexity - /// - public override bool Equals(object obj) - { - return obj is H264Complexity && Equals((H264Complexity)obj); - } - - /// - /// Returns for hashCode H264Complexity - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Quality = "Quality"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264ComplexityConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264ComplexityConverter.cs deleted file mode 100644 index 26d778e9377b..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264ComplexityConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for H264Complexity. - /// - public sealed class H264ComplexityConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to H264Complexity by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(H264Complexity).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to H264Complexity. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (H264Complexity)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for H264Complexity for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264Layer.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264Layer.cs index 5312ba7de704..d1e8ce7977dc 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264Layer.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/H264Layer.cs @@ -31,6 +31,9 @@ public H264Layer() /// /// Initializes a new instance of the H264Layer class. /// + /// The average bitrate in bits per second at + /// which to encode the input video when generating this layer. This is + /// a required field. /// The width of the output video for this layer. /// The value can be absolute (in pixels) or relative (in percentage). /// For example 50% means the output video has half as many pixels in @@ -42,9 +45,6 @@ public H264Layer() /// The alphanumeric label for this layer, which /// can be used in multiplexing different video and audio layers, or in /// naming the output file. - /// The average bitrate in bits per second at - /// which to encode the input video when generating this layer. This is - /// a required field. /// The maximum bitrate (in bits per second), /// at which the VBV buffer should be assumed to refill. If not /// specified, defaults to the same value as bitrate. @@ -64,15 +64,13 @@ public H264Layer() /// Whether or not adaptive B-frames are /// to be used when encoding this layer. If not specified, the encoder /// will turn it on whenever the video profile permits its use. - /// Which profile of the H.264 standard should be - /// used when encoding this layer. Default is Auto. Possible values - /// include: 'Auto', 'Baseline', 'Main', 'High', 'High422', - /// 'High444' - /// Which level of the H.264 standard should be - /// used when encoding this layer. The value can be Auto, or a number - /// that matches the H.264 profile. If not specified, the default is - /// Auto, which lets the encoder choose the Level that is appropriate - /// for this layer. + /// We currently support Baseline, Main, High, + /// High422, High444. Default is Auto. Possible values include: 'Auto', + /// 'Baseline', 'Main', 'High', 'High422', 'High444' + /// We currently support Level up to 6.2. The value + /// can be Auto, or a number that matches the H.264 profile. If not + /// specified, the default is Auto, which lets the encoder choose the + /// Level that is appropriate for this layer. /// The VBV buffer window length. The value /// should be in ISO 8601 format. The value should be in the range /// [0.1-100] seconds. The default is 5 seconds (for example, @@ -85,8 +83,8 @@ public H264Layer() /// layer. If not specified, the encoder chooses the mode that is /// appropriate for the profile and level. Possible values include: /// 'Cabac', 'Cavlc' - public H264Layer(string width = default(string), string height = default(string), string label = default(string), int? bitrate = default(int?), int? maxBitrate = default(int?), int? bFrames = default(int?), string frameRate = default(string), int? slices = default(int?), bool? adaptiveBFrame = default(bool?), H264VideoProfile? profile = default(H264VideoProfile?), string level = default(string), System.TimeSpan? bufferWindow = default(System.TimeSpan?), int? referenceFrames = default(int?), EntropyMode? entropyMode = default(EntropyMode?)) - : base(width, height, label, bitrate, maxBitrate, bFrames, frameRate, slices, adaptiveBFrame) + public H264Layer(int bitrate, string width = default(string), string height = default(string), string label = default(string), int? maxBitrate = default(int?), int? bFrames = default(int?), string frameRate = default(string), int? slices = default(int?), bool? adaptiveBFrame = default(bool?), string profile = default(string), string level = default(string), System.TimeSpan? bufferWindow = default(System.TimeSpan?), int? referenceFrames = default(int?), string entropyMode = default(string)) + : base(bitrate, width, height, label, maxBitrate, bFrames, frameRate, slices, adaptiveBFrame) { Profile = profile; Level = level; @@ -102,19 +100,18 @@ public H264Layer() partial void CustomInit(); /// - /// Gets or sets which profile of the H.264 standard should be used - /// when encoding this layer. Default is Auto. Possible values include: - /// 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' + /// Gets or sets we currently support Baseline, Main, High, High422, + /// High444. Default is Auto. Possible values include: 'Auto', + /// 'Baseline', 'Main', 'High', 'High422', 'High444' /// [JsonProperty(PropertyName = "profile")] - public H264VideoProfile? Profile { get; set; } + public string Profile { get; set; } /// - /// Gets or sets which level of the H.264 standard should be used when - /// encoding this layer. The value can be Auto, or a number that - /// matches the H.264 profile. If not specified, the default is Auto, - /// which lets the encoder choose the Level that is appropriate for - /// this layer. + /// Gets or sets we currently support Level up to 6.2. The value can be + /// Auto, or a number that matches the H.264 profile. If not specified, + /// the default is Auto, which lets the encoder choose the Level that + /// is appropriate for this layer. /// [JsonProperty(PropertyName = "level")] public string Level { get; set; } @@ -141,7 +138,17 @@ public H264Layer() /// profile and level. Possible values include: 'Cabac', 'Cavlc' /// [JsonProperty(PropertyName = "entropyMode")] - public EntropyMode? EntropyMode { get; set; } + public string EntropyMode { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264Video.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264Video.cs index 3a07135fa8a1..6763c74b531a 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264Video.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/H264Video.cs @@ -52,7 +52,7 @@ public H264Video() /// include: 'Speed', 'Balanced', 'Quality' /// The collection of output H.264 layers to be /// produced by the encoder. - public H264Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), bool? sceneChangeDetection = default(bool?), H264Complexity? complexity = default(H264Complexity?), IList layers = default(IList)) + public H264Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), string stretchMode = default(string), bool? sceneChangeDetection = default(bool?), string complexity = default(string), IList layers = default(IList)) : base(label, keyFrameInterval, stretchMode) { SceneChangeDetection = sceneChangeDetection; @@ -81,7 +81,7 @@ public H264Video() /// 'Balanced', 'Quality' /// [JsonProperty(PropertyName = "complexity")] - public H264Complexity? Complexity { get; set; } + public string Complexity { get; set; } /// /// Gets or sets the collection of output H.264 layers to be produced diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfile.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfile.cs index cbb9594c77a7..aa07b192415e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfile.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfile.cs @@ -10,123 +10,36 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for H264VideoProfile. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(H264VideoProfileConverter))] - public struct H264VideoProfile : System.IEquatable + public static class H264VideoProfile { - private H264VideoProfile(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Tells the encoder to automatically determine the appropriate H.264 /// profile. /// - public static readonly H264VideoProfile Auto = "Auto"; - + public const string Auto = "Auto"; /// /// Baseline profile /// - public static readonly H264VideoProfile Baseline = "Baseline"; - + public const string Baseline = "Baseline"; /// /// Main profile /// - public static readonly H264VideoProfile Main = "Main"; - + public const string Main = "Main"; /// /// High profile. /// - public static readonly H264VideoProfile High = "High"; - + public const string High = "High"; /// /// High 4:2:2 profile. /// - public static readonly H264VideoProfile High422 = "High422"; - + public const string High422 = "High422"; /// /// High 4:4:4 predictive profile. /// - public static readonly H264VideoProfile High444 = "High444"; - - - /// - /// Underlying value of enum H264VideoProfile - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for H264VideoProfile - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type H264VideoProfile - /// - public bool Equals(H264VideoProfile e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to H264VideoProfile - /// - public static implicit operator H264VideoProfile(string value) - { - return new H264VideoProfile(value); - } - - /// - /// Implicit operator to convert H264VideoProfile to string - /// - public static implicit operator string(H264VideoProfile e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum H264VideoProfile - /// - public static bool operator == (H264VideoProfile e1, H264VideoProfile e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum H264VideoProfile - /// - public static bool operator != (H264VideoProfile e1, H264VideoProfile e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for H264VideoProfile - /// - public override bool Equals(object obj) - { - return obj is H264VideoProfile && Equals((H264VideoProfile)obj); - } - - /// - /// Returns for hashCode H264VideoProfile - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string High444 = "High444"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfileConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfileConverter.cs deleted file mode 100644 index 302b91bf8c6e..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/H264VideoProfileConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for H264VideoProfile. - /// - public sealed class H264VideoProfileConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to H264VideoProfile by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(H264VideoProfile).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to H264VideoProfile. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (H264VideoProfile)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for H264VideoProfile for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Image.cs b/src/SDKs/Media/Management.Media/Generated/Models/Image.cs index 13da4a0d4980..6b6d4c13f918 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Image.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Image.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -31,6 +32,12 @@ public Image() /// /// Initializes a new instance of the Image class. /// + /// The position in the input video from where to + /// start generating thumbnails. The value can be in absolute timestamp + /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the + /// 10th frame), or a relative value (For example, 1%). Also supports a + /// macro {Best}, which tells the encoder to select the best thumbnail + /// from the first few seconds of the video. /// An optional label for the codec. The label can /// be used to control muxing behavior. /// The distance between two key frames, @@ -41,12 +48,6 @@ public Image() /// will be resized to fit the desired output resolution(s). Default is /// AutoSize. Possible values include: 'None', 'AutoSize', /// 'AutoFit' - /// The position in the input video from where to - /// start generating thumbnails. The value can be in absolute timestamp - /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the - /// 10th frame), or a relative value (For example, 1%). Also supports a - /// macro {Best}, which tells the encoder to select the best thumbnail - /// from the first few seconds of the video. /// The intervals at which thumbnails are generated. /// The value can be in absolute timestamp (ISO 8601, e.g: PT05S for /// one image every 5 seconds), or a frame count (For example, 30 for @@ -56,7 +57,7 @@ public Image() /// (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a /// frame count (For example, 300 to stop at the 300th frame), or a /// relative value (For example, 100%). - public Image(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), string start = default(string), string step = default(string), string range = default(string)) + public Image(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), string stretchMode = default(string), string step = default(string), string range = default(string)) : base(label, keyFrameInterval, stretchMode) { Start = start; @@ -100,5 +101,18 @@ public Image() [JsonProperty(PropertyName = "range")] public string Range { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Start == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Start"); + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ImageFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/ImageFormat.cs index 8ddd11608a72..23551dc0f2c5 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ImageFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ImageFormat.cs @@ -39,7 +39,7 @@ public ImageFormat() /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The /// type of the audio/video codec. Any unsubstituted macros will be /// collapsed and removed from the filename. - public ImageFormat(string filenamePattern = default(string)) + public ImageFormat(string filenamePattern) : base(filenamePattern) { CustomInit(); @@ -50,5 +50,15 @@ public ImageFormat() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/InsightsType.cs b/src/SDKs/Media/Management.Media/Generated/Models/InsightsType.cs index d012f7b77d3e..e2eafd23ea27 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/InsightsType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/InsightsType.cs @@ -10,110 +10,26 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for InsightsType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(InsightsTypeConverter))] - public struct InsightsType : System.IEquatable + public static class InsightsType { - private InsightsType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Generate audio only insights. Ignore video even if present. Fails /// if no audio is present. /// - public static readonly InsightsType AudioInsightsOnly = "AudioInsightsOnly"; - + public const string AudioInsightsOnly = "AudioInsightsOnly"; /// /// Generate video only insights. Ignore audio if present. Fails if no /// video is present. /// - public static readonly InsightsType VideoInsightsOnly = "VideoInsightsOnly"; - + public const string VideoInsightsOnly = "VideoInsightsOnly"; /// /// Generate both audio and video insights. Fails if either audio or /// video Insights fail. /// - public static readonly InsightsType AllInsights = "AllInsights"; - - - /// - /// Underlying value of enum InsightsType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for InsightsType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type InsightsType - /// - public bool Equals(InsightsType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to InsightsType - /// - public static implicit operator InsightsType(string value) - { - return new InsightsType(value); - } - - /// - /// Implicit operator to convert InsightsType to string - /// - public static implicit operator string(InsightsType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum InsightsType - /// - public static bool operator == (InsightsType e1, InsightsType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum InsightsType - /// - public static bool operator != (InsightsType e1, InsightsType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for InsightsType - /// - public override bool Equals(object obj) - { - return obj is InsightsType && Equals((InsightsType)obj); - } - - /// - /// Returns for hashCode InsightsType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string AllInsights = "AllInsights"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/InsightsTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/InsightsTypeConverter.cs deleted file mode 100644 index 6a75806e8d0a..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/InsightsTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for InsightsType. - /// - public sealed class InsightsTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to InsightsType by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(InsightsType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to InsightsType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (InsightsType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for InsightsType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Job.cs b/src/SDKs/Media/Management.Media/Generated/Models/Job.cs index 519ddb026953..e0eccdcf79d0 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Job.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Job.cs @@ -54,9 +54,9 @@ public Job() /// processed. Higher priority jobs are processed before lower priority /// jobs. If not set, the default is normal. Possible values include: /// 'Low', 'Normal', 'High' - /// Customer provided correlation data + /// Customer provided key, value pairs /// that will be returned in Job and JobOutput state events. - public Job(JobInput input, IList outputs, string id = default(string), string name = default(string), string type = default(string), System.DateTime created = default(System.DateTime), JobState state = default(JobState), string description = default(string), System.DateTime lastModified = default(System.DateTime), Priority? priority = default(Priority?), IDictionary correlationData = default(IDictionary)) + public Job(JobInput input, IList outputs, string id = default(string), string name = default(string), string type = default(string), System.DateTime created = default(System.DateTime), string state = default(string), string description = default(string), System.DateTime lastModified = default(System.DateTime), string priority = default(string), IDictionary correlationData = default(IDictionary)) : base(id, name, type) { Created = created; @@ -88,7 +88,7 @@ public Job() /// 'Queued', 'Scheduled' /// [JsonProperty(PropertyName = "properties.state")] - public JobState State { get; private set; } + public string State { get; private set; } /// /// Gets or sets optional customer supplied description of the Job. @@ -122,10 +122,10 @@ public Job() /// 'Normal', 'High' /// [JsonProperty(PropertyName = "properties.priority")] - public Priority? Priority { get; set; } + public string Priority { get; set; } /// - /// Gets or sets customer provided correlation data that will be + /// Gets or sets customer provided key, value pairs that will be /// returned in Job and JobOutput state events. /// [JsonProperty(PropertyName = "properties.correlationData")] diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobError.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobError.cs index d1b23a32bf66..ea4e0d2d6f8c 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobError.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobError.cs @@ -48,7 +48,7 @@ public JobError() /// 'MayRetry' /// An array of details about specific errors /// that led to this reported error. - public JobError(JobErrorCode code = default(JobErrorCode), string message = default(string), JobErrorCategory category = default(JobErrorCategory), JobRetry retry = default(JobRetry), IList details = default(IList)) + public JobError(string code = default(string), string message = default(string), string category = default(string), string retry = default(string), IList details = default(IList)) { Code = code; Message = message; @@ -71,7 +71,7 @@ public JobError() /// 'ContentMalformed', 'ContentUnsupported' /// [JsonProperty(PropertyName = "code")] - public JobErrorCode Code { get; private set; } + public string Code { get; private set; } /// /// Gets a human-readable language-dependent representation of the @@ -85,7 +85,7 @@ public JobError() /// 'Service', 'Download', 'Upload', 'Configuration', 'Content' /// [JsonProperty(PropertyName = "category")] - public JobErrorCategory Category { get; private set; } + public string Category { get; private set; } /// /// Gets indicates that it may be possible to retry the Job. If retry @@ -93,7 +93,7 @@ public JobError() /// Possible values include: 'DoNotRetry', 'MayRetry' /// [JsonProperty(PropertyName = "retry")] - public JobRetry Retry { get; private set; } + public string Retry { get; private set; } /// /// Gets an array of details about specific errors that led to this diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategory.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategory.cs index 0461ab6be82a..0bfe86022acc 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategory.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategory.cs @@ -10,117 +10,31 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for JobErrorCategory. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(JobErrorCategoryConverter))] - public struct JobErrorCategory : System.IEquatable + public static class JobErrorCategory { - private JobErrorCategory(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The error is service related. /// - public static readonly JobErrorCategory Service = "Service"; - + public const string Service = "Service"; /// /// The error is download related. /// - public static readonly JobErrorCategory Download = "Download"; - + public const string Download = "Download"; /// /// The error is upload related. /// - public static readonly JobErrorCategory Upload = "Upload"; - + public const string Upload = "Upload"; /// /// The error is configuration related. /// - public static readonly JobErrorCategory Configuration = "Configuration"; - + public const string Configuration = "Configuration"; /// /// The error is related to data in the input files. /// - public static readonly JobErrorCategory Content = "Content"; - - - /// - /// Underlying value of enum JobErrorCategory - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for JobErrorCategory - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type JobErrorCategory - /// - public bool Equals(JobErrorCategory e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to JobErrorCategory - /// - public static implicit operator JobErrorCategory(string value) - { - return new JobErrorCategory(value); - } - - /// - /// Implicit operator to convert JobErrorCategory to string - /// - public static implicit operator string(JobErrorCategory e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum JobErrorCategory - /// - public static bool operator == (JobErrorCategory e1, JobErrorCategory e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum JobErrorCategory - /// - public static bool operator != (JobErrorCategory e1, JobErrorCategory e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for JobErrorCategory - /// - public override bool Equals(object obj) - { - return obj is JobErrorCategory && Equals((JobErrorCategory)obj); - } - - /// - /// Returns for hashCode JobErrorCategory - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Content = "Content"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategoryConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategoryConverter.cs deleted file mode 100644 index 3a3341289cea..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCategoryConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for JobErrorCategory. - /// - public sealed class JobErrorCategoryConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to JobErrorCategory by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(JobErrorCategory).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to JobErrorCategory. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (JobErrorCategory)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for JobErrorCategory for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCode.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCode.cs index 74529800c519..8a408273747e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCode.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCode.cs @@ -10,150 +10,60 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for JobErrorCode. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(JobErrorCodeConverter))] - public struct JobErrorCode : System.IEquatable + public static class JobErrorCode { - private JobErrorCode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Fatal service error, please contact support. /// - public static readonly JobErrorCode ServiceError = "ServiceError"; - + public const string ServiceError = "ServiceError"; /// /// Transient error, please retry, if retry is unsuccessful, please /// contact support. /// - public static readonly JobErrorCode ServiceTransientError = "ServiceTransientError"; - + public const string ServiceTransientError = "ServiceTransientError"; /// /// While trying to download the input files, the files were not /// accessible, please check the availability of the source. /// - public static readonly JobErrorCode DownloadNotAccessible = "DownloadNotAccessible"; - + public const string DownloadNotAccessible = "DownloadNotAccessible"; /// /// While trying to download the input files, there was an issue during /// transfer (storage service, network errors), see details and check /// your source. /// - public static readonly JobErrorCode DownloadTransientError = "DownloadTransientError"; - + public const string DownloadTransientError = "DownloadTransientError"; /// /// While trying to upload the output files, the destination was not /// reachable, please check the availability of the destination. /// - public static readonly JobErrorCode UploadNotAccessible = "UploadNotAccessible"; - + public const string UploadNotAccessible = "UploadNotAccessible"; /// /// While trying to upload the output files, there was an issue during /// transfer (storage service, network errors), see details and check /// your destination. /// - public static readonly JobErrorCode UploadTransientError = "UploadTransientError"; - + public const string UploadTransientError = "UploadTransientError"; /// /// There was a problem with the combination of input files and the /// configuration settings applied, fix the configuration settings and /// retry with the same input, or change input to match the /// configuration. /// - public static readonly JobErrorCode ConfigurationUnsupported = "ConfigurationUnsupported"; - + public const string ConfigurationUnsupported = "ConfigurationUnsupported"; /// /// There was a problem with the input content (for example: zero byte /// files, or corrupt/non-decodable files), check the input files. /// - public static readonly JobErrorCode ContentMalformed = "ContentMalformed"; - + public const string ContentMalformed = "ContentMalformed"; /// /// There was a problem with the format of the input (not valid media /// file, or an unsupported file/codec), check the validity of the /// input files. /// - public static readonly JobErrorCode ContentUnsupported = "ContentUnsupported"; - - - /// - /// Underlying value of enum JobErrorCode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for JobErrorCode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type JobErrorCode - /// - public bool Equals(JobErrorCode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to JobErrorCode - /// - public static implicit operator JobErrorCode(string value) - { - return new JobErrorCode(value); - } - - /// - /// Implicit operator to convert JobErrorCode to string - /// - public static implicit operator string(JobErrorCode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum JobErrorCode - /// - public static bool operator == (JobErrorCode e1, JobErrorCode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum JobErrorCode - /// - public static bool operator != (JobErrorCode e1, JobErrorCode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for JobErrorCode - /// - public override bool Equals(object obj) - { - return obj is JobErrorCode && Equals((JobErrorCode)obj); - } - - /// - /// Returns for hashCode JobErrorCode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string ContentUnsupported = "ContentUnsupported"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCodeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCodeConverter.cs deleted file mode 100644 index b0fe998dcabe..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobErrorCodeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for JobErrorCode. - /// - public sealed class JobErrorCodeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to JobErrorCode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(JobErrorCode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to JobErrorCode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (JobErrorCode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for JobErrorCode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobInputAsset.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobInputAsset.cs index 665286ef55db..d62d4a998c46 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobInputAsset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobInputAsset.cs @@ -34,8 +34,8 @@ public JobInputAsset() /// Initializes a new instance of the JobInputAsset class. /// /// The name of the input Asset. - /// List of files. Required for - /// JobInputHttp. + /// List of files. Required for JobInputHttp. + /// Maximum of 4000 characters each. /// A label that is assigned to a JobInputClip, /// that is used to satisfy a reference used in the Transform. For /// example, a Transform can be authored so as to take an image file diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobInputClip.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobInputClip.cs index 38c319823462..a1623659985b 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobInputClip.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobInputClip.cs @@ -32,8 +32,8 @@ public JobInputClip() /// /// Initializes a new instance of the JobInputClip class. /// - /// List of files. Required for - /// JobInputHttp. + /// List of files. Required for JobInputHttp. + /// Maximum of 4000 characters each. /// A label that is assigned to a JobInputClip, /// that is used to satisfy a reference used in the Transform. For /// example, a Transform can be authored so as to take an image file @@ -54,7 +54,8 @@ public JobInputClip() partial void CustomInit(); /// - /// Gets or sets list of files. Required for JobInputHttp. + /// Gets or sets list of files. Required for JobInputHttp. Maximum of + /// 4000 characters each. /// [JsonProperty(PropertyName = "files")] public IList Files { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobInputHttp.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobInputHttp.cs index fefa79b34b60..3b9e36d4faa3 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobInputHttp.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobInputHttp.cs @@ -32,8 +32,8 @@ public JobInputHttp() /// /// Initializes a new instance of the JobInputHttp class. /// - /// List of files. Required for - /// JobInputHttp. + /// List of files. Required for JobInputHttp. + /// Maximum of 4000 characters each. /// A label that is assigned to a JobInputClip, /// that is used to satisfy a reference used in the Transform. For /// example, a Transform can be authored so as to take an image file @@ -42,9 +42,9 @@ public JobInputHttp() /// the JobInputs should be the image file, and it should have the /// label 'xyz'. /// Base URI for HTTPS job input. It will be - /// concatenated with provided file names. If no base uri is given, - /// then the provided file list is assumed to be fully qualified - /// uris. + /// concatenated with provided file names. If no base uri is given, + /// then the provided file list is assumed to be fully qualified uris. + /// Maximum length of 4000 characters. public JobInputHttp(IList files = default(IList), string label = default(string), string baseUri = default(string)) : base(files, label) { @@ -59,8 +59,9 @@ public JobInputHttp() /// /// Gets or sets base URI for HTTPS job input. It will be concatenated - /// with provided file names. If no base uri is given, then the - /// provided file list is assumed to be fully qualified uris. + /// with provided file names. If no base uri is given, then the + /// provided file list is assumed to be fully qualified uris. Maximum + /// length of 4000 characters. /// [JsonProperty(PropertyName = "baseUri")] public string BaseUri { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobOutput.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobOutput.cs index 9b2ac8cde407..24df3f5c26c1 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobOutput.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobOutput.cs @@ -53,7 +53,7 @@ public JobOutput() /// this JobOutput within the Job. Note that this index is the same as /// the relative index of the corresponding TransformOutput within its /// Transform. - public JobOutput(JobError error = default(JobError), JobState state = default(JobState), int progress = default(int), string label = default(string)) + public JobOutput(JobError error = default(JobError), string state = default(string), int progress = default(int), string label = default(string)) { Error = error; State = state; @@ -80,7 +80,7 @@ public JobOutput() /// 'Queued', 'Scheduled' /// [JsonProperty(PropertyName = "state")] - public JobState State { get; private set; } + public string State { get; private set; } /// /// Gets if the JobOutput is in a Processing state, this contains the diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobOutputAsset.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobOutputAsset.cs index 661be29054b8..649d86206486 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobOutputAsset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobOutputAsset.cs @@ -56,7 +56,7 @@ public JobOutputAsset() /// this JobOutput within the Job. Note that this index is the same as /// the relative index of the corresponding TransformOutput within its /// Transform. - public JobOutputAsset(string assetName, JobError error = default(JobError), JobState state = default(JobState), int progress = default(int), string label = default(string)) + public JobOutputAsset(string assetName, JobError error = default(JobError), string state = default(string), int progress = default(int), string label = default(string)) : base(error, state, progress, label) { AssetName = assetName; diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobRetry.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobRetry.cs index 9c1bbc42ff3f..633eb0339a7e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobRetry.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobRetry.cs @@ -10,105 +10,22 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for JobRetry. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(JobRetryConverter))] - public struct JobRetry : System.IEquatable + public static class JobRetry { - private JobRetry(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Issue needs to be investigated and then the job resubmitted with /// corrections or retried once the underlying issue has been /// corrected. /// - public static readonly JobRetry DoNotRetry = "DoNotRetry"; - + public const string DoNotRetry = "DoNotRetry"; /// /// Issue may be resolved after waiting for a period of time and /// resubmitting the same Job. /// - public static readonly JobRetry MayRetry = "MayRetry"; - - - /// - /// Underlying value of enum JobRetry - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for JobRetry - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type JobRetry - /// - public bool Equals(JobRetry e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to JobRetry - /// - public static implicit operator JobRetry(string value) - { - return new JobRetry(value); - } - - /// - /// Implicit operator to convert JobRetry to string - /// - public static implicit operator string(JobRetry e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum JobRetry - /// - public static bool operator == (JobRetry e1, JobRetry e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum JobRetry - /// - public static bool operator != (JobRetry e1, JobRetry e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for JobRetry - /// - public override bool Equals(object obj) - { - return obj is JobRetry && Equals((JobRetry)obj); - } - - /// - /// Returns for hashCode JobRetry - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string MayRetry = "MayRetry"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobRetryConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobRetryConverter.cs deleted file mode 100644 index c89965bdb3ed..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobRetryConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for JobRetry. - /// - public sealed class JobRetryConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to JobRetry by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(JobRetry).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to JobRetry. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (JobRetry)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for JobRetry for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobState.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobState.cs index 8ea03d761df5..ab798f686e20 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobState.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JobState.cs @@ -10,131 +10,43 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for JobState. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(JobStateConverter))] - public struct JobState : System.IEquatable + public static class JobState { - private JobState(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The job was canceled. This is a final state for the job. /// - public static readonly JobState Canceled = "Canceled"; - + public const string Canceled = "Canceled"; /// /// The job is in the process of being canceled. This is a transient /// state for the job. /// - public static readonly JobState Canceling = "Canceling"; - + public const string Canceling = "Canceling"; /// /// The job has encountered an error. This is a final state for the /// job. /// - public static readonly JobState Error = "Error"; - + public const string Error = "Error"; /// /// The job is finished. This is a final state for the job. /// - public static readonly JobState Finished = "Finished"; - + public const string Finished = "Finished"; /// /// The job is processing. This is a transient state for the job. /// - public static readonly JobState Processing = "Processing"; - + public const string Processing = "Processing"; /// /// The job is in a queued state, waiting for resources to become /// available. This is a transient state. /// - public static readonly JobState Queued = "Queued"; - + public const string Queued = "Queued"; /// /// The job is being scheduled to run on an available resource. This is /// a transient state, between queued and processing states. /// - public static readonly JobState Scheduled = "Scheduled"; - - - /// - /// Underlying value of enum JobState - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for JobState - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type JobState - /// - public bool Equals(JobState e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to JobState - /// - public static implicit operator JobState(string value) - { - return new JobState(value); - } - - /// - /// Implicit operator to convert JobState to string - /// - public static implicit operator string(JobState e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum JobState - /// - public static bool operator == (JobState e1, JobState e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum JobState - /// - public static bool operator != (JobState e1, JobState e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for JobState - /// - public override bool Equals(object obj) - { - return obj is JobState && Equals((JobState)obj); - } - - /// - /// Returns for hashCode JobState - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Scheduled = "Scheduled"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JobStateConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/JobStateConverter.cs deleted file mode 100644 index fd6eea8c5880..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/JobStateConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for JobState. - /// - public sealed class JobStateConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to JobState by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(JobState).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to JobState. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (JobState)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for JobState for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JpgFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/JpgFormat.cs index 035f9de52085..6b8f9d6f27e8 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JpgFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JpgFormat.cs @@ -39,7 +39,7 @@ public JpgFormat() /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The /// type of the audio/video codec. Any unsubstituted macros will be /// collapsed and removed from the filename. - public JpgFormat(string filenamePattern = default(string)) + public JpgFormat(string filenamePattern) : base(filenamePattern) { CustomInit(); @@ -50,5 +50,15 @@ public JpgFormat() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/JpgImage.cs b/src/SDKs/Media/Management.Media/Generated/Models/JpgImage.cs index a3db6fd2b504..e6fc99e9074b 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/JpgImage.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/JpgImage.cs @@ -33,6 +33,12 @@ public JpgImage() /// /// Initializes a new instance of the JpgImage class. /// + /// The position in the input video from where to + /// start generating thumbnails. The value can be in absolute timestamp + /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the + /// 10th frame), or a relative value (For example, 1%). Also supports a + /// macro {Best}, which tells the encoder to select the best thumbnail + /// from the first few seconds of the video. /// An optional label for the codec. The label can /// be used to control muxing behavior. /// The distance between two key frames, @@ -43,12 +49,6 @@ public JpgImage() /// will be resized to fit the desired output resolution(s). Default is /// AutoSize. Possible values include: 'None', 'AutoSize', /// 'AutoFit' - /// The position in the input video from where to - /// start generating thumbnails. The value can be in absolute timestamp - /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the - /// 10th frame), or a relative value (For example, 1%). Also supports a - /// macro {Best}, which tells the encoder to select the best thumbnail - /// from the first few seconds of the video. /// The intervals at which thumbnails are generated. /// The value can be in absolute timestamp (ISO 8601, e.g: PT05S for /// one image every 5 seconds), or a frame count (For example, 30 for @@ -60,8 +60,8 @@ public JpgImage() /// relative value (For example, 100%). /// A collection of output JPEG image layers to be /// produced by the encoder. - public JpgImage(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), string start = default(string), string step = default(string), string range = default(string), IList layers = default(IList)) - : base(label, keyFrameInterval, stretchMode, start, step, range) + public JpgImage(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), string stretchMode = default(string), string step = default(string), string range = default(string), IList layers = default(IList)) + : base(start, label, keyFrameInterval, stretchMode, step, range) { Layers = layers; CustomInit(); @@ -79,5 +79,15 @@ public JpgImage() [JsonProperty(PropertyName = "layers")] public IList Layers { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/ListContainerSasInput.cs b/src/SDKs/Media/Management.Media/Generated/Models/ListContainerSasInput.cs index 2d487a6d9ec5..4193d3efe34c 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/ListContainerSasInput.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/ListContainerSasInput.cs @@ -34,7 +34,7 @@ public ListContainerSasInput() /// 'ReadWriteDelete' /// The SAS URL expiration time. This must be /// less than 24 hours from the current time. - public ListContainerSasInput(AssetContainerPermission? permissions = default(AssetContainerPermission?), System.DateTime? expiryTime = default(System.DateTime?)) + public ListContainerSasInput(string permissions = default(string), System.DateTime? expiryTime = default(System.DateTime?)) { Permissions = permissions; ExpiryTime = expiryTime; @@ -51,7 +51,7 @@ public ListContainerSasInput() /// include: 'Read', 'ReadWrite', 'ReadWriteDelete' /// [JsonProperty(PropertyName = "permissions")] - public AssetContainerPermission? Permissions { get; set; } + public string Permissions { get; set; } /// /// Gets or sets the SAS URL expiration time. This must be less than diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Metric.cs b/src/SDKs/Media/Management.Media/Generated/Models/Metric.cs index 54bf56b6e8ed..7029a7dc9066 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Metric.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Metric.cs @@ -40,7 +40,7 @@ public Metric() /// The metric aggregation type. Possible /// values include: 'Average', 'Count', 'Total' /// The metric dimensions. - public Metric(string name = default(string), string displayName = default(string), string displayDescription = default(string), MetricUnit unit = default(MetricUnit), MetricAggregationType aggregationType = default(MetricAggregationType), IList dimensions = default(IList)) + public Metric(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string aggregationType = default(string), IList dimensions = default(IList)) { Name = name; DisplayName = displayName; @@ -79,14 +79,14 @@ public Metric() /// 'Milliseconds' /// [JsonProperty(PropertyName = "unit")] - public MetricUnit Unit { get; private set; } + public string Unit { get; private set; } /// /// Gets the metric aggregation type. Possible values include: /// 'Average', 'Count', 'Total' /// [JsonProperty(PropertyName = "aggregationType")] - public MetricAggregationType AggregationType { get; private set; } + public string AggregationType { get; private set; } /// /// Gets the metric dimensions. diff --git a/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationType.cs b/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationType.cs index b069d651558c..e1a233a66147 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationType.cs @@ -10,107 +10,23 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for MetricAggregationType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(MetricAggregationTypeConverter))] - public struct MetricAggregationType : System.IEquatable + public static class MetricAggregationType { - private MetricAggregationType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The average. /// - public static readonly MetricAggregationType Average = "Average"; - + public const string Average = "Average"; /// /// The count of a number of items, usually requests. /// - public static readonly MetricAggregationType Count = "Count"; - + public const string Count = "Count"; /// /// The sum. /// - public static readonly MetricAggregationType Total = "Total"; - - - /// - /// Underlying value of enum MetricAggregationType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for MetricAggregationType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type MetricAggregationType - /// - public bool Equals(MetricAggregationType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to MetricAggregationType - /// - public static implicit operator MetricAggregationType(string value) - { - return new MetricAggregationType(value); - } - - /// - /// Implicit operator to convert MetricAggregationType to string - /// - public static implicit operator string(MetricAggregationType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum MetricAggregationType - /// - public static bool operator == (MetricAggregationType e1, MetricAggregationType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum MetricAggregationType - /// - public static bool operator != (MetricAggregationType e1, MetricAggregationType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for MetricAggregationType - /// - public override bool Equals(object obj) - { - return obj is MetricAggregationType && Equals((MetricAggregationType)obj); - } - - /// - /// Returns for hashCode MetricAggregationType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Total = "Total"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationTypeConverter.cs deleted file mode 100644 index beabd2872d6a..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/MetricAggregationTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for MetricAggregationType. - /// - public sealed class MetricAggregationTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to MetricAggregationType by - /// the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(MetricAggregationType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to MetricAggregationType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (MetricAggregationType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for MetricAggregationType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/MetricUnit.cs b/src/SDKs/Media/Management.Media/Generated/Models/MetricUnit.cs index becfa8efc836..e54972f44a13 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/MetricUnit.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/MetricUnit.cs @@ -10,107 +10,23 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for MetricUnit. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(MetricUnitConverter))] - public struct MetricUnit : System.IEquatable + public static class MetricUnit { - private MetricUnit(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The number of bytes. /// - public static readonly MetricUnit Bytes = "Bytes"; - + public const string Bytes = "Bytes"; /// /// The count. /// - public static readonly MetricUnit Count = "Count"; - + public const string Count = "Count"; /// /// The number of milliseconds. /// - public static readonly MetricUnit Milliseconds = "Milliseconds"; - - - /// - /// Underlying value of enum MetricUnit - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for MetricUnit - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type MetricUnit - /// - public bool Equals(MetricUnit e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to MetricUnit - /// - public static implicit operator MetricUnit(string value) - { - return new MetricUnit(value); - } - - /// - /// Implicit operator to convert MetricUnit to string - /// - public static implicit operator string(MetricUnit e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum MetricUnit - /// - public static bool operator == (MetricUnit e1, MetricUnit e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum MetricUnit - /// - public static bool operator != (MetricUnit e1, MetricUnit e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for MetricUnit - /// - public override bool Equals(object obj) - { - return obj is MetricUnit && Equals((MetricUnit)obj); - } - - /// - /// Returns for hashCode MetricUnit - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Milliseconds = "Milliseconds"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/MetricUnitConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/MetricUnitConverter.cs deleted file mode 100644 index 39fbd2c286b6..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/MetricUnitConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for MetricUnit. - /// - public sealed class MetricUnitConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to MetricUnit by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(MetricUnit).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to MetricUnit. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (MetricUnit)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for MetricUnit for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Mp4Format.cs b/src/SDKs/Media/Management.Media/Generated/Models/Mp4Format.cs index 080067cd7ef6..e7ab6e39eeae 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Mp4Format.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Mp4Format.cs @@ -44,7 +44,7 @@ public Mp4Format() /// The list of output files to produce. /// Each entry in the list is a set of audio and video layer labels to /// be muxed together . - public Mp4Format(string filenamePattern = default(string), IList outputFiles = default(IList)) + public Mp4Format(string filenamePattern, IList outputFiles = default(IList)) : base(filenamePattern, outputFiles) { CustomInit(); @@ -55,5 +55,15 @@ public Mp4Format() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/MultiBitrateFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/MultiBitrateFormat.cs index 7ba722161315..cf0d6aaebb6c 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/MultiBitrateFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/MultiBitrateFormat.cs @@ -48,7 +48,7 @@ public MultiBitrateFormat() /// The list of output files to produce. /// Each entry in the list is a set of audio and video layer labels to /// be muxed together . - public MultiBitrateFormat(string filenamePattern = default(string), IList outputFiles = default(IList)) + public MultiBitrateFormat(string filenamePattern, IList outputFiles = default(IList)) : base(filenamePattern) { OutputFiles = outputFiles; @@ -68,5 +68,25 @@ public MultiBitrateFormat() [JsonProperty(PropertyName = "outputFiles")] public IList OutputFiles { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (OutputFiles != null) + { + foreach (var element in OutputFiles) + { + if (element != null) + { + element.Validate(); + } + } + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/OnErrorType.cs b/src/SDKs/Media/Management.Media/Generated/Models/OnErrorType.cs index 62c817d94560..86ec73c6478c 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/OnErrorType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/OnErrorType.cs @@ -10,104 +10,21 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for OnErrorType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(OnErrorTypeConverter))] - public struct OnErrorType : System.IEquatable + public static class OnErrorType { - private OnErrorType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Tells the service that if this TransformOutput fails, then any /// other incomplete TransformOutputs can be stopped. /// - public static readonly OnErrorType StopProcessingJob = "StopProcessingJob"; - + public const string StopProcessingJob = "StopProcessingJob"; /// /// Tells the service that if this TransformOutput fails, then allow /// any other TransformOutput to continue. /// - public static readonly OnErrorType ContinueJob = "ContinueJob"; - - - /// - /// Underlying value of enum OnErrorType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for OnErrorType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type OnErrorType - /// - public bool Equals(OnErrorType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to OnErrorType - /// - public static implicit operator OnErrorType(string value) - { - return new OnErrorType(value); - } - - /// - /// Implicit operator to convert OnErrorType to string - /// - public static implicit operator string(OnErrorType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum OnErrorType - /// - public static bool operator == (OnErrorType e1, OnErrorType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum OnErrorType - /// - public static bool operator != (OnErrorType e1, OnErrorType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for OnErrorType - /// - public override bool Equals(object obj) - { - return obj is OnErrorType && Equals((OnErrorType)obj); - } - - /// - /// Returns for hashCode OnErrorType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string ContinueJob = "ContinueJob"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/OnErrorTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/OnErrorTypeConverter.cs deleted file mode 100644 index caa81cc85247..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/OnErrorTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for OnErrorType. - /// - public sealed class OnErrorTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to OnErrorType by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(OnErrorType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to OnErrorType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (OnErrorType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for OnErrorType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/OutputFile.cs b/src/SDKs/Media/Management.Media/Generated/Models/OutputFile.cs index 46b5fc2b8455..799a4b69fb5e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/OutputFile.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/OutputFile.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -38,7 +39,7 @@ public OutputFile() /// '[v1, a1]' tells the encoder to produce an output file with the /// video track represented by v1 and the audio track represented by /// a1. - public OutputFile(IList labels = default(IList)) + public OutputFile(IList labels) { Labels = labels; CustomInit(); @@ -60,5 +61,18 @@ public OutputFile() [JsonProperty(PropertyName = "labels")] public IList Labels { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Labels == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Labels"); + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Overlay.cs b/src/SDKs/Media/Management.Media/Generated/Models/Overlay.cs index 1be2f438032d..2cf4cdbb69eb 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Overlay.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Overlay.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -58,7 +59,7 @@ public Overlay() /// The gain level of audio in the /// overlay. The value should be in the range [0, 1.0]. The default is /// 1.0. - public Overlay(string inputLabel = default(string), System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?)) + public Overlay(string inputLabel, System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?)) { InputLabel = inputLabel; Start = start; @@ -131,5 +132,18 @@ public Overlay() [JsonProperty(PropertyName = "audioGainLevel")] public double? AudioGainLevel { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (InputLabel == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "InputLabel"); + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/PngFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/PngFormat.cs index 28bfe3e74bc8..6776df04195f 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/PngFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/PngFormat.cs @@ -39,7 +39,7 @@ public PngFormat() /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The /// type of the audio/video codec. Any unsubstituted macros will be /// collapsed and removed from the filename. - public PngFormat(string filenamePattern = default(string)) + public PngFormat(string filenamePattern) : base(filenamePattern) { CustomInit(); @@ -50,5 +50,15 @@ public PngFormat() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/PngImage.cs b/src/SDKs/Media/Management.Media/Generated/Models/PngImage.cs index 762938308250..6838c71a4ef5 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/PngImage.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/PngImage.cs @@ -33,6 +33,12 @@ public PngImage() /// /// Initializes a new instance of the PngImage class. /// + /// The position in the input video from where to + /// start generating thumbnails. The value can be in absolute timestamp + /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the + /// 10th frame), or a relative value (For example, 1%). Also supports a + /// macro {Best}, which tells the encoder to select the best thumbnail + /// from the first few seconds of the video. /// An optional label for the codec. The label can /// be used to control muxing behavior. /// The distance between two key frames, @@ -43,12 +49,6 @@ public PngImage() /// will be resized to fit the desired output resolution(s). Default is /// AutoSize. Possible values include: 'None', 'AutoSize', /// 'AutoFit' - /// The position in the input video from where to - /// start generating thumbnails. The value can be in absolute timestamp - /// (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the - /// 10th frame), or a relative value (For example, 1%). Also supports a - /// macro {Best}, which tells the encoder to select the best thumbnail - /// from the first few seconds of the video. /// The intervals at which thumbnails are generated. /// The value can be in absolute timestamp (ISO 8601, e.g: PT05S for /// one image every 5 seconds), or a frame count (For example, 30 for @@ -60,8 +60,8 @@ public PngImage() /// relative value (For example, 100%). /// A collection of output PNG image layers to be /// produced by the encoder. - public PngImage(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), string start = default(string), string step = default(string), string range = default(string), IList layers = default(IList)) - : base(label, keyFrameInterval, stretchMode, start, step, range) + public PngImage(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), string stretchMode = default(string), string step = default(string), string range = default(string), IList layers = default(IList)) + : base(start, label, keyFrameInterval, stretchMode, step, range) { Layers = layers; CustomInit(); @@ -79,5 +79,15 @@ public PngImage() [JsonProperty(PropertyName = "layers")] public IList Layers { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Priority.cs b/src/SDKs/Media/Management.Media/Generated/Models/Priority.cs index 9dca8eea07ab..f5be1750dca0 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Priority.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Priority.cs @@ -10,108 +10,24 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for Priority. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(PriorityConverter))] - public struct Priority : System.IEquatable + public static class Priority { - private Priority(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Used for TransformOutputs that can be generated after Normal and /// High priority TransformOutputs. /// - public static readonly Priority Low = "Low"; - + public const string Low = "Low"; /// /// Used for TransformOutputs that can be generated at Normal priority. /// - public static readonly Priority Normal = "Normal"; - + public const string Normal = "Normal"; /// /// Used for TransformOutputs that should take precedence over others. /// - public static readonly Priority High = "High"; - - - /// - /// Underlying value of enum Priority - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for Priority - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type Priority - /// - public bool Equals(Priority e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to Priority - /// - public static implicit operator Priority(string value) - { - return new Priority(value); - } - - /// - /// Implicit operator to convert Priority to string - /// - public static implicit operator string(Priority e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum Priority - /// - public static bool operator == (Priority e1, Priority e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum Priority - /// - public static bool operator != (Priority e1, Priority e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for Priority - /// - public override bool Equals(object obj) - { - return obj is Priority && Equals((Priority)obj); - } - - /// - /// Returns for hashCode Priority - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string High = "High"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/PriorityConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/PriorityConverter.cs deleted file mode 100644 index 56415c95237f..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/PriorityConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for Priority. - /// - public sealed class PriorityConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to Priority by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(Priority).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to Priority. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (Priority)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for Priority for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Rotation.cs b/src/SDKs/Media/Management.Media/Generated/Models/Rotation.cs index 484a8f6f179f..fc68826d66de 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Rotation.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Rotation.cs @@ -10,123 +10,36 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for Rotation. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(RotationConverter))] - public struct Rotation : System.IEquatable + public static class Rotation { - private Rotation(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Automatically detect and rotate as needed. /// - public static readonly Rotation Auto = "Auto"; - + public const string Auto = "Auto"; /// /// Do not rotate the video. If the output format supports it, any /// metadata about rotation is kept intact. /// - public static readonly Rotation None = "None"; - + public const string None = "None"; /// /// Do not rotate the video but remove any metadata about the rotation. /// - public static readonly Rotation Rotate0 = "Rotate0"; - + public const string Rotate0 = "Rotate0"; /// /// Rotate 90 degrees clockwise. /// - public static readonly Rotation Rotate90 = "Rotate90"; - + public const string Rotate90 = "Rotate90"; /// /// Rotate 180 degrees clockwise. /// - public static readonly Rotation Rotate180 = "Rotate180"; - + public const string Rotate180 = "Rotate180"; /// /// Rotate 270 degrees clockwise. /// - public static readonly Rotation Rotate270 = "Rotate270"; - - - /// - /// Underlying value of enum Rotation - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for Rotation - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type Rotation - /// - public bool Equals(Rotation e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to Rotation - /// - public static implicit operator Rotation(string value) - { - return new Rotation(value); - } - - /// - /// Implicit operator to convert Rotation to string - /// - public static implicit operator string(Rotation e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum Rotation - /// - public static bool operator == (Rotation e1, Rotation e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum Rotation - /// - public static bool operator != (Rotation e1, Rotation e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for Rotation - /// - public override bool Equals(object obj) - { - return obj is Rotation && Equals((Rotation)obj); - } - - /// - /// Returns for hashCode Rotation - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Rotate270 = "Rotate270"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/RotationConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/RotationConverter.cs deleted file mode 100644 index 9c69486b0110..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/RotationConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for Rotation. - /// - public sealed class RotationConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to Rotation by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(Rotation).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to Rotation. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (Rotation)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for Rotation for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StandardEncoderPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/StandardEncoderPreset.cs index 818470e213a4..5718877c040e 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StandardEncoderPreset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StandardEncoderPreset.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -33,13 +34,13 @@ public StandardEncoderPreset() /// /// Initializes a new instance of the StandardEncoderPreset class. /// - /// One or more filtering operations that are - /// applied to the input media before encoding. /// The list of codecs to be used when encoding /// the input video. /// The list of outputs to be produced by the /// encoder. - public StandardEncoderPreset(Filters filters = default(Filters), IList codecs = default(IList), IList formats = default(IList)) + /// One or more filtering operations that are + /// applied to the input media before encoding. + public StandardEncoderPreset(IList codecs, IList formats, Filters filters = default(Filters)) { Filters = filters; Codecs = codecs; @@ -72,5 +73,32 @@ public StandardEncoderPreset() [JsonProperty(PropertyName = "formats")] public IList Formats { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Codecs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Codecs"); + } + if (Formats == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Formats"); + } + if (Formats != null) + { + foreach (var element in Formats) + { + if (element != null) + { + element.Validate(); + } + } + } + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccount.cs b/src/SDKs/Media/Management.Media/Generated/Models/StorageAccount.cs index 40bbb97259e3..e4c3869bae17 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccount.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StorageAccount.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -36,7 +37,7 @@ public StorageAccount() /// primary storage account must be a Standard Storage account (either /// Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage /// accounts can be added as secondary storage accounts. - public StorageAccount(StorageAccountType type, string id = default(string)) + public StorageAccount(string type, string id = default(string)) { Id = id; Type = type; @@ -63,16 +64,20 @@ public StorageAccount() /// include: 'Primary', 'Secondary' /// [JsonProperty(PropertyName = "type")] - public StorageAccountType Type { get; set; } + public string Type { get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountType.cs b/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountType.cs index d460997db4e1..a72ee85edbbd 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountType.cs @@ -10,102 +10,19 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for StorageAccountType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(StorageAccountTypeConverter))] - public struct StorageAccountType : System.IEquatable + public static class StorageAccountType { - private StorageAccountType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// The primary storage account for the Media Services account. /// - public static readonly StorageAccountType Primary = "Primary"; - + public const string Primary = "Primary"; /// /// A secondary storage account for the Media Services account. /// - public static readonly StorageAccountType Secondary = "Secondary"; - - - /// - /// Underlying value of enum StorageAccountType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for StorageAccountType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type StorageAccountType - /// - public bool Equals(StorageAccountType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to StorageAccountType - /// - public static implicit operator StorageAccountType(string value) - { - return new StorageAccountType(value); - } - - /// - /// Implicit operator to convert StorageAccountType to string - /// - public static implicit operator string(StorageAccountType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum StorageAccountType - /// - public static bool operator == (StorageAccountType e1, StorageAccountType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum StorageAccountType - /// - public static bool operator != (StorageAccountType e1, StorageAccountType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for StorageAccountType - /// - public override bool Equals(object obj) - { - return obj is StorageAccountType && Equals((StorageAccountType)obj); - } - - /// - /// Returns for hashCode StorageAccountType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Secondary = "Secondary"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountTypeConverter.cs deleted file mode 100644 index 228430d53e50..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/StorageAccountTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for StorageAccountType. - /// - public sealed class StorageAccountTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to StorageAccountType by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(StorageAccountType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to StorageAccountType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (StorageAccountType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for StorageAccountType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocator.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocator.cs index abaa8f67e97e..85b68174ef3d 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocator.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocator.cs @@ -61,7 +61,9 @@ public StreamingLocator() /// Locator. /// Alternative Media ID of this /// Streaming Locator - public StreamingLocator(string assetName, string streamingPolicyName, string id = default(string), string name = default(string), string type = default(string), System.DateTime created = default(System.DateTime), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.Guid? streamingLocatorId = default(System.Guid?), string defaultContentKeyPolicyName = default(string), IList contentKeys = default(IList), string alternativeMediaId = default(string)) + /// A list of asset or account filters which + /// apply to this streaming locator + public StreamingLocator(string assetName, string streamingPolicyName, string id = default(string), string name = default(string), string type = default(string), System.DateTime created = default(System.DateTime), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.Guid? streamingLocatorId = default(System.Guid?), string defaultContentKeyPolicyName = default(string), IList contentKeys = default(IList), string alternativeMediaId = default(string), IList filters = default(IList)) : base(id, name, type) { AssetName = assetName; @@ -73,6 +75,7 @@ public StreamingLocator() DefaultContentKeyPolicyName = defaultContentKeyPolicyName; ContentKeys = contentKeys; AlternativeMediaId = alternativeMediaId; + Filters = filters; CustomInit(); } @@ -143,6 +146,13 @@ public StreamingLocator() [JsonProperty(PropertyName = "properties.alternativeMediaId")] public string AlternativeMediaId { get; set; } + /// + /// Gets or sets a list of asset or account filters which apply to this + /// streaming locator + /// + [JsonProperty(PropertyName = "properties.filters")] + public IList Filters { get; set; } + /// /// Validate the object. /// diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKey.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKey.cs index 248c8631f126..adb3ca9bad88 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKey.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKey.cs @@ -41,7 +41,7 @@ public StreamingLocatorContentKey() /// ContentKeyPolicy used by Content /// Key /// Tracks which use this Content Key - public StreamingLocatorContentKey(System.Guid id, StreamingLocatorContentKeyType type = default(StreamingLocatorContentKeyType), string labelReferenceInStreamingPolicy = default(string), string value = default(string), string policyName = default(string), IList tracks = default(IList)) + public StreamingLocatorContentKey(System.Guid id, string type = default(string), string labelReferenceInStreamingPolicy = default(string), string value = default(string), string policyName = default(string), IList tracks = default(IList)) { Id = id; Type = type; @@ -69,7 +69,7 @@ public StreamingLocatorContentKey() /// 'EnvelopeEncryption' /// [JsonProperty(PropertyName = "type")] - public StreamingLocatorContentKeyType Type { get; private set; } + public string Type { get; private set; } /// /// Gets or sets label of Content Key as specified in the Streaming diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyType.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyType.cs index 5e8108fa06be..6452814740a6 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyType.cs @@ -10,109 +10,23 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for StreamingLocatorContentKeyType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(StreamingLocatorContentKeyTypeConverter))] - public struct StreamingLocatorContentKeyType : System.IEquatable + public static class StreamingLocatorContentKeyType { - private StreamingLocatorContentKeyType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Common Encryption using CENC /// - public static readonly StreamingLocatorContentKeyType CommonEncryptionCenc = "CommonEncryptionCenc"; - + public const string CommonEncryptionCenc = "CommonEncryptionCenc"; /// /// Common Encryption using CBCS /// - public static readonly StreamingLocatorContentKeyType CommonEncryptionCbcs = "CommonEncryptionCbcs"; - + public const string CommonEncryptionCbcs = "CommonEncryptionCbcs"; /// /// Envelope Encryption /// - public static readonly StreamingLocatorContentKeyType EnvelopeEncryption = "EnvelopeEncryption"; - - - /// - /// Underlying value of enum StreamingLocatorContentKeyType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for StreamingLocatorContentKeyType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type StreamingLocatorContentKeyType - /// - public bool Equals(StreamingLocatorContentKeyType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// StreamingLocatorContentKeyType - /// - public static implicit operator StreamingLocatorContentKeyType(string value) - { - return new StreamingLocatorContentKeyType(value); - } - - /// - /// Implicit operator to convert StreamingLocatorContentKeyType to - /// string - /// - public static implicit operator string(StreamingLocatorContentKeyType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum StreamingLocatorContentKeyType - /// - public static bool operator == (StreamingLocatorContentKeyType e1, StreamingLocatorContentKeyType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum StreamingLocatorContentKeyType - /// - public static bool operator != (StreamingLocatorContentKeyType e1, StreamingLocatorContentKeyType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for StreamingLocatorContentKeyType - /// - public override bool Equals(object obj) - { - return obj is StreamingLocatorContentKeyType && Equals((StreamingLocatorContentKeyType)obj); - } - - /// - /// Returns for hashCode StreamingLocatorContentKeyType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string EnvelopeEncryption = "EnvelopeEncryption"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyTypeConverter.cs deleted file mode 100644 index 11a5cc1a3082..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingLocatorContentKeyTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for StreamingLocatorContentKeyType. - /// - public sealed class StreamingLocatorContentKeyTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// StreamingLocatorContentKeyType by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(StreamingLocatorContentKeyType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// StreamingLocatorContentKeyType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (StreamingLocatorContentKeyType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for StreamingLocatorContentKeyType for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPath.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPath.cs index 85916868d855..852e6aee4608 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPath.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPath.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -38,7 +39,7 @@ public StreamingPath() /// 'CommonEncryptionCenc', 'CommonEncryptionCbcs' /// Streaming paths for each protocol and /// encryptionScheme pair - public StreamingPath(StreamingPolicyStreamingProtocol streamingProtocol, EncryptionScheme encryptionScheme, IList paths = default(IList)) + public StreamingPath(string streamingProtocol, string encryptionScheme, IList paths = default(IList)) { StreamingProtocol = streamingProtocol; EncryptionScheme = encryptionScheme; @@ -56,7 +57,7 @@ public StreamingPath() /// 'Dash', 'SmoothStreaming', 'Download' /// [JsonProperty(PropertyName = "streamingProtocol")] - public StreamingPolicyStreamingProtocol StreamingProtocol { get; set; } + public string StreamingProtocol { get; set; } /// /// Gets or sets encryption scheme. Possible values include: @@ -64,7 +65,7 @@ public StreamingPath() /// 'CommonEncryptionCbcs' /// [JsonProperty(PropertyName = "encryptionScheme")] - public EncryptionScheme EncryptionScheme { get; set; } + public string EncryptionScheme { get; set; } /// /// Gets or sets streaming paths for each protocol and encryptionScheme @@ -76,11 +77,19 @@ public StreamingPath() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (StreamingProtocol == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StreamingProtocol"); + } + if (EncryptionScheme == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "EncryptionScheme"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyFairPlayConfiguration.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyFairPlayConfiguration.cs index 47ce4e08fe5e..2729ba3561c6 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyFairPlayConfiguration.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyFairPlayConfiguration.cs @@ -33,9 +33,15 @@ public StreamingPolicyFairPlayConfiguration() /// /// All license to be persistent /// or not - /// The template for - /// a customer service to deliver keys to end users. Not needed when - /// using Azure Media Services for issuing keys. + /// Template for the + /// URL of the custom service delivering licenses to end user players. + /// Not required when using Azure Media Services for issuing licenses. + /// The template supports replaceable tokens that the service will + /// update at runtime with the value specific to the request. The + /// currently supported token values are {AlternativeMediaId}, which is + /// replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier + /// of the key being requested. public StreamingPolicyFairPlayConfiguration(bool allowPersistentLicense, string customLicenseAcquisitionUrlTemplate = default(string)) { CustomLicenseAcquisitionUrlTemplate = customLicenseAcquisitionUrlTemplate; @@ -49,9 +55,14 @@ public StreamingPolicyFairPlayConfiguration() partial void CustomInit(); /// - /// Gets or sets the template for a customer service to deliver keys to - /// end users. Not needed when using Azure Media Services for issuing - /// keys. + /// Gets or sets template for the URL of the custom service delivering + /// licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable + /// tokens that the service will update at runtime with the value + /// specific to the request. The currently supported token values are + /// {AlternativeMediaId}, which is replaced with the value of + /// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + /// replaced with the value of identifier of the key being requested. /// [JsonProperty(PropertyName = "customLicenseAcquisitionUrlTemplate")] public string CustomLicenseAcquisitionUrlTemplate { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyPlayReadyConfiguration.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyPlayReadyConfiguration.cs index 9a43db3b51e4..5d2d7d32dbfb 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyPlayReadyConfiguration.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyPlayReadyConfiguration.cs @@ -31,9 +31,15 @@ public StreamingPolicyPlayReadyConfiguration() /// Initializes a new instance of the /// StreamingPolicyPlayReadyConfiguration class. /// - /// The template for - /// a customer service to deliver keys to end users. Not needed when - /// using Azure Media Services for issuing keys. + /// Template for the + /// URL of the custom service delivering licenses to end user players. + /// Not required when using Azure Media Services for issuing licenses. + /// The template supports replaceable tokens that the service will + /// update at runtime with the value specific to the request. The + /// currently supported token values are {AlternativeMediaId}, which is + /// replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier + /// of the key being requested. /// Custom attributes for /// PlayReady public StreamingPolicyPlayReadyConfiguration(string customLicenseAcquisitionUrlTemplate = default(string), string playReadyCustomAttributes = default(string)) @@ -49,9 +55,14 @@ public StreamingPolicyPlayReadyConfiguration() partial void CustomInit(); /// - /// Gets or sets the template for a customer service to deliver keys to - /// end users. Not needed when using Azure Media Services for issuing - /// keys. + /// Gets or sets template for the URL of the custom service delivering + /// licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable + /// tokens that the service will update at runtime with the value + /// specific to the request. The currently supported token values are + /// {AlternativeMediaId}, which is replaced with the value of + /// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + /// replaced with the value of identifier of the key being requested. /// [JsonProperty(PropertyName = "customLicenseAcquisitionUrlTemplate")] public string CustomLicenseAcquisitionUrlTemplate { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocol.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocol.cs index 97205827bf0d..a2a885f4b3e1 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocol.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocol.cs @@ -10,114 +10,27 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for StreamingPolicyStreamingProtocol. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(StreamingPolicyStreamingProtocolConverter))] - public struct StreamingPolicyStreamingProtocol : System.IEquatable + public static class StreamingPolicyStreamingProtocol { - private StreamingPolicyStreamingProtocol(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// HLS protocol /// - public static readonly StreamingPolicyStreamingProtocol Hls = "Hls"; - + public const string Hls = "Hls"; /// /// DASH protocol /// - public static readonly StreamingPolicyStreamingProtocol Dash = "Dash"; - + public const string Dash = "Dash"; /// /// SmoothStreaming protocol /// - public static readonly StreamingPolicyStreamingProtocol SmoothStreaming = "SmoothStreaming"; - + public const string SmoothStreaming = "SmoothStreaming"; /// /// Download protocol /// - public static readonly StreamingPolicyStreamingProtocol Download = "Download"; - - - /// - /// Underlying value of enum StreamingPolicyStreamingProtocol - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for StreamingPolicyStreamingProtocol - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type StreamingPolicyStreamingProtocol - /// - public bool Equals(StreamingPolicyStreamingProtocol e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// StreamingPolicyStreamingProtocol - /// - public static implicit operator StreamingPolicyStreamingProtocol(string value) - { - return new StreamingPolicyStreamingProtocol(value); - } - - /// - /// Implicit operator to convert StreamingPolicyStreamingProtocol to - /// string - /// - public static implicit operator string(StreamingPolicyStreamingProtocol e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum StreamingPolicyStreamingProtocol - /// - public static bool operator == (StreamingPolicyStreamingProtocol e1, StreamingPolicyStreamingProtocol e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum StreamingPolicyStreamingProtocol - /// - public static bool operator != (StreamingPolicyStreamingProtocol e1, StreamingPolicyStreamingProtocol e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for StreamingPolicyStreamingProtocol - /// - public override bool Equals(object obj) - { - return obj is StreamingPolicyStreamingProtocol && Equals((StreamingPolicyStreamingProtocol)obj); - } - - /// - /// Returns for hashCode StreamingPolicyStreamingProtocol - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Download = "Download"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocolConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocolConverter.cs deleted file mode 100644 index 993ad8b697a8..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyStreamingProtocolConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for StreamingPolicyStreamingProtocol. - /// - public sealed class StreamingPolicyStreamingProtocolConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// StreamingPolicyStreamingProtocol by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(StreamingPolicyStreamingProtocol).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// StreamingPolicyStreamingProtocol. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (StreamingPolicyStreamingProtocol)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for StreamingPolicyStreamingProtocol for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyWidevineConfiguration.cs b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyWidevineConfiguration.cs index ae60a32b251a..3583121fc870 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyWidevineConfiguration.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StreamingPolicyWidevineConfiguration.cs @@ -31,9 +31,15 @@ public StreamingPolicyWidevineConfiguration() /// Initializes a new instance of the /// StreamingPolicyWidevineConfiguration class. /// - /// The template for - /// a customer service to deliver keys to end users. Not needed when - /// using Azure Media Services for issuing keys. + /// Template for the + /// URL of the custom service delivering licenses to end user players. + /// Not required when using Azure Media Services for issuing licenses. + /// The template supports replaceable tokens that the service will + /// update at runtime with the value specific to the request. The + /// currently supported token values are {AlternativeMediaId}, which is + /// replaced with the value of StreamingLocatorId.AlternativeMediaId, + /// and {ContentKeyId}, which is replaced with the value of identifier + /// of the key being requested. public StreamingPolicyWidevineConfiguration(string customLicenseAcquisitionUrlTemplate = default(string)) { CustomLicenseAcquisitionUrlTemplate = customLicenseAcquisitionUrlTemplate; @@ -46,9 +52,14 @@ public StreamingPolicyWidevineConfiguration() partial void CustomInit(); /// - /// Gets or sets the template for a customer service to deliver keys to - /// end users. Not needed when using Azure Media Services for issuing - /// keys. + /// Gets or sets template for the URL of the custom service delivering + /// licenses to end user players. Not required when using Azure Media + /// Services for issuing licenses. The template supports replaceable + /// tokens that the service will update at runtime with the value + /// specific to the request. The currently supported token values are + /// {AlternativeMediaId}, which is replaced with the value of + /// StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + /// replaced with the value of identifier of the key being requested. /// [JsonProperty(PropertyName = "customLicenseAcquisitionUrlTemplate")] public string CustomLicenseAcquisitionUrlTemplate { get; set; } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StretchMode.cs b/src/SDKs/Media/Management.Media/Generated/Models/StretchMode.cs index 9d58e599bb23..83d0c52ba993 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/StretchMode.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/StretchMode.cs @@ -10,29 +10,17 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for StretchMode. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(StretchModeConverter))] - public struct StretchMode : System.IEquatable + public static class StretchMode { - private StretchMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Strictly respect the output resolution without considering the /// pixel aspect ratio or display aspect ratio of the input video. /// - public static readonly StretchMode None = "None"; - + public const string None = "None"; /// /// Override the output resolution, and change it to match the display /// aspect ratio of the input, without padding. For example, if the @@ -40,8 +28,7 @@ private StretchMode(string underlyingValue) /// the value in the preset is overridden, and the output will be at /// 1280x720, which maintains the input aspect ratio of 16:9. /// - public static readonly StretchMode AutoSize = "AutoSize"; - + public const string AutoSize = "AutoSize"; /// /// Pad the output (with either letterbox or pillar box) to honor the /// output resolution, while ensuring that the active video region in @@ -51,77 +38,6 @@ private StretchMode(string underlyingValue) /// rectangle of 1280x720 at aspect ratio of 16:9, and pillar box /// regions 280 pixels wide at the left and right. /// - public static readonly StretchMode AutoFit = "AutoFit"; - - - /// - /// Underlying value of enum StretchMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for StretchMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type StretchMode - /// - public bool Equals(StretchMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to StretchMode - /// - public static implicit operator StretchMode(string value) - { - return new StretchMode(value); - } - - /// - /// Implicit operator to convert StretchMode to string - /// - public static implicit operator string(StretchMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum StretchMode - /// - public static bool operator == (StretchMode e1, StretchMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum StretchMode - /// - public static bool operator != (StretchMode e1, StretchMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for StretchMode - /// - public override bool Equals(object obj) - { - return obj is StretchMode && Equals((StretchMode)obj); - } - - /// - /// Returns for hashCode StretchMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string AutoFit = "AutoFit"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/StretchModeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/StretchModeConverter.cs deleted file mode 100644 index 4de94613e045..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/StretchModeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for StretchMode. - /// - public sealed class StretchModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to StretchMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(StretchMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to StretchMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (StretchMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for StretchMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperation.cs b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperation.cs index b033d32c89ee..10f525e48d49 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperation.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperation.cs @@ -10,104 +10,19 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for TrackPropertyCompareOperation. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(TrackPropertyCompareOperationConverter))] - public struct TrackPropertyCompareOperation : System.IEquatable + public static class TrackPropertyCompareOperation { - private TrackPropertyCompareOperation(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Unknown track property compare operation /// - public static readonly TrackPropertyCompareOperation Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Equal operation /// - public static readonly TrackPropertyCompareOperation Equal = "Equal"; - - - /// - /// Underlying value of enum TrackPropertyCompareOperation - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for TrackPropertyCompareOperation - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type TrackPropertyCompareOperation - /// - public bool Equals(TrackPropertyCompareOperation e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to - /// TrackPropertyCompareOperation - /// - public static implicit operator TrackPropertyCompareOperation(string value) - { - return new TrackPropertyCompareOperation(value); - } - - /// - /// Implicit operator to convert TrackPropertyCompareOperation to - /// string - /// - public static implicit operator string(TrackPropertyCompareOperation e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum TrackPropertyCompareOperation - /// - public static bool operator == (TrackPropertyCompareOperation e1, TrackPropertyCompareOperation e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum TrackPropertyCompareOperation - /// - public static bool operator != (TrackPropertyCompareOperation e1, TrackPropertyCompareOperation e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for TrackPropertyCompareOperation - /// - public override bool Equals(object obj) - { - return obj is TrackPropertyCompareOperation && Equals((TrackPropertyCompareOperation)obj); - } - - /// - /// Returns for hashCode TrackPropertyCompareOperation - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string Equal = "Equal"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperationConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperationConverter.cs deleted file mode 100644 index f140c23f209d..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCompareOperationConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for TrackPropertyCompareOperation. - /// - public sealed class TrackPropertyCompareOperationConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to - /// TrackPropertyCompareOperation by the converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(TrackPropertyCompareOperation).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to - /// TrackPropertyCompareOperation. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (TrackPropertyCompareOperation)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for TrackPropertyCompareOperation for - /// serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCondition.cs b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCondition.cs index d14e97572160..557da45752fb 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCondition.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyCondition.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -34,7 +35,7 @@ public TrackPropertyCondition() /// Track property condition operation. /// Possible values include: 'Unknown', 'Equal' /// Track property value - public TrackPropertyCondition(TrackPropertyType property, TrackPropertyCompareOperation operation, string value = default(string)) + public TrackPropertyCondition(string property, string operation, string value = default(string)) { Property = property; Operation = operation; @@ -52,14 +53,14 @@ public TrackPropertyCondition() /// 'Unknown', 'FourCC' /// [JsonProperty(PropertyName = "property")] - public TrackPropertyType Property { get; set; } + public string Property { get; set; } /// /// Gets or sets track property condition operation. Possible values /// include: 'Unknown', 'Equal' /// [JsonProperty(PropertyName = "operation")] - public TrackPropertyCompareOperation Operation { get; set; } + public string Operation { get; set; } /// /// Gets or sets track property value @@ -70,11 +71,19 @@ public TrackPropertyCondition() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (Property == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Property"); + } + if (Operation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Operation"); + } } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyType.cs b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyType.cs index bd084a9a9720..1040a475ecbe 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyType.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyType.cs @@ -10,102 +10,19 @@ namespace Microsoft.Azure.Management.Media.Models { - using Newtonsoft.Json; /// /// Defines values for TrackPropertyType. /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(TrackPropertyTypeConverter))] - public struct TrackPropertyType : System.IEquatable + public static class TrackPropertyType { - private TrackPropertyType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - /// /// Unknown track property /// - public static readonly TrackPropertyType Unknown = "Unknown"; - + public const string Unknown = "Unknown"; /// /// Track FourCC /// - public static readonly TrackPropertyType FourCC = "FourCC"; - - - /// - /// Underlying value of enum TrackPropertyType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for TrackPropertyType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type TrackPropertyType - /// - public bool Equals(TrackPropertyType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to TrackPropertyType - /// - public static implicit operator TrackPropertyType(string value) - { - return new TrackPropertyType(value); - } - - /// - /// Implicit operator to convert TrackPropertyType to string - /// - public static implicit operator string(TrackPropertyType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum TrackPropertyType - /// - public static bool operator == (TrackPropertyType e1, TrackPropertyType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum TrackPropertyType - /// - public static bool operator != (TrackPropertyType e1, TrackPropertyType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for TrackPropertyType - /// - public override bool Equals(object obj) - { - return obj is TrackPropertyType && Equals((TrackPropertyType)obj); - } - - /// - /// Returns for hashCode TrackPropertyType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - + public const string FourCC = "FourCC"; } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyTypeConverter.cs b/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyTypeConverter.cs deleted file mode 100644 index 502bfc506398..000000000000 --- a/src/SDKs/Media/Management.Media/Generated/Models/TrackPropertyTypeConverter.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.Media.Models -{ - using Newtonsoft.Json; - - using System.Reflection; - - /// - /// Defines values for TrackPropertyType. - /// - public sealed class TrackPropertyTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to TrackPropertyType by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(TrackPropertyType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to TrackPropertyType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (TrackPropertyType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for TrackPropertyType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TransformOutput.cs b/src/SDKs/Media/Management.Media/Generated/Models/TransformOutput.cs index d192680baeca..774866b5e7b3 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/TransformOutput.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/TransformOutput.cs @@ -46,7 +46,7 @@ public TransformOutput() /// the service uses for processing TransformOutputs. The default /// priority is Normal. Possible values include: 'Low', 'Normal', /// 'High' - public TransformOutput(Preset preset, OnErrorType? onError = default(OnErrorType?), Priority? relativePriority = default(Priority?)) + public TransformOutput(Preset preset, string onError = default(string), string relativePriority = default(string)) { OnError = onError; RelativePriority = relativePriority; @@ -69,7 +69,7 @@ public TransformOutput() /// 'ContinueJob' /// [JsonProperty(PropertyName = "onError")] - public OnErrorType? OnError { get; set; } + public string OnError { get; set; } /// /// Gets or sets sets the relative priority of the TransformOutputs @@ -78,7 +78,7 @@ public TransformOutput() /// Possible values include: 'Low', 'Normal', 'High' /// [JsonProperty(PropertyName = "relativePriority")] - public Priority? RelativePriority { get; set; } + public string RelativePriority { get; set; } /// /// Gets or sets preset that describes the operations that will be used diff --git a/src/SDKs/Media/Management.Media/Generated/Models/TransportStreamFormat.cs b/src/SDKs/Media/Management.Media/Generated/Models/TransportStreamFormat.cs index e1e05d45443e..6d1febeab429 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/TransportStreamFormat.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/TransportStreamFormat.cs @@ -45,7 +45,7 @@ public TransportStreamFormat() /// The list of output files to produce. /// Each entry in the list is a set of audio and video layer labels to /// be muxed together . - public TransportStreamFormat(string filenamePattern = default(string), IList outputFiles = default(IList)) + public TransportStreamFormat(string filenamePattern, IList outputFiles = default(IList)) : base(filenamePattern, outputFiles) { CustomInit(); @@ -56,5 +56,15 @@ public TransportStreamFormat() /// partial void CustomInit(); + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/Video.cs b/src/SDKs/Media/Management.Media/Generated/Models/Video.cs index 1e0687b9a930..9a43bbfedf05 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/Video.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/Video.cs @@ -40,7 +40,7 @@ public Video() /// will be resized to fit the desired output resolution(s). Default is /// AutoSize. Possible values include: 'None', 'AutoSize', /// 'AutoFit' - public Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?)) + public Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), string stretchMode = default(string)) : base(label) { KeyFrameInterval = keyFrameInterval; @@ -68,7 +68,7 @@ public Video() /// AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' /// [JsonProperty(PropertyName = "stretchMode")] - public StretchMode? StretchMode { get; set; } + public string StretchMode { get; set; } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/VideoAnalyzerPreset.cs b/src/SDKs/Media/Management.Media/Generated/Models/VideoAnalyzerPreset.cs index 0c3a520296d4..98b0c17ec181 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/VideoAnalyzerPreset.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/VideoAnalyzerPreset.cs @@ -33,21 +33,28 @@ public VideoAnalyzerPreset() /// /// The language for the audio payload in /// the input using the BCP-47 format of 'language tag-region' (e.g: - /// 'en-US'). The list of supported languages are, 'en-US', 'en-GB', - /// 'es-ES', 'es-MX', 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', - /// 'de-DE', 'ar-EG', 'ru-RU', 'hi-IN'. If not specified, automatic - /// language detection would be employed. This feature currently - /// supports English, Chinese, French, German, Italian, Japanese, - /// Spanish, Russian, and Portuguese. The automatic detection works + /// 'en-US'). The list of supported languages are English ('en-US' and + /// 'en-GB'), Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian + /// ('it-IT'), Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese + /// ('zh-CN'), German ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian + /// ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If you know the + /// language of your content, it is recommended that you specify it. If + /// the language isn't specified or set to null, automatic language + /// detection will choose the first language detected and process with + /// the selected language for the duration of the file. This language + /// detection feature currently supports English, Chinese, French, + /// German, Italian, Japanese, Spanish, Russian, and Portuguese. It + /// does not currently support dynamically switching between languages + /// after the first language is detected. The automatic detection works /// best with audio recordings with clearly discernable speech. If /// automatic detection fails to find the language, transcription would - /// fallback to English. + /// fallback to 'en-US'." /// The type of insights to be /// extracted. If not set then based on the content the type will /// selected. If the content is audio only then only audio insights /// are extracted and if it is video only. Possible values include: /// 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' - public VideoAnalyzerPreset(string audioLanguage = default(string), InsightsType? insightsToExtract = default(InsightsType?)) + public VideoAnalyzerPreset(string audioLanguage = default(string), string insightsToExtract = default(string)) : base(audioLanguage) { InsightsToExtract = insightsToExtract; @@ -67,7 +74,7 @@ public VideoAnalyzerPreset() /// 'VideoInsightsOnly', 'AllInsights' /// [JsonProperty(PropertyName = "insightsToExtract")] - public InsightsType? InsightsToExtract { get; set; } + public string InsightsToExtract { get; set; } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/VideoLayer.cs b/src/SDKs/Media/Management.Media/Generated/Models/VideoLayer.cs index d0df593dc98e..74c5c4082b7c 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/VideoLayer.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/VideoLayer.cs @@ -31,6 +31,9 @@ public VideoLayer() /// /// Initializes a new instance of the VideoLayer class. /// + /// The average bitrate in bits per second at + /// which to encode the input video when generating this layer. This is + /// a required field. /// The width of the output video for this layer. /// The value can be absolute (in pixels) or relative (in percentage). /// For example 50% means the output video has half as many pixels in @@ -42,9 +45,6 @@ public VideoLayer() /// The alphanumeric label for this layer, which /// can be used in multiplexing different video and audio layers, or in /// naming the output file. - /// The average bitrate in bits per second at - /// which to encode the input video when generating this layer. This is - /// a required field. /// The maximum bitrate (in bits per second), /// at which the VBV buffer should be assumed to refill. If not /// specified, defaults to the same value as bitrate. @@ -64,7 +64,7 @@ public VideoLayer() /// Whether or not adaptive B-frames are /// to be used when encoding this layer. If not specified, the encoder /// will turn it on whenever the video profile permits its use. - public VideoLayer(string width = default(string), string height = default(string), string label = default(string), int? bitrate = default(int?), int? maxBitrate = default(int?), int? bFrames = default(int?), string frameRate = default(string), int? slices = default(int?), bool? adaptiveBFrame = default(bool?)) + public VideoLayer(int bitrate, string width = default(string), string height = default(string), string label = default(string), int? maxBitrate = default(int?), int? bFrames = default(int?), string frameRate = default(string), int? slices = default(int?), bool? adaptiveBFrame = default(bool?)) : base(width, height, label) { Bitrate = bitrate; @@ -87,7 +87,7 @@ public VideoLayer() /// required field. /// [JsonProperty(PropertyName = "bitrate")] - public int? Bitrate { get; set; } + public int Bitrate { get; set; } /// /// Gets or sets the maximum bitrate (in bits per second), at which the @@ -133,5 +133,15 @@ public VideoLayer() [JsonProperty(PropertyName = "adaptiveBFrame")] public bool? AdaptiveBFrame { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/Models/VideoOverlay.cs b/src/SDKs/Media/Management.Media/Generated/Models/VideoOverlay.cs index d8217dab62f1..22a1f2396659 100644 --- a/src/SDKs/Media/Management.Media/Generated/Models/VideoOverlay.cs +++ b/src/SDKs/Media/Management.Media/Generated/Models/VideoOverlay.cs @@ -66,7 +66,7 @@ public VideoOverlay() /// opaque. /// An optional rectangular window used to /// crop the overlay image or video. - public VideoOverlay(string inputLabel = default(string), System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?), Rectangle position = default(Rectangle), double? opacity = default(double?), Rectangle cropRectangle = default(Rectangle)) + public VideoOverlay(string inputLabel, System.TimeSpan? start = default(System.TimeSpan?), System.TimeSpan? end = default(System.TimeSpan?), System.TimeSpan? fadeInDuration = default(System.TimeSpan?), System.TimeSpan? fadeOutDuration = default(System.TimeSpan?), double? audioGainLevel = default(double?), Rectangle position = default(Rectangle), double? opacity = default(double?), Rectangle cropRectangle = default(Rectangle)) : base(inputLabel, start, end, fadeInDuration, fadeOutDuration, audioGainLevel) { Position = position; @@ -101,5 +101,15 @@ public VideoOverlay() [JsonProperty(PropertyName = "cropRectangle")] public Rectangle CropRectangle { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } } } diff --git a/src/SDKs/Media/Management.Media/Generated/SdkInfo_AzureMediaServices.cs b/src/SDKs/Media/Management.Media/Generated/SdkInfo_AzureMediaServices.cs index 417d17816977..2b049988b457 100644 --- a/src/SDKs/Media/Management.Media/Generated/SdkInfo_AzureMediaServices.cs +++ b/src/SDKs/Media/Management.Media/Generated/SdkInfo_AzureMediaServices.cs @@ -36,16 +36,5 @@ public static IEnumerable> ApiInfo_AzureMediaServi }.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/mediaservices/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --opt-in-extensible-enums --csharp-sdks-folder=E:\\GitHub\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "dd2a88f3c528ef69fc81123eb4481196a3690b66"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -