diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs index be238b5ee970..9668cc95d6b7 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs @@ -193,6 +193,39 @@ public partial interface IMediaservicesOperations /// Task SyncStorageKeysWithHttpMessagesAsync(string resourceGroupName, string accountName, string id = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// List the media edge policies associated with the Media Services + /// account. + /// + /// + /// List the media edge policies associated with the Media Services + /// account. + /// + /// + /// The name of the resource group within the Azure subscription. + /// + /// + /// The Media Services account name. + /// + /// + /// Unique identifier of the edge device. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListEdgePoliciesWithHttpMessagesAsync(string resourceGroupName, string accountName, string deviceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List Media Services accounts /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs index 223359f7bce1..33b4decc8343 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs @@ -1225,6 +1225,215 @@ internal MediaservicesOperations(AzureMediaServicesClient client) return _result; } + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// The name of the resource group within the Azure subscription. + /// + /// + /// The Media Services account name. + /// + /// + /// Unique identifier of the edge device. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListEdgePoliciesWithHttpMessagesAsync(string resourceGroupName, string accountName, string deviceId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (accountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + ListEdgePoliciesInput parameters = new ListEdgePoliciesInput(); + if (deviceId != null) + { + parameters.DeviceId = deviceId; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("accountName", accountName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListEdgePolicies", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/listEdgePolicies").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// List Media Services accounts /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperationsExtensions.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperationsExtensions.cs index c6d14c3b579e..6f802a64b40c 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperationsExtensions.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperationsExtensions.cs @@ -305,6 +305,58 @@ public static MediaService Update(this IMediaservicesOperations operations, stri (await operations.SyncStorageKeysWithHttpMessagesAsync(resourceGroupName, accountName, id, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the Azure subscription. + /// + /// + /// The Media Services account name. + /// + /// + /// Unique identifier of the edge device. + /// + public static EdgePolicies ListEdgePolicies(this IMediaservicesOperations operations, string resourceGroupName, string accountName, string deviceId = default(string)) + { + return operations.ListEdgePoliciesAsync(resourceGroupName, accountName, deviceId).GetAwaiter().GetResult(); + } + + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// List the media edge policies associated with the Media Services account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group within the Azure subscription. + /// + /// + /// The Media Services account name. + /// + /// + /// Unique identifier of the edge device. + /// + /// + /// The cancellation token. + /// + public static async Task ListEdgePoliciesAsync(this IMediaservicesOperations operations, string resourceGroupName, string accountName, string deviceId = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListEdgePoliciesWithHttpMessagesAsync(resourceGroupName, accountName, deviceId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List Media Services accounts /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ClipTime.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ClipTime.cs index eb4774b91b5c..834493c15d9b 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ClipTime.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ClipTime.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for specifying a clip time. Use sub classes of this class to /// specify the time position in the media. /// + [Newtonsoft.Json.JsonObject("ClipTime")] public partial class ClipTime { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Codec.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Codec.cs index fb8819642665..3bc892769f90 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Codec.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Codec.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Media.Models /// /// Describes the basic properties of all codecs. /// + [Newtonsoft.Json.JsonObject("Codec")] public partial class Codec { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyConfiguration.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyConfiguration.cs index eb9efcd089de..2b486a5b596f 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyConfiguration.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyConfiguration.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for Content Key Policy configuration. A derived class must /// be used to create a configuration. /// + [Newtonsoft.Json.JsonObject("ContentKeyPolicyConfiguration")] public partial class ContentKeyPolicyConfiguration { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyPlayReadyContentKeyLocation.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyPlayReadyContentKeyLocation.cs index e5ce948790ce..6b3a19bb48cf 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyPlayReadyContentKeyLocation.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyPlayReadyContentKeyLocation.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for content key ID location. A derived class must be used to /// represent the location. /// + [Newtonsoft.Json.JsonObject("ContentKeyPolicyPlayReadyContentKeyLocation")] public partial class ContentKeyPolicyPlayReadyContentKeyLocation { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestriction.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestriction.cs index df4ff5050dfd..0ab893f71380 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestriction.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestriction.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for Content Key Policy restrictions. A derived class must be /// used to create a restriction. /// + [Newtonsoft.Json.JsonObject("ContentKeyPolicyRestriction")] public partial class ContentKeyPolicyRestriction { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestrictionTokenKey.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestrictionTokenKey.cs index 487b650ec8aa..1a9cc1e5542e 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestrictionTokenKey.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ContentKeyPolicyRestrictionTokenKey.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for Content Key Policy key for token validation. A derived /// class must be used to create a token key. /// + [Newtonsoft.Json.JsonObject("ContentKeyPolicyRestrictionTokenKey")] public partial class ContentKeyPolicyRestrictionTokenKey { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgePolicies.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgePolicies.cs new file mode 100644 index 000000000000..aa1e0d0e77ab --- /dev/null +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgePolicies.cs @@ -0,0 +1,46 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated 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; + + public partial class EdgePolicies + { + /// + /// Initializes a new instance of the EdgePolicies class. + /// + public EdgePolicies() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdgePolicies class. + /// + public EdgePolicies(EdgeUsageDataCollectionPolicy usageDataCollectionPolicy = default(EdgeUsageDataCollectionPolicy)) + { + UsageDataCollectionPolicy = usageDataCollectionPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "usageDataCollectionPolicy")] + public EdgeUsageDataCollectionPolicy UsageDataCollectionPolicy { get; set; } + + } +} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataCollectionPolicy.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataCollectionPolicy.cs new file mode 100644 index 000000000000..f850cf2c435a --- /dev/null +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataCollectionPolicy.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated 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; + + public partial class EdgeUsageDataCollectionPolicy + { + /// + /// Initializes a new instance of the EdgeUsageDataCollectionPolicy + /// class. + /// + public EdgeUsageDataCollectionPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdgeUsageDataCollectionPolicy + /// class. + /// + /// Usage data collection + /// frequency in ISO 8601 duration format e.g. PT10M , PT5H. + /// Usage data reporting frequency + /// in ISO 8601 duration format e.g. PT10M , PT5H. + /// Maximum time for + /// which the functionality of the device will not be hampered for not + /// reporting the usage data. + /// Details of Event Hub where the usage + /// will be reported. + public EdgeUsageDataCollectionPolicy(string dataCollectionFrequency = default(string), string dataReportingFrequency = default(string), string maxAllowedUnreportedUsageDuration = default(string), EdgeUsageDataEventHub eventHubDetails = default(EdgeUsageDataEventHub)) + { + DataCollectionFrequency = dataCollectionFrequency; + DataReportingFrequency = dataReportingFrequency; + MaxAllowedUnreportedUsageDuration = maxAllowedUnreportedUsageDuration; + EventHubDetails = eventHubDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets usage data collection frequency in ISO 8601 duration + /// format e.g. PT10M , PT5H. + /// + [JsonProperty(PropertyName = "dataCollectionFrequency")] + public string DataCollectionFrequency { get; set; } + + /// + /// Gets or sets usage data reporting frequency in ISO 8601 duration + /// format e.g. PT10M , PT5H. + /// + [JsonProperty(PropertyName = "dataReportingFrequency")] + public string DataReportingFrequency { get; set; } + + /// + /// Gets or sets maximum time for which the functionality of the device + /// will not be hampered for not reporting the usage data. + /// + [JsonProperty(PropertyName = "maxAllowedUnreportedUsageDuration")] + public string MaxAllowedUnreportedUsageDuration { get; set; } + + /// + /// Gets or sets details of Event Hub where the usage will be reported. + /// + [JsonProperty(PropertyName = "eventHubDetails")] + public EdgeUsageDataEventHub EventHubDetails { get; set; } + + } +} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataEventHub.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataEventHub.cs new file mode 100644 index 000000000000..1f45a639eaee --- /dev/null +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EdgeUsageDataEventHub.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated 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; + + public partial class EdgeUsageDataEventHub + { + /// + /// Initializes a new instance of the EdgeUsageDataEventHub class. + /// + public EdgeUsageDataEventHub() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdgeUsageDataEventHub class. + /// + /// Name of the Event Hub where usage will be + /// reported. + /// Namespace of the Event Hub where + /// usage will be reported. + /// SAS token needed to interact with Event + /// Hub. + public EdgeUsageDataEventHub(string name = default(string), string namespaceProperty = default(string), string token = default(string)) + { + Name = name; + NamespaceProperty = namespaceProperty; + Token = token; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the Event Hub where usage will be reported. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace of the Event Hub where usage will be + /// reported. + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets SAS token needed to interact with Event Hub. + /// + [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + + } +} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Format.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Format.cs index 4db5cacf646d..862d2daafded 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Format.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Format.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Management.Media.Models /// /// Base class for output. /// + [Newtonsoft.Json.JsonObject("Format")] public partial class Format { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs index ffdf3dc4b89b..c6d67ab0a0aa 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs @@ -10,11 +10,13 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base class for inputs to a Job. /// + [Newtonsoft.Json.JsonObject("JobInput")] public partial class JobInput { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutput.cs index 2fa12234cd7c..3330e2a06a9c 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutput.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutput.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Media.Models /// /// Describes all the properties of a JobOutput. /// + [Newtonsoft.Json.JsonObject("JobOutput")] public partial class JobOutput { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Layer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Layer.cs index b1a9abb721e3..c7ff6fae2ab1 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Layer.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Layer.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.Management.Media.Models /// desired resolution. A layer represents the properties for the video or /// image at a resolution. /// + [Newtonsoft.Json.JsonObject("Layer")] public partial class Layer { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ListEdgePoliciesInput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ListEdgePoliciesInput.cs new file mode 100644 index 000000000000..72f81f9bfcdb --- /dev/null +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ListEdgePoliciesInput.cs @@ -0,0 +1,49 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated 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; + + public partial class ListEdgePoliciesInput + { + /// + /// Initializes a new instance of the ListEdgePoliciesInput class. + /// + public ListEdgePoliciesInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ListEdgePoliciesInput class. + /// + /// Unique identifier of the edge + /// device. + public ListEdgePoliciesInput(string deviceId = default(string)) + { + DeviceId = deviceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unique identifier of the edge device. + /// + [JsonProperty(PropertyName = "deviceId")] + public string DeviceId { get; set; } + + } +} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs index 2cf4cdbb69eb..2126c13d04f1 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Management.Media.Models /// /// Base type for all overlays - image, audio or video. /// + [Newtonsoft.Json.JsonObject("Overlay")] public partial class Overlay { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Preset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Preset.cs index 6406af393cf0..72a6e2a97724 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Preset.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Preset.cs @@ -10,12 +10,14 @@ namespace Microsoft.Azure.Management.Media.Models { + using Newtonsoft.Json; using System.Linq; /// /// Base type for all Presets, which define the recipe or instructions on /// how the input media files should be processed. /// + [Newtonsoft.Json.JsonObject("Preset")] public partial class Preset { /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/SdkInfo_AzureMediaServices.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/SdkInfo_AzureMediaServices.cs index bbcb20141ca5..2b049988b457 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/SdkInfo_AzureMediaServices.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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.4407"; - 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=D:\\GitHub\\giakasRepros\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "85d6e58c37868ca84f8f6eec5650dc4ab2d9a19a"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -