diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AccountFiltersOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AccountFiltersOperations.cs index 74865642e5b8a..ef9453394a367 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AccountFiltersOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AccountFiltersOperations.cs @@ -68,7 +68,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -107,7 +110,6 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -118,9 +120,9 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -182,11 +184,11 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -263,7 +265,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -296,7 +298,10 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "filterName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -307,7 +312,6 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("filterName", filterName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -319,9 +323,9 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -381,13 +385,13 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -467,7 +471,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -508,7 +512,10 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -520,7 +527,6 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("filterName", filterName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } @@ -532,9 +538,9 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -602,11 +608,11 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -701,7 +707,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -731,7 +737,10 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "filterName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -742,7 +751,6 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("filterName", filterName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -754,9 +762,9 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -818,11 +826,11 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -884,7 +892,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -921,7 +929,10 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -933,7 +944,6 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("filterName", filterName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -945,9 +955,9 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1015,11 +1025,11 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1090,7 +1100,7 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1186,11 +1196,11 @@ internal AccountFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetFiltersOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetFiltersOperations.cs index 6926c5d208543..7dfde3d47d607 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetFiltersOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetFiltersOperations.cs @@ -71,7 +71,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -104,7 +104,10 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -115,7 +118,6 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -127,9 +129,9 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -191,11 +193,11 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -275,7 +277,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -312,7 +314,10 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "filterName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -324,7 +329,6 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); tracingParameters.Add("filterName", filterName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -337,9 +341,9 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -399,13 +403,13 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -488,7 +492,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -533,7 +537,10 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -546,7 +553,6 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("assetName", assetName); tracingParameters.Add("filterName", filterName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } @@ -559,9 +565,9 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -629,11 +635,11 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -731,7 +737,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -765,7 +771,10 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "filterName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -777,7 +786,6 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); tracingParameters.Add("filterName", filterName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -790,9 +798,9 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -854,11 +862,11 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -923,7 +931,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -964,7 +972,10 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -977,7 +988,6 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) tracingParameters.Add("assetName", assetName); tracingParameters.Add("filterName", filterName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -990,9 +1000,9 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); _url = _url.Replace("{filterName}", System.Uri.EscapeDataString(filterName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1060,11 +1070,11 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1135,7 +1145,7 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1231,11 +1241,11 @@ internal AssetFiltersOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetsOperations.cs index 2eb5e3bf8ba1d..9edaf7b7a9ceb 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AssetsOperations.cs @@ -73,7 +73,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -102,7 +102,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -113,7 +116,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -132,9 +134,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _queryParameters.Add(_odataFilter); } } - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -196,11 +198,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -277,7 +279,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -310,7 +312,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +326,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -333,9 +337,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -395,13 +399,13 @@ internal AssetsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -481,7 +485,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -518,7 +522,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -530,7 +537,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } @@ -542,9 +548,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -612,11 +618,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -711,7 +717,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -741,7 +747,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -752,7 +761,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -764,9 +772,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -828,11 +836,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -894,7 +902,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -931,7 +939,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -943,7 +954,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -955,9 +965,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1025,11 +1035,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1116,7 +1126,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1149,7 +1159,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ListContainerSasInput parameters = new ListContainerSasInput(); if (permissions != null || expiryTime != null) { @@ -1166,7 +1179,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListContainerSas", tracingParameters); @@ -1179,9 +1191,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1249,11 +1261,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1331,7 +1343,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1364,7 +1376,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1375,7 +1390,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "GetEncryptionKey", tracingParameters); } @@ -1387,9 +1401,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1451,11 +1465,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1532,7 +1546,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1565,7 +1579,10 @@ internal AssetsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "assetName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1576,7 +1593,6 @@ internal AssetsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("assetName", assetName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListStreamingLocators", tracingParameters); } @@ -1588,9 +1604,9 @@ internal AssetsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{assetName}", System.Uri.EscapeDataString(assetName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1652,11 +1668,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1728,7 +1744,7 @@ internal AssetsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1824,11 +1840,11 @@ internal AssetsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AzureMediaServicesClient.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AzureMediaServicesClient.cs index ecf5f4178e360..9b6d3666b6cf3 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AzureMediaServicesClient.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/AzureMediaServicesClient.cs @@ -48,6 +48,11 @@ public partial class AzureMediaServicesClient : ServiceClient public string SubscriptionId { get; set; } + /// + /// The version of the API to be used with the client request. + /// + public string ApiVersion { get; private set; } + /// /// The preferred language for the response. /// @@ -66,11 +71,6 @@ public partial class AzureMediaServicesClient : ServiceClient public bool? GenerateClientRequestId { get; set; } - /// - /// Gets the IAccountFiltersOperations. - /// - public virtual IAccountFiltersOperations AccountFilters { get; private set; } - /// /// Gets the IOperations. /// @@ -96,6 +96,11 @@ public partial class AzureMediaServicesClient : ServiceClient public virtual ILocationsOperations Locations { get; private set; } + /// + /// Gets the IAccountFiltersOperations. + /// + public virtual IAccountFiltersOperations AccountFilters { get; private set; } + /// /// Gets the IAssetsOperations. /// @@ -111,16 +116,6 @@ public partial class AzureMediaServicesClient : ServiceClient public virtual IContentKeyPoliciesOperations ContentKeyPolicies { get; private set; } - /// - /// Gets the ITransformsOperations. - /// - public virtual ITransformsOperations Transforms { get; private set; } - - /// - /// Gets the IJobsOperations. - /// - public virtual IJobsOperations Jobs { get; private set; } - /// /// Gets the IStreamingPoliciesOperations. /// @@ -387,23 +382,22 @@ public AzureMediaServicesClient(System.Uri baseUri, ServiceClientCredentials cre /// private void Initialize() { - AccountFilters = new AccountFiltersOperations(this); Operations = new Operations(this); Mediaservices = new MediaservicesOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); Locations = new LocationsOperations(this); + AccountFilters = new AccountFiltersOperations(this); Assets = new AssetsOperations(this); AssetFilters = new AssetFiltersOperations(this); ContentKeyPolicies = new ContentKeyPoliciesOperations(this); - Transforms = new TransformsOperations(this); - Jobs = new JobsOperations(this); StreamingPolicies = new StreamingPoliciesOperations(this); StreamingLocators = new StreamingLocatorsOperations(this); LiveEvents = new LiveEventsOperations(this); LiveOutputs = new LiveOutputsOperations(this); StreamingEndpoints = new StreamingEndpointsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2021-06-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -441,26 +435,6 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ContentKeyPoliciesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ContentKeyPoliciesOperations.cs index f4b2da46ce48e..aa14959a33582 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ContentKeyPoliciesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ContentKeyPoliciesOperations.cs @@ -72,7 +72,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -101,7 +101,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -112,7 +115,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -131,9 +133,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _queryParameters.Add(_odataFilter); } } - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -195,11 +197,11 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -276,7 +278,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -309,7 +311,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "contentKeyPolicyName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -320,7 +325,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("contentKeyPolicyName", contentKeyPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -332,9 +336,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{contentKeyPolicyName}", System.Uri.EscapeDataString(contentKeyPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -394,13 +398,13 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -483,7 +487,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -516,6 +520,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "contentKeyPolicyName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (options == null) { throw new ValidationException(ValidationRules.CannotBeNull, "options"); @@ -530,7 +538,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) } } } - string apiVersion = "2020-05-01"; ContentKeyPolicy parameters = new ContentKeyPolicy(); if (description != null || options != null) { @@ -547,7 +554,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("contentKeyPolicyName", contentKeyPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); @@ -560,9 +566,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{contentKeyPolicyName}", System.Uri.EscapeDataString(contentKeyPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -630,11 +636,11 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -729,7 +735,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -759,7 +765,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "contentKeyPolicyName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -770,7 +779,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("contentKeyPolicyName", contentKeyPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -782,9 +790,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{contentKeyPolicyName}", System.Uri.EscapeDataString(contentKeyPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -846,11 +854,11 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -915,7 +923,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -948,6 +956,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "contentKeyPolicyName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (options == null) { throw new ValidationException(ValidationRules.CannotBeNull, "options"); @@ -962,7 +974,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) } } } - string apiVersion = "2020-05-01"; ContentKeyPolicy parameters = new ContentKeyPolicy(); if (description != null || options != null) { @@ -979,7 +990,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("contentKeyPolicyName", contentKeyPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); @@ -992,9 +1002,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{contentKeyPolicyName}", System.Uri.EscapeDataString(contentKeyPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1062,11 +1072,11 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1143,7 +1153,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1176,7 +1186,10 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "contentKeyPolicyName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1187,7 +1200,6 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("contentKeyPolicyName", contentKeyPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "GetPolicyPropertiesWithSecrets", tracingParameters); } @@ -1199,9 +1211,9 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{contentKeyPolicyName}", System.Uri.EscapeDataString(contentKeyPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1261,13 +1273,13 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1338,7 +1350,7 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1434,11 +1446,11 @@ internal ContentKeyPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAccountFiltersOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAccountFiltersOperations.cs index 4625d53a855a4..7f556ecff710d 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAccountFiltersOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAccountFiltersOperations.cs @@ -41,7 +41,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -106,7 +106,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -137,7 +137,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -168,7 +168,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -193,7 +193,7 @@ public partial interface IAccountFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetFiltersOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetFiltersOperations.cs index 4ef44450f10a5..9fc4523e893fd 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetFiltersOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetFiltersOperations.cs @@ -44,7 +44,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -79,7 +79,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -117,7 +117,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -151,7 +151,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -186,7 +186,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -211,7 +211,7 @@ public partial interface IAssetFiltersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetsOperations.cs index 8c814068c5ee2..7d112a496dd8b 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAssetsOperations.cs @@ -46,7 +46,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -77,7 +77,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -111,7 +111,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -142,7 +142,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -173,7 +173,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -214,7 +214,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -246,7 +246,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -277,7 +277,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -303,7 +303,7 @@ public partial interface IAssetsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAzureMediaServicesClient.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAzureMediaServicesClient.cs index 2a8f5b8510cb0..c8a8d2e540aaf 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAzureMediaServicesClient.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IAzureMediaServicesClient.cs @@ -44,6 +44,11 @@ public partial interface IAzureMediaServicesClient : System.IDisposable /// string SubscriptionId { get; set; } + /// + /// The version of the API to be used with the client request. + /// + string ApiVersion { get; } + /// /// The preferred language for the response. /// @@ -63,11 +68,6 @@ public partial interface IAzureMediaServicesClient : System.IDisposable bool? GenerateClientRequestId { get; set; } - /// - /// Gets the IAccountFiltersOperations. - /// - IAccountFiltersOperations AccountFilters { get; } - /// /// Gets the IOperations. /// @@ -93,6 +93,11 @@ public partial interface IAzureMediaServicesClient : System.IDisposable /// ILocationsOperations Locations { get; } + /// + /// Gets the IAccountFiltersOperations. + /// + IAccountFiltersOperations AccountFilters { get; } + /// /// Gets the IAssetsOperations. /// @@ -108,16 +113,6 @@ public partial interface IAzureMediaServicesClient : System.IDisposable /// IContentKeyPoliciesOperations ContentKeyPolicies { get; } - /// - /// Gets the ITransformsOperations. - /// - ITransformsOperations Transforms { get; } - - /// - /// Gets the IJobsOperations. - /// - IJobsOperations Jobs { get; } - /// /// Gets the IStreamingPoliciesOperations. /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IContentKeyPoliciesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IContentKeyPoliciesOperations.cs index f23639599569b..ab7dcbc32e5dd 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IContentKeyPoliciesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IContentKeyPoliciesOperations.cs @@ -45,7 +45,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -77,7 +77,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -114,7 +114,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -145,7 +145,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -180,7 +180,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -211,7 +211,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -236,7 +236,7 @@ public partial interface IContentKeyPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IJobsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IJobsOperations.cs deleted file mode 100644 index 8e04bc61e91b1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IJobsOperations.cs +++ /dev/null @@ -1,259 +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 -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// JobsOperations operations. - /// - public partial interface IJobsOperations - { - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Job - /// - /// - /// Gets a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create Job - /// - /// - /// Creates a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete Job - /// - /// - /// Deletes a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update Job - /// - /// - /// Update is only supported for description and priority. Updating - /// Priority will take effect when the Job state is Queued or Scheduled - /// and depending on the timing the priority update may be ignored. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Cancel Job - /// - /// - /// Cancel a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task CancelJobWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveEventsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveEventsOperations.cs index a9e1280440f03..9b029e5459fd3 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveEventsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveEventsOperations.cs @@ -41,7 +41,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -110,7 +110,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -172,7 +172,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -201,7 +201,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -230,7 +230,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -263,7 +263,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -294,7 +294,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -329,7 +329,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -360,7 +360,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -391,7 +391,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -420,7 +420,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -449,7 +449,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -482,7 +482,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -513,7 +513,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -535,7 +535,7 @@ public partial interface ILiveEventsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveOutputsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveOutputsOperations.cs index 224bb03e5d7d3..4d7e409ef5032 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveOutputsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILiveOutputsOperations.cs @@ -44,7 +44,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -78,7 +78,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -115,7 +115,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -150,7 +150,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -184,7 +184,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -219,7 +219,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -241,7 +241,7 @@ public partial interface ILiveOutputsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILocationsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILocationsOperations.cs index 89c3efb788148..8901a7a10cfac 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILocationsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ILocationsOperations.cs @@ -45,7 +45,7 @@ public partial interface ILocationsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// 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 ff6e3c6cd301f..28bd032bc7846 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IMediaservicesOperations.cs @@ -38,7 +38,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -66,7 +66,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -125,7 +125,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -153,7 +153,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -185,7 +185,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -215,7 +215,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -237,7 +237,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -262,7 +262,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -287,7 +287,7 @@ public partial interface IMediaservicesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IOperations.cs index 1a705a848b9df..532d6c8cbf5a9 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IOperations.cs @@ -35,7 +35,7 @@ public partial interface IOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -44,31 +44,6 @@ public partial interface IOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Operations - /// - /// - /// Lists all the Media Services operations. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateEndpointConnectionsOperations.cs index d603da1f27c6a..e2f5da63fd0e6 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -41,7 +41,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -71,7 +71,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -104,7 +104,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -134,7 +134,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateLinkResourcesOperations.cs index 755c6339fcbbe..517e9113979df 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateLinkResourcesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IPrivateLinkResourcesOperations.cs @@ -41,7 +41,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -71,7 +71,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingEndpointsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingEndpointsOperations.cs index 4a02e7025d363..d33681c686029 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingEndpointsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingEndpointsOperations.cs @@ -41,7 +41,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -110,7 +110,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -144,7 +144,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -175,7 +175,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -203,7 +203,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -231,7 +231,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -262,7 +262,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -297,7 +297,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -331,7 +331,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -362,7 +362,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -390,7 +390,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -418,7 +418,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -449,7 +449,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -471,7 +471,7 @@ public partial interface IStreamingEndpointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingLocatorsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingLocatorsOperations.cs index 951b735e229aa..e07495cd17a55 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingLocatorsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingLocatorsOperations.cs @@ -45,7 +45,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -77,7 +77,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -111,7 +111,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -142,7 +142,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -170,7 +170,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -201,7 +201,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -226,7 +226,7 @@ public partial interface IStreamingLocatorsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingPoliciesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingPoliciesOperations.cs index 6d417e029a6a1..5fd74a77c225e 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingPoliciesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/IStreamingPoliciesOperations.cs @@ -45,7 +45,7 @@ public partial interface IStreamingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -76,7 +76,7 @@ public partial interface IStreamingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -110,7 +110,7 @@ public partial interface IStreamingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -141,7 +141,7 @@ public partial interface IStreamingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -163,7 +163,7 @@ public partial interface IStreamingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ITransformsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ITransformsOperations.cs deleted file mode 100644 index 3cb12c3725752..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/ITransformsOperations.cs +++ /dev/null @@ -1,219 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// TransformsOperations operations. - /// - public partial interface ITransformsOperations - { - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Transform - /// - /// - /// Gets a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or Update Transform - /// - /// - /// Creates or updates a new Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete Transform - /// - /// - /// Deletes a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update Transform - /// - /// - /// Updates a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperations.cs deleted file mode 100644 index 7115826168b84..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperations.cs +++ /dev/null @@ -1,1481 +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 -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// JobsOperations operations. - /// - internal partial class JobsOperations : IServiceOperations, IJobsOperations - { - /// - /// Initializes a new instance of the JobsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal JobsOperations(AzureMediaServicesClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the AzureMediaServicesClient - /// - public AzureMediaServicesClient Client { get; private set; } - - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, ODataQuery odataQuery = default(ODataQuery), 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - string apiVersion = "2020-05-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("odataQuery", odataQuery); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("accountName", accountName); - tracingParameters.Add("transformName", transformName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", 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}/transforms/{transformName}/jobs").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - List _queryParameters = new List(); - if (odataQuery != null) - { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) - { - _queryParameters.Add(_odataFilter); - } - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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; - } - - /// - /// Get Job - /// - /// - /// Gets a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (jobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - 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; - } - - /// - /// Create Job - /// - /// - /// Creates a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (jobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("jobName", jobName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", 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}/transforms/{transformName}/jobs/{jobName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 201) - { - 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 == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete Job - /// - /// - /// Deletes a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (jobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new 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(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Update Job - /// - /// - /// Update is only supported for description and priority. Updating Priority - /// will take effect when the Job state is Queued or Scheduled and depending on - /// the timing the priority update may be ignored. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (jobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("jobName", jobName); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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; - } - - /// - /// Cancel Job - /// - /// - /// Cancel a Job. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// 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 CancelJobWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, string jobName, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (jobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CancelJob", 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}/transforms/{transformName}/jobs/{jobName}/cancelJob").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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; - // 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(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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; - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperationsExtensions.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperationsExtensions.cs deleted file mode 100644 index 32e326037172b..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/JobsOperationsExtensions.cs +++ /dev/null @@ -1,424 +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 -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for JobsOperations. - /// - public static partial class JobsOperationsExtensions - { - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(resourceGroupName, accountName, transformName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, transformName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Job - /// - /// - /// Gets a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - public static Job Get(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName) - { - return operations.GetAsync(resourceGroupName, accountName, transformName, jobName).GetAwaiter().GetResult(); - } - - /// - /// Get Job - /// - /// - /// Gets a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, transformName, jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create Job - /// - /// - /// Creates a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - public static Job Create(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, Job parameters) - { - return operations.CreateAsync(resourceGroupName, accountName, transformName, jobName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Create Job - /// - /// - /// Creates a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, accountName, transformName, jobName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete Job - /// - /// - /// Deletes a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - public static void Delete(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName) - { - operations.DeleteAsync(resourceGroupName, accountName, transformName, jobName).GetAwaiter().GetResult(); - } - - /// - /// Delete Job - /// - /// - /// Deletes a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, transformName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Update Job - /// - /// - /// Update is only supported for description and priority. Updating Priority - /// will take effect when the Job state is Queued or Scheduled and depending on - /// the timing the priority update may be ignored. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - public static Job Update(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, Job parameters) - { - return operations.UpdateAsync(resourceGroupName, accountName, transformName, jobName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Update Job - /// - /// - /// Update is only supported for description and priority. Updating Priority - /// will take effect when the Job state is Queued or Scheduled and depending on - /// the timing the priority update may be ignored. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The request parameters - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, Job parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, transformName, jobName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancel Job - /// - /// - /// Cancel a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - public static void CancelJob(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName) - { - operations.CancelJobAsync(resourceGroupName, accountName, transformName, jobName).GetAwaiter().GetResult(); - } - - /// - /// Cancel Job - /// - /// - /// Cancel a Job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The Job name. - /// - /// - /// The cancellation token. - /// - public static async Task CancelJobAsync(this IJobsOperations operations, string resourceGroupName, string accountName, string transformName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CancelJobWithHttpMessagesAsync(resourceGroupName, accountName, transformName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IJobsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Jobs - /// - /// - /// Lists all of the Jobs for the Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveEventsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveEventsOperations.cs index 8c965cfdfb257..1c09dc59953db 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveEventsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveEventsOperations.cs @@ -68,7 +68,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -107,7 +110,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -118,9 +120,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -182,11 +184,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -263,7 +265,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -311,7 +313,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -322,7 +327,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -334,9 +338,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -396,13 +400,13 @@ internal LiveEventsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -699,7 +703,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -747,6 +751,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -755,7 +763,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -766,7 +773,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("autoStart", autoStart); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); @@ -780,9 +786,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (autoStart != null) { @@ -854,11 +860,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -953,7 +959,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1001,11 +1007,14 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1016,7 +1025,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); @@ -1029,9 +1037,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1099,11 +1107,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1198,7 +1206,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1243,7 +1251,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1254,7 +1265,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } @@ -1266,9 +1276,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1330,11 +1340,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1394,7 +1404,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1439,7 +1449,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1450,7 +1463,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginAllocate", tracingParameters); } @@ -1462,9 +1474,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1526,11 +1538,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1590,7 +1602,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1635,7 +1647,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1646,7 +1661,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); } @@ -1658,9 +1672,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1722,11 +1736,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1790,7 +1804,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1835,7 +1849,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } LiveEventActionInput parameters = new LiveEventActionInput(); if (removeOutputsOnStop != null) { @@ -1851,7 +1868,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); @@ -1864,9 +1880,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1934,11 +1950,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2000,7 +2016,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2045,7 +2061,10 @@ internal LiveEventsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2056,7 +2075,6 @@ internal LiveEventsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginReset", tracingParameters); } @@ -2068,9 +2086,9 @@ internal LiveEventsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -2132,11 +2150,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -2189,7 +2207,7 @@ internal LiveEventsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2285,11 +2303,11 @@ internal LiveEventsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveOutputsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveOutputsOperations.cs index c2dac9c9b2c65..ce3bdb7816a34 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveOutputsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LiveOutputsOperations.cs @@ -71,7 +71,7 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -119,7 +119,10 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveEventName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -130,7 +133,6 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -142,9 +144,9 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -206,11 +208,11 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -290,7 +292,7 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -357,7 +359,10 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveOutputName", "^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -369,7 +374,6 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); tracingParameters.Add("liveOutputName", liveOutputName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -382,9 +386,9 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); _url = _url.Replace("{liveOutputName}", System.Uri.EscapeDataString(liveOutputName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -444,13 +448,13 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -599,7 +603,7 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -666,6 +670,10 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveOutputName", "^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -674,7 +682,6 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -686,7 +693,6 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); tracingParameters.Add("liveOutputName", liveOutputName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); @@ -700,9 +706,9 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); _url = _url.Replace("{liveOutputName}", System.Uri.EscapeDataString(liveOutputName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -770,11 +776,11 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -873,7 +879,7 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -937,7 +943,10 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "liveOutputName", "^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -949,7 +958,6 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("liveEventName", liveEventName); tracingParameters.Add("liveOutputName", liveOutputName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } @@ -962,9 +970,9 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) _url = _url.Replace("{liveEventName}", System.Uri.EscapeDataString(liveEventName)); _url = _url.Replace("{liveOutputName}", System.Uri.EscapeDataString(liveOutputName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1026,11 +1034,11 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1083,7 +1091,7 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1179,11 +1187,11 @@ internal LiveOutputsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LocationsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LocationsOperations.cs index 0b06f673ea42a..a769429f7f067 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LocationsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/LocationsOperations.cs @@ -72,7 +72,7 @@ internal LocationsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal LocationsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "locationName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } CheckNameAvailabilityInput parameters = new CheckNameAvailabilityInput(); if (name != null || type != null) { @@ -112,7 +115,6 @@ internal LocationsOperations(AzureMediaServicesClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("locationName", locationName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); @@ -123,9 +125,9 @@ internal LocationsOperations(AzureMediaServicesClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -193,11 +195,11 @@ internal LocationsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; 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 7f6aeac84b5d6..1f1ddcb43c9cc 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/MediaservicesOperations.cs @@ -65,7 +65,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -90,7 +90,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -99,7 +102,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -109,9 +111,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -173,11 +175,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -251,7 +253,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -280,7 +282,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -290,7 +295,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -301,9 +305,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -365,11 +369,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -446,7 +450,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -483,7 +487,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -494,7 +501,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } @@ -505,9 +511,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -575,11 +581,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -671,7 +677,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -697,7 +703,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -707,7 +716,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -718,9 +726,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -782,11 +790,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -845,7 +853,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -878,7 +886,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -889,7 +900,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } @@ -900,9 +910,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -970,11 +980,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1052,7 +1062,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1078,7 +1088,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } SyncStorageKeysInput parameters = new SyncStorageKeysInput(); if (id != null) { @@ -1093,7 +1106,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "SyncStorageKeys", tracingParameters); @@ -1105,9 +1117,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1175,11 +1187,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1238,7 +1250,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1267,7 +1279,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } ListEdgePoliciesInput parameters = new ListEdgePoliciesInput(); if (deviceId != null) { @@ -1282,7 +1297,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListEdgePolicies", tracingParameters); @@ -1294,9 +1308,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1364,11 +1378,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1436,7 +1450,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1457,7 +1471,10 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1465,7 +1482,6 @@ internal MediaservicesOperations(AzureMediaServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } @@ -1474,9 +1490,9 @@ internal MediaservicesOperations(AzureMediaServicesClient client) var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1538,11 +1554,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1613,7 +1629,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1709,11 +1725,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1784,7 +1800,7 @@ internal MediaservicesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1880,11 +1896,11 @@ internal MediaservicesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudio.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudio.cs deleted file mode 100644 index 06128eb026f25..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudio.cs +++ /dev/null @@ -1,63 +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.Linq; - - /// - /// Describes Advanced Audio Codec (AAC) audio encoding settings. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.AacAudio")] - public partial class AacAudio : Audio - { - /// - /// Initializes a new instance of the AacAudio class. - /// - public AacAudio() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AacAudio class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The number of channels in the audio. - /// The sampling rate to use for encoding in - /// hertz. - /// The bitrate, in bits per second, of the - /// output encoded audio. - /// 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?)) - : base(label, channels, samplingRate, bitrate) - { - Profile = profile; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the encoding profile to be used when encoding audio - /// with AAC. Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2' - /// - [JsonProperty(PropertyName = "profile")] - public AacAudioProfile? Profile { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudioProfile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudioProfile.cs deleted file mode 100644 index 360bfed49cfea..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudioProfile.cs +++ /dev/null @@ -1,119 +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; - - /// - /// 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 - { - 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"; - - /// - /// Specifies that the output audio is to be encoded into HE-AAC v1 - /// profile. - /// - public static readonly AacAudioProfile 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudioProfileConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AacAudioProfileConverter.cs deleted file mode 100644 index 356d8350c76e8..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AbsoluteClipTime.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AbsoluteClipTime.cs deleted file mode 100644 index b97e1148df9f5..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AbsoluteClipTime.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specifies the clip time as an absolute time position in the media file. - /// The absolute time can point to a different position depending on - /// whether the media file starts from a timestamp of zero or not. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.AbsoluteClipTime")] - public partial class AbsoluteClipTime : ClipTime - { - /// - /// Initializes a new instance of the AbsoluteClipTime class. - /// - public AbsoluteClipTime() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AbsoluteClipTime class. - /// - /// The time position on the timeline of the input - /// media. It is usually specified as an ISO8601 period. e.g PT30S for - /// 30 seconds. - public AbsoluteClipTime(System.TimeSpan time) - { - Time = time; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the time position on the timeline of the input media. - /// It is usually specified as an ISO8601 period. e.g PT30S for 30 - /// seconds. - /// - [JsonProperty(PropertyName = "time")] - public System.TimeSpan Time { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AccountEncryption.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AccountEncryption.cs index 2a144a0a0cee6..f36794ab1fa69 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AccountEncryption.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AccountEncryption.cs @@ -30,10 +30,15 @@ public AccountEncryption() /// Possible values include: 'SystemKey', 'CustomerKey' /// The properties of the key used to /// encrypt the account. - public AccountEncryption(AccountEncryptionKeyType type, KeyVaultProperties keyVaultProperties = default(KeyVaultProperties)) + /// The Key Vault identity. + /// The current status of the Key Vault + /// mapping. + public AccountEncryption(AccountEncryptionKeyType type, KeyVaultProperties keyVaultProperties = default(KeyVaultProperties), ResourceIdentity identity = default(ResourceIdentity), string status = default(string)) { Type = type; KeyVaultProperties = keyVaultProperties; + Identity = identity; + Status = status; CustomInit(); } @@ -55,6 +60,18 @@ public AccountEncryption() [JsonProperty(PropertyName = "keyVaultProperties")] public KeyVaultProperties KeyVaultProperties { get; set; } + /// + /// Gets or sets the Key Vault identity. + /// + [JsonProperty(PropertyName = "identity")] + public ResourceIdentity Identity { get; set; } + + /// + /// Gets the current status of the Key Vault mapping. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + /// /// Validate the object. /// @@ -63,6 +80,10 @@ public AccountEncryption() /// public virtual void Validate() { + if (Identity != null) + { + Identity.Validate(); + } } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolution.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolution.cs deleted file mode 100644 index c39428f9264a2..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolution.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - - /// - /// Defines values for AnalysisResolution. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AnalysisResolutionConverter))] - public struct AnalysisResolution : System.IEquatable - { - private AnalysisResolution(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - public static readonly AnalysisResolution SourceResolution = "SourceResolution"; - - public static readonly AnalysisResolution StandardDefinition = "StandardDefinition"; - - - /// - /// Underlying value of enum AnalysisResolution - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AnalysisResolution - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AnalysisResolution - /// - public bool Equals(AnalysisResolution e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AnalysisResolution - /// - public static implicit operator AnalysisResolution(string value) - { - return new AnalysisResolution(value); - } - - /// - /// Implicit operator to convert AnalysisResolution to string - /// - public static implicit operator string(AnalysisResolution e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AnalysisResolution - /// - public static bool operator == (AnalysisResolution e1, AnalysisResolution e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AnalysisResolution - /// - public static bool operator != (AnalysisResolution e1, AnalysisResolution e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AnalysisResolution - /// - public override bool Equals(object obj) - { - return obj is AnalysisResolution && Equals((AnalysisResolution)obj); - } - - /// - /// Returns for hashCode AnalysisResolution - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolutionConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolutionConverter.cs deleted file mode 100644 index 960ec0893dc9e..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AnalysisResolutionConverter.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 AnalysisResolution. - /// - public sealed class AnalysisResolutionConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to AnalysisResolution by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AnalysisResolution).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to AnalysisResolution. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AnalysisResolution)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AnalysisResolution for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilter.cs deleted file mode 100644 index c793414b1226c..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilter.cs +++ /dev/null @@ -1,124 +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; - - /// - /// Defines values for AttributeFilter. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AttributeFilterConverter))] - public struct AttributeFilter : System.IEquatable - { - private AttributeFilter(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// All tracks will be included. - /// - public static readonly AttributeFilter All = "All"; - - /// - /// The first track will be included when the attribute is sorted in - /// descending order. Generally used to select the largest bitrate. - /// - public static readonly AttributeFilter Top = "Top"; - - /// - /// The first track will be included when the attribute is sorted in - /// ascending order. Generally used to select the smallest bitrate. - /// - public static readonly AttributeFilter Bottom = "Bottom"; - - /// - /// Any tracks that have an attribute equal to the value given will be - /// included. - /// - public static readonly AttributeFilter ValueEquals = "ValueEquals"; - - - /// - /// Underlying value of enum AttributeFilter - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AttributeFilter - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AttributeFilter - /// - public bool Equals(AttributeFilter e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AttributeFilter - /// - public static implicit operator AttributeFilter(string value) - { - return new AttributeFilter(value); - } - - /// - /// Implicit operator to convert AttributeFilter to string - /// - public static implicit operator string(AttributeFilter e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AttributeFilter - /// - public static bool operator == (AttributeFilter e1, AttributeFilter e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AttributeFilter - /// - public static bool operator != (AttributeFilter e1, AttributeFilter e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AttributeFilter - /// - public override bool Equals(object obj) - { - return obj is AttributeFilter && Equals((AttributeFilter)obj); - } - - /// - /// Returns for hashCode AttributeFilter - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilterConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilterConverter.cs deleted file mode 100644 index 926e1af408da2..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AttributeFilterConverter.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 AttributeFilter. - /// - public sealed class AttributeFilterConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to AttributeFilter by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AttributeFilter).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to AttributeFilter. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AttributeFilter)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AttributeFilter for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Audio.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Audio.cs deleted file mode 100644 index 881cd9a1841ad..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Audio.cs +++ /dev/null @@ -1,74 +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.Linq; - - /// - /// Defines the common properties for all audio codecs. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.Audio")] - public partial class Audio : Codec - { - /// - /// Initializes a new instance of the Audio class. - /// - public Audio() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Audio class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The number of channels in the audio. - /// The sampling rate to use for encoding in - /// hertz. - /// The bitrate, in bits per second, of the - /// output encoded audio. - public Audio(string label = default(string), int? channels = default(int?), int? samplingRate = default(int?), int? bitrate = default(int?)) - : base(label) - { - Channels = channels; - SamplingRate = samplingRate; - Bitrate = bitrate; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the number of channels in the audio. - /// - [JsonProperty(PropertyName = "channels")] - public int? Channels { get; set; } - - /// - /// Gets or sets the sampling rate to use for encoding in hertz. - /// - [JsonProperty(PropertyName = "samplingRate")] - public int? SamplingRate { get; set; } - - /// - /// Gets or sets the bitrate, in bits per second, of the output encoded - /// audio. - /// - [JsonProperty(PropertyName = "bitrate")] - public int? Bitrate { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisMode.cs deleted file mode 100644 index cb9f7a1c7e006..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisMode.cs +++ /dev/null @@ -1,116 +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; - - /// - /// Defines values for AudioAnalysisMode. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(AudioAnalysisModeConverter))] - public struct AudioAnalysisMode : System.IEquatable - { - private AudioAnalysisMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Performs all operations included in the Basic mode, additionally - /// performing language detection and speaker diarization. - /// - public static readonly AudioAnalysisMode Standard = "Standard"; - - /// - /// This mode performs speech-to-text transcription and generation of a - /// VTT subtitle/caption file. The output of this mode includes an - /// Insights JSON file including only the keywords, transcription,and - /// timing information. Automatic language detection and speaker - /// diarization are not included in this mode. - /// - public static readonly AudioAnalysisMode Basic = "Basic"; - - - /// - /// Underlying value of enum AudioAnalysisMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for AudioAnalysisMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type AudioAnalysisMode - /// - public bool Equals(AudioAnalysisMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to AudioAnalysisMode - /// - public static implicit operator AudioAnalysisMode(string value) - { - return new AudioAnalysisMode(value); - } - - /// - /// Implicit operator to convert AudioAnalysisMode to string - /// - public static implicit operator string(AudioAnalysisMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum AudioAnalysisMode - /// - public static bool operator == (AudioAnalysisMode e1, AudioAnalysisMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum AudioAnalysisMode - /// - public static bool operator != (AudioAnalysisMode e1, AudioAnalysisMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for AudioAnalysisMode - /// - public override bool Equals(object obj) - { - return obj is AudioAnalysisMode && Equals((AudioAnalysisMode)obj); - } - - /// - /// Returns for hashCode AudioAnalysisMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisModeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisModeConverter.cs deleted file mode 100644 index d0fa1451ff32e..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalysisModeConverter.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 AudioAnalysisMode. - /// - public sealed class AudioAnalysisModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to AudioAnalysisMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(AudioAnalysisMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to AudioAnalysisMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (AudioAnalysisMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for AudioAnalysisMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalyzerPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalyzerPreset.cs deleted file mode 100644 index ffbed5c48821f..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioAnalyzerPreset.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The Audio Analyzer preset applies a pre-defined set of AI-based - /// analysis operations, including speech transcription. Currently, the - /// preset supports processing of content with a single audio track. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.AudioAnalyzerPreset")] - public partial class AudioAnalyzerPreset : Preset - { - /// - /// Initializes a new instance of the AudioAnalyzerPreset class. - /// - public AudioAnalyzerPreset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AudioAnalyzerPreset class. - /// - /// The language for the audio payload in - /// the input using the BCP-47 format of 'language tag-region' (e.g: - /// 'en-US'). If you know the language of your content, it is - /// recommended that you specify it. The language must be specified - /// explicitly for AudioAnalysisMode::Basic, since automatic language - /// detection is not included in basic mode. 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. 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'." The - /// list of supported languages is available here: - /// https://go.microsoft.com/fwlink/?linkid=2109463 - /// Determines the set of audio analysis operations - /// to be performed. If unspecified, the Standard AudioAnalysisMode - /// would be chosen. Possible values include: 'Standard', - /// 'Basic' - /// Dictionary containing key value - /// pairs for parameters not exposed in the preset itself - public AudioAnalyzerPreset(string audioLanguage = default(string), AudioAnalysisMode? mode = default(AudioAnalysisMode?), IDictionary experimentalOptions = default(IDictionary)) - { - AudioLanguage = audioLanguage; - Mode = mode; - ExperimentalOptions = experimentalOptions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// 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'). If you - /// know the language of your content, it is recommended that you - /// specify it. The language must be specified explicitly for - /// AudioAnalysisMode::Basic, since automatic language detection is not - /// included in basic mode. 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. 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'." The list of - /// supported languages is available here: - /// https://go.microsoft.com/fwlink/?linkid=2109463 - /// - [JsonProperty(PropertyName = "audioLanguage")] - public string AudioLanguage { get; set; } - - /// - /// Gets or sets determines the set of audio analysis operations to be - /// performed. If unspecified, the Standard AudioAnalysisMode would be - /// chosen. Possible values include: 'Standard', 'Basic' - /// - [JsonProperty(PropertyName = "mode")] - public AudioAnalysisMode? Mode { get; set; } - - /// - /// Gets or sets dictionary containing key value pairs for parameters - /// not exposed in the preset itself - /// - [JsonProperty(PropertyName = "experimentalOptions")] - public IDictionary ExperimentalOptions { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioOverlay.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioOverlay.cs deleted file mode 100644 index 3af6fb3502d8c..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioOverlay.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the properties of an audio overlay. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.AudioOverlay")] - public partial class AudioOverlay : Overlay - { - /// - /// Initializes a new instance of the AudioOverlay class. - /// - public AudioOverlay() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AudioOverlay class. - /// - /// The label of the job input which is to be - /// used as an overlay. The Input must specify exactly one file. You - /// can specify an image file in JPG, PNG, GIF or BMP format, or an - /// audio file (such as a WAV, MP3, WMA or M4A file), or a video file. - /// See https://aka.ms/mesformats for the complete list of supported - /// audio and video file formats. - /// The start position, with reference to the input - /// video, at which the overlay starts. The value should be in ISO 8601 - /// format. For example, PT05S to start the overlay at 5 seconds into - /// the input video. If not specified the overlay starts from the - /// beginning of the input video. - /// The end position, with reference to the input - /// video, at which the overlay ends. The value should be in ISO 8601 - /// format. For example, PT30S to end the overlay at 30 seconds into - /// the input video. If not specified or the value is greater than the - /// input video duration, the overlay will be applied until the end of - /// the input video if the overlay media duration is greater than the - /// input video duration, else the overlay will last as long as the - /// overlay media duration. - /// The duration over which the overlay - /// fades in onto the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade in (same as PT0S). - /// The duration over which the overlay - /// fades out of the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade out (same as PT0S). - /// 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, 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(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioTrackDescriptor.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioTrackDescriptor.cs deleted file mode 100644 index 96232760b62b1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/AudioTrackDescriptor.cs +++ /dev/null @@ -1,60 +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.Linq; - - /// - /// A TrackSelection to select audio tracks. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.AudioTrackDescriptor")] - public partial class AudioTrackDescriptor : TrackDescriptor - { - /// - /// Initializes a new instance of the AudioTrackDescriptor class. - /// - public AudioTrackDescriptor() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AudioTrackDescriptor class. - /// - /// Optional designation for single - /// channel audio tracks. Can be used to combine the tracks into - /// stereo or multi-channel audio tracks. Possible values include: - /// 'FrontLeft', 'FrontRight', 'Center', 'LowFrequencyEffects', - /// 'BackLeft', 'BackRight', 'StereoLeft', 'StereoRight' - public AudioTrackDescriptor(ChannelMapping? channelMapping = default(ChannelMapping?)) - { - ChannelMapping = channelMapping; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets optional designation for single channel audio tracks. - /// Can be used to combine the tracks into stereo or multi-channel - /// audio tracks. Possible values include: 'FrontLeft', 'FrontRight', - /// 'Center', 'LowFrequencyEffects', 'BackLeft', 'BackRight', - /// 'StereoLeft', 'StereoRight' - /// - [JsonProperty(PropertyName = "channelMapping")] - public ChannelMapping? ChannelMapping { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurType.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurType.cs deleted file mode 100644 index 86e4301ea2468..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurType.cs +++ /dev/null @@ -1,126 +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; - - /// - /// Defines values for BlurType. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(BlurTypeConverter))] - public struct BlurType : System.IEquatable - { - private BlurType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Box: debug filter, bounding box only - /// - public static readonly BlurType Box = "Box"; - - /// - /// Low: box-car blur filter - /// - public static readonly BlurType Low = "Low"; - - /// - /// Med: Gaussian blur filter - /// - public static readonly BlurType Med = "Med"; - - /// - /// High: Confuse blur filter - /// - public static readonly BlurType High = "High"; - - /// - /// Black: Black out filter - /// - public static readonly BlurType Black = "Black"; - - - /// - /// Underlying value of enum BlurType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for BlurType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type BlurType - /// - public bool Equals(BlurType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to BlurType - /// - public static implicit operator BlurType(string value) - { - return new BlurType(value); - } - - /// - /// Implicit operator to convert BlurType to string - /// - public static implicit operator string(BlurType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum BlurType - /// - public static bool operator == (BlurType e1, BlurType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum BlurType - /// - public static bool operator != (BlurType e1, BlurType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for BlurType - /// - public override bool Equals(object obj) - { - return obj is BlurType && Equals((BlurType)obj); - } - - /// - /// Returns for hashCode BlurType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurTypeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurTypeConverter.cs deleted file mode 100644 index c16c916bc60e1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BlurTypeConverter.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 BlurType. - /// - public sealed class BlurTypeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to BlurType by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(BlurType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to BlurType. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (BlurType)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for BlurType for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BuiltInStandardEncoderPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BuiltInStandardEncoderPreset.cs deleted file mode 100644 index 3c1d1a857de7c..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/BuiltInStandardEncoderPreset.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes a built-in preset for encoding the input video with the - /// Standard Encoder. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.BuiltInStandardEncoderPreset")] - public partial class BuiltInStandardEncoderPreset : Preset - { - /// - /// Initializes a new instance of the BuiltInStandardEncoderPreset - /// class. - /// - public BuiltInStandardEncoderPreset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BuiltInStandardEncoderPreset - /// class. - /// - /// The built-in preset to be used for - /// encoding videos. Possible values include: 'H264SingleBitrateSD', - /// 'H264SingleBitrate720p', 'H264SingleBitrate1080p', - /// 'AdaptiveStreaming', 'AACGoodQualityAudio', - /// 'ContentAwareEncodingExperimental', 'ContentAwareEncoding', - /// 'CopyAllBitrateNonInterleaved', 'H264MultipleBitrate1080p', - /// 'H264MultipleBitrate720p', 'H264MultipleBitrateSD', - /// 'H265ContentAwareEncoding', 'H265AdaptiveStreaming', - /// 'H265SingleBitrate720p', 'H265SingleBitrate1080p', - /// 'H265SingleBitrate4K' - public BuiltInStandardEncoderPreset(EncoderNamedPreset presetName) - { - PresetName = presetName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the built-in preset to be used for encoding videos. - /// Possible values include: 'H264SingleBitrateSD', - /// 'H264SingleBitrate720p', 'H264SingleBitrate1080p', - /// 'AdaptiveStreaming', 'AACGoodQualityAudio', - /// 'ContentAwareEncodingExperimental', 'ContentAwareEncoding', - /// 'CopyAllBitrateNonInterleaved', 'H264MultipleBitrate1080p', - /// 'H264MultipleBitrate720p', 'H264MultipleBitrateSD', - /// 'H265ContentAwareEncoding', 'H265AdaptiveStreaming', - /// 'H265SingleBitrate720p', 'H265SingleBitrate1080p', - /// 'H265SingleBitrate4K' - /// - [JsonProperty(PropertyName = "presetName")] - public EncoderNamedPreset PresetName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMapping.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMapping.cs deleted file mode 100644 index ea185c0a11270..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMapping.cs +++ /dev/null @@ -1,144 +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; - - /// - /// Defines values for ChannelMapping. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ChannelMappingConverter))] - public struct ChannelMapping : System.IEquatable - { - private ChannelMapping(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// The Front Left Channel. - /// - public static readonly ChannelMapping FrontLeft = "FrontLeft"; - - /// - /// The Front Right Channel. - /// - public static readonly ChannelMapping FrontRight = "FrontRight"; - - /// - /// The Center Channel. - /// - public static readonly ChannelMapping Center = "Center"; - - /// - /// Low Frequency Effects Channel. Sometimes referred to as the - /// Subwoofer. - /// - public static readonly ChannelMapping LowFrequencyEffects = "LowFrequencyEffects"; - - /// - /// The Back Left Channel. Sometimes referred to as the Left Surround - /// Channel. - /// - public static readonly ChannelMapping BackLeft = "BackLeft"; - - /// - /// The Back Right Channel. Sometimes referred to as the Right - /// Surround Channel. - /// - public static readonly ChannelMapping BackRight = "BackRight"; - - /// - /// The Left Stereo channel. Sometimes referred to as Down Mix Left. - /// - public static readonly ChannelMapping StereoLeft = "StereoLeft"; - - /// - /// The Right Stereo channel. Sometimes referred to as Down Mix Right. - /// - public static readonly ChannelMapping StereoRight = "StereoRight"; - - - /// - /// Underlying value of enum ChannelMapping - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for ChannelMapping - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type ChannelMapping - /// - public bool Equals(ChannelMapping e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to ChannelMapping - /// - public static implicit operator ChannelMapping(string value) - { - return new ChannelMapping(value); - } - - /// - /// Implicit operator to convert ChannelMapping to string - /// - public static implicit operator string(ChannelMapping e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum ChannelMapping - /// - public static bool operator == (ChannelMapping e1, ChannelMapping e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum ChannelMapping - /// - public static bool operator != (ChannelMapping e1, ChannelMapping e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for ChannelMapping - /// - public override bool Equals(object obj) - { - return obj is ChannelMapping && Equals((ChannelMapping)obj); - } - - /// - /// Returns for hashCode ChannelMapping - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMappingConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMappingConverter.cs deleted file mode 100644 index 353ac9e8b02ef..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ChannelMappingConverter.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 ChannelMapping. - /// - public sealed class ChannelMappingConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to ChannelMapping by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(ChannelMapping).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to ChannelMapping. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (ChannelMapping)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for ChannelMapping for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} 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 deleted file mode 100644 index eb4774b91b5c4..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ClipTime.cs +++ /dev/null @@ -1,36 +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 System.Linq; - - /// - /// Base class for specifying a clip time. Use sub classes of this class to - /// specify the time position in the media. - /// - public partial class ClipTime - { - /// - /// Initializes a new instance of the ClipTime class. - /// - public ClipTime() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} 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 deleted file mode 100644 index fb88196426654..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Codec.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.Linq; - - /// - /// Describes the basic properties of all codecs. - /// - public partial class Codec - { - /// - /// Initializes a new instance of the Codec class. - /// - public Codec() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Codec class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - public Codec(string label = default(string)) - { - Label = label; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets an optional label for the codec. The label can be used - /// to control muxing behavior. - /// - [JsonProperty(PropertyName = "label")] - public string Label { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyAudio.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyAudio.cs deleted file mode 100644 index 2f36e5cac1ea1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyAudio.cs +++ /dev/null @@ -1,48 +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.Linq; - - /// - /// A codec flag, which tells the encoder to copy the input audio - /// bitstream. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.CopyAudio")] - public partial class CopyAudio : Codec - { - /// - /// Initializes a new instance of the CopyAudio class. - /// - public CopyAudio() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CopyAudio class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - public CopyAudio(string label = default(string)) - : base(label) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyVideo.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyVideo.cs deleted file mode 100644 index 05d4e903902ff..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/CopyVideo.cs +++ /dev/null @@ -1,48 +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.Linq; - - /// - /// A codec flag, which tells the encoder to copy the input video bitstream - /// without re-encoding. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.CopyVideo")] - public partial class CopyVideo : Codec - { - /// - /// Initializes a new instance of the CopyVideo class. - /// - public CopyVideo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CopyVideo class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - public CopyVideo(string label = default(string)) - : base(label) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Deinterlace.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Deinterlace.cs deleted file mode 100644 index fda87a4ae0090..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Deinterlace.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the de-interlacing settings. - /// - public partial class Deinterlace - { - /// - /// Initializes a new instance of the Deinterlace class. - /// - public Deinterlace() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Deinterlace class. - /// - /// The field parity for de-interlacing, defaults - /// to Auto. Possible values include: 'Auto', 'TopFieldFirst', - /// 'BottomFieldFirst' - /// The deinterlacing mode. Defaults to - /// AutoPixelAdaptive. Possible values include: 'Off', - /// 'AutoPixelAdaptive' - public Deinterlace(DeinterlaceParity? parity = default(DeinterlaceParity?), DeinterlaceMode? mode = default(DeinterlaceMode?)) - { - Parity = parity; - Mode = mode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the field parity for de-interlacing, defaults to Auto. - /// Possible values include: 'Auto', 'TopFieldFirst', - /// 'BottomFieldFirst' - /// - [JsonProperty(PropertyName = "parity")] - public DeinterlaceParity? 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; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceMode.cs deleted file mode 100644 index c8cf95371bdda..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceMode.cs +++ /dev/null @@ -1,112 +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; - - /// - /// 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 - { - private DeinterlaceMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Disables de-interlacing of the source video. - /// - public static readonly DeinterlaceMode 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceModeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceModeConverter.cs deleted file mode 100644 index 2050dd5380b71..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceParity.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceParity.cs deleted file mode 100644 index dc024535656a9..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceParity.cs +++ /dev/null @@ -1,116 +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; - - /// - /// 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 - { - private DeinterlaceParity(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Automatically detect the order of fields - /// - public static readonly DeinterlaceParity Auto = "Auto"; - - /// - /// Apply top field first processing of input video. - /// - public static readonly DeinterlaceParity 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceParityConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/DeinterlaceParityConverter.cs deleted file mode 100644 index ad9b0c2a8f8af..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EncoderNamedPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EncoderNamedPreset.cs deleted file mode 100644 index ebef1e3ab7954..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EncoderNamedPreset.cs +++ /dev/null @@ -1,232 +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; - - /// - /// 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 - { - 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 128 kbps. - /// - public static readonly EncoderNamedPreset 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 128 kbps. - /// - public static readonly EncoderNamedPreset 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 128 kbps. - /// - public static readonly EncoderNamedPreset 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 - /// resolution, bitrate and frame rate. The auto-generated preset will - /// never exceed the input resolution. For example, if the input is - /// 720p, output will remain 720p at best. - /// - public static readonly EncoderNamedPreset AdaptiveStreaming = "AdaptiveStreaming"; - - /// - /// Produces a single MP4 file containing only stereo audio encoded at - /// 192 kbps. - /// - public static readonly EncoderNamedPreset 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 static readonly EncoderNamedPreset ContentAwareEncodingExperimental = "ContentAwareEncodingExperimental"; - - /// - /// Produces a set of GOP-aligned MP4s by using content-aware encoding. - /// Given any input content, the service performs an initial - /// lightweight analysis of the input content, and uses the results to - /// determine the optimal number of layers, appropriate bitrate and - /// resolution settings for delivery by adaptive streaming. This preset - /// is particularly effective for low and medium complexity videos, - /// where the output files will be at lower bitrates but at a quality - /// that still delivers a good experience to viewers. The output will - /// contain MP4 files with video and audio interleaved. - /// - public static readonly EncoderNamedPreset ContentAwareEncoding = "ContentAwareEncoding"; - - /// - /// Copy all video and audio streams from the input asset as - /// non-interleaved video and audio output files. This preset can be - /// used to clip an existing asset or convert a group of key frame - /// (GOP) aligned MP4 files as an asset that can be streamed. - /// - public static readonly EncoderNamedPreset CopyAllBitrateNonInterleaved = "CopyAllBitrateNonInterleaved"; - - /// - /// 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 180p. - /// - public static readonly EncoderNamedPreset 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 180p. - /// - public static readonly EncoderNamedPreset H264MultipleBitrate720p = "H264MultipleBitrate720p"; - - /// - /// Produces a set of 5 GOP-aligned MP4 files, ranging from 1900kbps to - /// 400 kbps, and stereo AAC audio. Resolution starts at 480p and goes - /// down to 240p. - /// - public static readonly EncoderNamedPreset H264MultipleBitrateSD = "H264MultipleBitrateSD"; - - /// - /// Produces a set of GOP-aligned MP4s by using content-aware encoding. - /// Given any input content, the service performs an initial - /// lightweight analysis of the input content, and uses the results to - /// determine the optimal number of layers, appropriate bitrate and - /// resolution settings for delivery by adaptive streaming. This preset - /// is particularly effective for low and medium complexity videos, - /// where the output files will be at lower bitrates but at a quality - /// that still delivers a good experience to viewers. The output will - /// contain MP4 files with video and audio interleaved. - /// - public static readonly EncoderNamedPreset H265ContentAwareEncoding = "H265ContentAwareEncoding"; - - /// - /// Produces a set of GOP aligned MP4 files with H.265 video and stereo - /// AAC audio. Auto-generates a bitrate ladder based on the input - /// resolution, bitrate and frame rate. The auto-generated preset will - /// never exceed the input resolution. For example, if the input is - /// 720p, output will remain 720p at best. - /// - public static readonly EncoderNamedPreset H265AdaptiveStreaming = "H265AdaptiveStreaming"; - - /// - /// Produces an MP4 file where the video is encoded with H.265 codec at - /// 1800 kbps and a picture height of 720 pixels, and the stereo audio - /// is encoded with AAC-LC codec at 128 kbps. - /// - public static readonly EncoderNamedPreset H265SingleBitrate720p = "H265SingleBitrate720p"; - - /// - /// Produces an MP4 file where the video is encoded with H.265 codec at - /// 3500 kbps and a picture height of 1080 pixels, and the stereo audio - /// is encoded with AAC-LC codec at 128 kbps. - /// - public static readonly EncoderNamedPreset H265SingleBitrate1080p = "H265SingleBitrate1080p"; - - /// - /// Produces an MP4 file where the video is encoded with H.265 codec at - /// 9500 kbps and a picture height of 2160 pixels, and the stereo audio - /// is encoded with AAC-LC codec at 128 kbps. - /// - public static readonly EncoderNamedPreset H265SingleBitrate4K = "H265SingleBitrate4K"; - - - /// - /// 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EncoderNamedPresetConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EncoderNamedPresetConverter.cs deleted file mode 100644 index 5bfe0f453b180..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EntropyMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EntropyMode.cs deleted file mode 100644 index c955bc53a948d..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EntropyMode.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.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 - { - private EntropyMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Context Adaptive Binary Arithmetic Coder (CABAC) entropy encoding. - /// - public static readonly EntropyMode 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EntropyModeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/EntropyModeConverter.cs deleted file mode 100644 index 704aecbe61688..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorDetail.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorAdditionalInfo.cs similarity index 52% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorDetail.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorAdditionalInfo.cs index 26277b8ff3998..1bb6a1658df69 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorDetail.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorAdditionalInfo.cs @@ -14,28 +14,27 @@ namespace Microsoft.Azure.Management.Media.Models using System.Linq; /// - /// Details of JobOutput errors. + /// The resource management error additional info. /// - public partial class JobErrorDetail + public partial class ErrorAdditionalInfo { /// - /// Initializes a new instance of the JobErrorDetail class. + /// Initializes a new instance of the ErrorAdditionalInfo class. /// - public JobErrorDetail() + public ErrorAdditionalInfo() { CustomInit(); } /// - /// Initializes a new instance of the JobErrorDetail class. + /// Initializes a new instance of the ErrorAdditionalInfo class. /// - /// Code describing the error detail. - /// A human-readable representation of the - /// error. - public JobErrorDetail(string code = default(string), string message = default(string)) + /// The additional info type. + /// The additional info. + public ErrorAdditionalInfo(string type = default(string), object info = default(object)) { - Code = code; - Message = message; + Type = type; + Info = info; CustomInit(); } @@ -45,16 +44,16 @@ public JobErrorDetail() partial void CustomInit(); /// - /// Gets code describing the error detail. + /// Gets the additional info type. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } /// - /// Gets a human-readable representation of the error. + /// Gets the additional info. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [JsonProperty(PropertyName = "info")] + public object Info { get; private set; } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ODataError.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorDetail.cs similarity index 54% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ODataError.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorDetail.cs index 48d9167454525..1bebc6a805709 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ODataError.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorDetail.cs @@ -16,32 +16,33 @@ namespace Microsoft.Azure.Management.Media.Models using System.Linq; /// - /// Information about an error. + /// The error detail. /// - public partial class ODataError + public partial class ErrorDetail { /// - /// Initializes a new instance of the ODataError class. + /// Initializes a new instance of the ErrorDetail class. /// - public ODataError() + public ErrorDetail() { CustomInit(); } /// - /// Initializes a new instance of the ODataError class. + /// Initializes a new instance of the ErrorDetail class. /// - /// A language-independent error name. + /// The error code. /// The error message. - /// The target of the error (for example, the name - /// of the property in error). + /// The error target. /// The error details. - public ODataError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) + /// The error additional info. + public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) { Code = code; Message = message; Target = target; Details = details; + AdditionalInfo = additionalInfo; CustomInit(); } @@ -51,29 +52,34 @@ public ODataError() partial void CustomInit(); /// - /// Gets or sets a language-independent error name. + /// Gets the error code. /// [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + public string Code { get; private set; } /// - /// Gets or sets the error message. + /// Gets the error message. /// [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + public string Message { get; private set; } /// - /// Gets or sets the target of the error (for example, the name of the - /// property in error). + /// Gets the error target. /// [JsonProperty(PropertyName = "target")] - public string Target { get; set; } + public string Target { get; private set; } /// - /// Gets or sets the error details. + /// Gets the error details. /// [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } + public IList Details { get; private set; } + + /// + /// Gets the error additional info. + /// + [JsonProperty(PropertyName = "additionalInfo")] + public IList AdditionalInfo { get; private set; } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiError.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponse.cs similarity index 59% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiError.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponse.cs index f13722e16aa2c..12a5412e7809a 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiError.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponse.cs @@ -14,23 +14,28 @@ namespace Microsoft.Azure.Management.Media.Models using System.Linq; /// - /// The API error. + /// Error response /// - public partial class ApiError + /// + /// Common error response for all Azure Resource Manager APIs to return + /// error details for failed operations. (This also follows the OData error + /// response format.). + /// + public partial class ErrorResponse { /// - /// Initializes a new instance of the ApiError class. + /// Initializes a new instance of the ErrorResponse class. /// - public ApiError() + public ErrorResponse() { CustomInit(); } /// - /// Initializes a new instance of the ApiError class. + /// Initializes a new instance of the ErrorResponse class. /// - /// The error properties. - public ApiError(ODataError error = default(ODataError)) + /// The error object. + public ErrorResponse(ErrorDetail error = default(ErrorDetail)) { Error = error; CustomInit(); @@ -42,10 +47,10 @@ public ApiError() partial void CustomInit(); /// - /// Gets or sets the error properties. + /// Gets or sets the error object. /// [JsonProperty(PropertyName = "error")] - public ODataError Error { get; set; } + public ErrorDetail Error { get; set; } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiErrorException.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponseException.cs similarity index 69% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiErrorException.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponseException.cs index e40806c835d69..fd3355b6c4a0c 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ApiErrorException.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ErrorResponseException.cs @@ -13,9 +13,10 @@ namespace Microsoft.Azure.Management.Media.Models using Microsoft.Rest; /// - /// Exception thrown for an invalid response with ApiError information. + /// Exception thrown for an invalid response with ErrorResponse + /// information. /// - public partial class ApiErrorException : RestException + public partial class ErrorResponseException : RestException { /// /// Gets information about the associated HTTP request. @@ -30,30 +31,30 @@ public partial class ApiErrorException : RestException /// /// Gets or sets the body object. /// - public ApiError Body { get; set; } + public ErrorResponse Body { get; set; } /// - /// Initializes a new instance of the ApiErrorException class. + /// Initializes a new instance of the ErrorResponseException class. /// - public ApiErrorException() + public ErrorResponseException() { } /// - /// Initializes a new instance of the ApiErrorException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. - public ApiErrorException(string message) + public ErrorResponseException(string message) : this(message, null) { } /// - /// Initializes a new instance of the ApiErrorException class. + /// Initializes a new instance of the ErrorResponseException class. /// /// The exception message. /// Inner exception. - public ApiErrorException(string message, System.Exception innerException) + public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceDetectorPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceDetectorPreset.cs deleted file mode 100644 index 4e073b0ea861d..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceDetectorPreset.cs +++ /dev/null @@ -1,127 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes all the settings to be used when analyzing a video in order - /// to detect (and optionally redact) 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' - /// This mode provides the ability to choose between - /// the following settings: 1) Analyze - For detection only.This mode - /// generates a metadata JSON file marking appearances of faces - /// throughout the video.Where possible, appearances of the same person - /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) - /// detected faces. 3) Redact - This enables a 2-pass process, allowing - /// for selective redaction of a subset of detected faces.It takes in - /// the metadata file from a prior analyze pass, along with the source - /// video, and a user-selected subset of IDs that require redaction. - /// Possible values include: 'Analyze', 'Redact', 'Combined' - /// Blur type. Possible values include: 'Box', - /// 'Low', 'Med', 'High', 'Black' - /// Dictionary containing key value - /// pairs for parameters not exposed in the preset itself - public FaceDetectorPreset(AnalysisResolution? resolution = default(AnalysisResolution?), FaceRedactorMode? mode = default(FaceRedactorMode?), BlurType? blurType = default(BlurType?), IDictionary experimentalOptions = default(IDictionary)) - { - Resolution = resolution; - Mode = mode; - BlurType = blurType; - ExperimentalOptions = experimentalOptions; - 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 AnalysisResolution? Resolution { get; set; } - - /// - /// Gets or sets this mode provides the ability to choose between the - /// following settings: 1) Analyze - For detection only.This mode - /// generates a metadata JSON file marking appearances of faces - /// throughout the video.Where possible, appearances of the same person - /// are assigned the same ID. 2) Combined - Additionally redacts(blurs) - /// detected faces. 3) Redact - This enables a 2-pass process, allowing - /// for selective redaction of a subset of detected faces.It takes in - /// the metadata file from a prior analyze pass, along with the source - /// video, and a user-selected subset of IDs that require redaction. - /// Possible values include: 'Analyze', 'Redact', 'Combined' - /// - [JsonProperty(PropertyName = "mode")] - public FaceRedactorMode? Mode { get; set; } - - /// - /// Gets or sets blur type. Possible values include: 'Box', 'Low', - /// 'Med', 'High', 'Black' - /// - [JsonProperty(PropertyName = "blurType")] - public BlurType? BlurType { get; set; } - - /// - /// Gets or sets dictionary containing key value pairs for parameters - /// not exposed in the preset itself - /// - [JsonProperty(PropertyName = "experimentalOptions")] - public IDictionary ExperimentalOptions { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorMode.cs deleted file mode 100644 index 9b34ff4ba16d3..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorMode.cs +++ /dev/null @@ -1,120 +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; - - /// - /// Defines values for FaceRedactorMode. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(FaceRedactorModeConverter))] - public struct FaceRedactorMode : System.IEquatable - { - private FaceRedactorMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Analyze mode detects faces and outputs a metadata file with the - /// results. Allows editing of the metadata file before faces are - /// blurred with Redact mode. - /// - public static readonly FaceRedactorMode Analyze = "Analyze"; - - /// - /// Redact mode consumes the metadata file from Analyze mode and - /// redacts the faces found. - /// - public static readonly FaceRedactorMode Redact = "Redact"; - - /// - /// Combined mode does the Analyze and Redact steps in one pass when - /// editing the analyzed faces is not desired. - /// - public static readonly FaceRedactorMode Combined = "Combined"; - - - /// - /// Underlying value of enum FaceRedactorMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for FaceRedactorMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type FaceRedactorMode - /// - public bool Equals(FaceRedactorMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to FaceRedactorMode - /// - public static implicit operator FaceRedactorMode(string value) - { - return new FaceRedactorMode(value); - } - - /// - /// Implicit operator to convert FaceRedactorMode to string - /// - public static implicit operator string(FaceRedactorMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum FaceRedactorMode - /// - public static bool operator == (FaceRedactorMode e1, FaceRedactorMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum FaceRedactorMode - /// - public static bool operator != (FaceRedactorMode e1, FaceRedactorMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for FaceRedactorMode - /// - public override bool Equals(object obj) - { - return obj is FaceRedactorMode && Equals((FaceRedactorMode)obj); - } - - /// - /// Returns for hashCode FaceRedactorMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorModeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorModeConverter.cs deleted file mode 100644 index a29dc6e30f30c..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FaceRedactorModeConverter.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 FaceRedactorMode. - /// - public sealed class FaceRedactorModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to FaceRedactorMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(FaceRedactorMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to FaceRedactorMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (FaceRedactorMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for FaceRedactorMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Filters.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Filters.cs deleted file mode 100644 index faf1f4d4dbca0..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Filters.cs +++ /dev/null @@ -1,90 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes all the filtering operations, such as de-interlacing, - /// rotation etc. that are to be applied to the input media before - /// encoding. - /// - public partial class Filters - { - /// - /// Initializes a new instance of the Filters class. - /// - public Filters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Filters class. - /// - /// The de-interlacing settings. - /// The rotation, if any, to be applied to the - /// input video, before it is encoded. Default is Auto. Possible values - /// include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', - /// 'Rotate270' - /// The parameters for the rectangular window with - /// which to crop the input video. - /// 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)) - { - Deinterlace = deinterlace; - Rotation = rotation; - Crop = crop; - Overlays = overlays; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the de-interlacing settings. - /// - [JsonProperty(PropertyName = "deinterlace")] - public Deinterlace Deinterlace { get; set; } - - /// - /// Gets or sets the rotation, if any, to be applied to the input - /// video, before it is encoded. Default is Auto. Possible values - /// include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', - /// 'Rotate270' - /// - [JsonProperty(PropertyName = "rotation")] - public Rotation? Rotation { get; set; } - - /// - /// Gets or sets the parameters for the rectangular window with which - /// to crop the input video. - /// - [JsonProperty(PropertyName = "crop")] - public Rectangle Crop { get; set; } - - /// - /// Gets or sets the properties of overlays to be applied to the input - /// video. These could be audio, image or video overlays. - /// - [JsonProperty(PropertyName = "overlays")] - public IList Overlays { 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 deleted file mode 100644 index 9c8a3a83366b6..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Format.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Base class for output. - /// - public partial class Format - { - /// - /// Initializes a new instance of the Format class. - /// - public Format() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Format class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - public Format(string filenamePattern) - { - FilenamePattern = filenamePattern; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the pattern of the file names for the generated output - /// files. The following macros are supported in the file name: - /// {Basename} - An expansion macro that will use the name of the input - /// video file. If the base name(the file suffix is not included) of - /// the input video file is less than 32 characters long, the base name - /// of input video files will be used. If the length of base name of - /// the input video file exceeds 32 characters, the base name is - /// truncated to the first 32 characters in total length. {Extension} - - /// The appropriate extension for this format. {Label} - The label - /// assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromAllInputFile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromAllInputFile.cs deleted file mode 100644 index e435aa3dd0520..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromAllInputFile.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An InputDefinition that looks across all of the files provided to - /// select tracks specified by the IncludedTracks property. Generally used - /// with the AudioTrackByAttribute and VideoTrackByAttribute to allow - /// selection of a single track across a set of input files. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.FromAllInputFile")] - public partial class FromAllInputFile : InputDefinition - { - /// - /// Initializes a new instance of the FromAllInputFile class. - /// - public FromAllInputFile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FromAllInputFile class. - /// - /// The list of TrackDescriptors which - /// define the metadata and selection of tracks in the input. - public FromAllInputFile(IList includedTracks = default(IList)) - : base(includedTracks) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromEachInputFile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromEachInputFile.cs deleted file mode 100644 index e2d24c81f84e8..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/FromEachInputFile.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An InputDefinition that looks at each input file provided to select - /// tracks specified by the IncludedTracks property. Generally used with - /// the AudioTrackByAttribute and VideoTrackByAttribute to select tracks - /// from each file given. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.FromEachInputFile")] - public partial class FromEachInputFile : InputDefinition - { - /// - /// Initializes a new instance of the FromEachInputFile class. - /// - public FromEachInputFile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FromEachInputFile class. - /// - /// The list of TrackDescriptors which - /// define the metadata and selection of tracks in the input. - public FromEachInputFile(IList includedTracks = default(IList)) - : base(includedTracks) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Complexity.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Complexity.cs deleted file mode 100644 index a3e4da523a950..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Complexity.cs +++ /dev/null @@ -1,119 +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; - - /// - /// 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 - { - 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"; - - /// - /// Tells the encoder to use settings that achieve a balance between - /// speed and quality. - /// - public static readonly H264Complexity 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264ComplexityConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264ComplexityConverter.cs deleted file mode 100644 index 26d778e9377bf..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Layer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Layer.cs deleted file mode 100644 index 543d4976bd0e5..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Layer.cs +++ /dev/null @@ -1,154 +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.Linq; - - /// - /// Describes the settings to be used when encoding the input video into a - /// desired output bitrate layer with the H.264 video codec. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.H264Layer")] - public partial class H264Layer : VideoLayer - { - /// - /// Initializes a new instance of the H264Layer class. - /// - public H264Layer() - { - CustomInit(); - } - - /// - /// 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - /// 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. - /// The number of B-frames to be used when - /// encoding this layer. If not specified, the encoder chooses an - /// appropriate number based on the video profile and level. - /// The frame rate (in frames per second) at - /// which to encode this layer. The value can be in the form of M/N - /// where M and N are integers (For example, 30000/1001), or in the - /// form of a number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// The number of slices to be used when encoding - /// this layer. If not specified, default is zero, which means that - /// encoder will use a single slice for each frame. - /// 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. - /// 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, - /// PT5S). - /// The number of reference frames to be - /// used when encoding this layer. If not specified, the encoder - /// determines an appropriate number based on the encoder complexity - /// setting. - /// The entropy mode to be used for this - /// layer. If not specified, the encoder chooses the mode that is - /// appropriate for the profile and level. Possible values include: - /// 'Cabac', 'Cavlc' - 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?), H264VideoProfile? profile = default(H264VideoProfile?), string level = default(string), System.TimeSpan? bufferWindow = default(System.TimeSpan?), int? referenceFrames = default(int?), EntropyMode? entropyMode = default(EntropyMode?)) - : base(bitrate, width, height, label, maxBitrate, bFrames, frameRate, slices, adaptiveBFrame) - { - Profile = profile; - Level = level; - BufferWindow = bufferWindow; - ReferenceFrames = referenceFrames; - EntropyMode = entropyMode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// 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; } - - /// - /// 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; } - - /// - /// Gets or sets 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, PT5S). - /// - [JsonProperty(PropertyName = "bufferWindow")] - public System.TimeSpan? BufferWindow { get; set; } - - /// - /// Gets or sets the number of reference frames to be used when - /// encoding this layer. If not specified, the encoder determines an - /// appropriate number based on the encoder complexity setting. - /// - [JsonProperty(PropertyName = "referenceFrames")] - public int? ReferenceFrames { get; set; } - - /// - /// Gets or sets the entropy mode to be used for this layer. If not - /// specified, the encoder chooses the mode that is appropriate for the - /// profile and level. Possible values include: 'Cabac', 'Cavlc' - /// - [JsonProperty(PropertyName = "entropyMode")] - public EntropyMode? EntropyMode { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Video.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Video.cs deleted file mode 100644 index b841e52c2b8eb..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264Video.cs +++ /dev/null @@ -1,98 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes all the properties for encoding a video with the H.264 codec. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.H264Video")] - public partial class H264Video : Video - { - /// - /// Initializes a new instance of the H264Video class. - /// - public H264Video() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the H264Video class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - /// Whether or not the encoder - /// should insert key frames at scene changes. If not specified, the - /// default is false. This flag should be set to true only when the - /// encoder is being configured to produce a single output - /// video. - /// Tells the encoder how to choose its - /// encoding settings. The default value is Balanced. Possible values - /// 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?), VideoSyncMode? syncMode = default(VideoSyncMode?), bool? sceneChangeDetection = default(bool?), H264Complexity? complexity = default(H264Complexity?), IList layers = default(IList)) - : base(label, keyFrameInterval, stretchMode, syncMode) - { - SceneChangeDetection = sceneChangeDetection; - Complexity = complexity; - Layers = layers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets whether or not the encoder should insert key frames at - /// scene changes. If not specified, the default is false. This flag - /// should be set to true only when the encoder is being configured to - /// produce a single output video. - /// - [JsonProperty(PropertyName = "sceneChangeDetection")] - public bool? SceneChangeDetection { get; set; } - - /// - /// Gets or sets tells the encoder how to choose its encoding settings. - /// The default value is Balanced. Possible values include: 'Speed', - /// 'Balanced', 'Quality' - /// - [JsonProperty(PropertyName = "complexity")] - public H264Complexity? Complexity { get; set; } - - /// - /// Gets or sets the collection of output H.264 layers to be produced - /// by the encoder. - /// - [JsonProperty(PropertyName = "layers")] - public IList Layers { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264VideoProfile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264VideoProfile.cs deleted file mode 100644 index cbb9594c77a73..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264VideoProfile.cs +++ /dev/null @@ -1,132 +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; - - /// - /// 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 - { - private H264VideoProfile(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Tells the encoder to automatically determine the appropriate H.264 - /// profile. - /// - public static readonly H264VideoProfile Auto = "Auto"; - - /// - /// Baseline profile - /// - public static readonly H264VideoProfile Baseline = "Baseline"; - - /// - /// Main profile - /// - public static readonly H264VideoProfile Main = "Main"; - - /// - /// High profile. - /// - public static readonly H264VideoProfile High = "High"; - - /// - /// High 4:2:2 profile. - /// - public static readonly H264VideoProfile 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264VideoProfileConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H264VideoProfileConverter.cs deleted file mode 100644 index 302b91bf8c6e9..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Complexity.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Complexity.cs deleted file mode 100644 index 0f68926134856..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Complexity.cs +++ /dev/null @@ -1,119 +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; - - /// - /// Defines values for H265Complexity. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(H265ComplexityConverter))] - public struct H265Complexity : System.IEquatable - { - private H265Complexity(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 H265Complexity Speed = "Speed"; - - /// - /// Tells the encoder to use settings that achieve a balance between - /// speed and quality. - /// - public static readonly H265Complexity 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 H265Complexity Quality = "Quality"; - - - /// - /// Underlying value of enum H265Complexity - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for H265Complexity - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type H265Complexity - /// - public bool Equals(H265Complexity e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to H265Complexity - /// - public static implicit operator H265Complexity(string value) - { - return new H265Complexity(value); - } - - /// - /// Implicit operator to convert H265Complexity to string - /// - public static implicit operator string(H265Complexity e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum H265Complexity - /// - public static bool operator == (H265Complexity e1, H265Complexity e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum H265Complexity - /// - public static bool operator != (H265Complexity e1, H265Complexity e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for H265Complexity - /// - public override bool Equals(object obj) - { - return obj is H265Complexity && Equals((H265Complexity)obj); - } - - /// - /// Returns for hashCode H265Complexity - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265ComplexityConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265ComplexityConverter.cs deleted file mode 100644 index ea8fef3685a66..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265ComplexityConverter.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 H265Complexity. - /// - public sealed class H265ComplexityConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to H265Complexity by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(H265Complexity).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to H265Complexity. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (H265Complexity)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for H265Complexity for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Layer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Layer.cs deleted file mode 100644 index 4e7d15544a603..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Layer.cs +++ /dev/null @@ -1,141 +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.Linq; - - /// - /// Describes the settings to be used when encoding the input video into a - /// desired output bitrate layer with the H.265 video codec. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.H265Layer")] - public partial class H265Layer : H265VideoLayer - { - /// - /// Initializes a new instance of the H265Layer class. - /// - public H265Layer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the H265Layer class. - /// - /// The average bitrate in bits per second at - /// which to encode the input video when generating this layer. For - /// example: a target bitrate of 3000Kbps or 3Mbps means this value - /// should be 3000000 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - /// 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. - /// The number of B-frames to be used when - /// encoding this layer. If not specified, the encoder chooses an - /// appropriate number based on the video profile and level. - /// The frame rate (in frames per second) at - /// which to encode this layer. The value can be in the form of M/N - /// where M and N are integers (For example, 30000/1001), or in the - /// form of a number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// The number of slices to be used when encoding - /// this layer. If not specified, default is zero, which means that - /// encoder will use a single slice for each frame. - /// Specifies 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. - /// We currently support Main. Default is Auto. - /// Possible values include: 'Auto', 'Main' - /// We currently support Level up to 6.2. The value - /// can be Auto, or a number that matches the H.265 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, - /// PT5S). - /// The number of reference frames to be - /// used when encoding this layer. If not specified, the encoder - /// determines an appropriate number based on the encoder complexity - /// setting. - public H265Layer(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?), H265VideoProfile? profile = default(H265VideoProfile?), string level = default(string), System.TimeSpan? bufferWindow = default(System.TimeSpan?), int? referenceFrames = default(int?)) - : base(bitrate, width, height, label, maxBitrate, bFrames, frameRate, slices, adaptiveBFrame) - { - Profile = profile; - Level = level; - BufferWindow = bufferWindow; - ReferenceFrames = referenceFrames; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets we currently support Main. Default is Auto. Possible - /// values include: 'Auto', 'Main' - /// - [JsonProperty(PropertyName = "profile")] - public H265VideoProfile? Profile { get; set; } - - /// - /// Gets or sets we currently support Level up to 6.2. The value can be - /// Auto, or a number that matches the H.265 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; } - - /// - /// Gets or sets 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, PT5S). - /// - [JsonProperty(PropertyName = "bufferWindow")] - public System.TimeSpan? BufferWindow { get; set; } - - /// - /// Gets or sets the number of reference frames to be used when - /// encoding this layer. If not specified, the encoder determines an - /// appropriate number based on the encoder complexity setting. - /// - [JsonProperty(PropertyName = "referenceFrames")] - public int? ReferenceFrames { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Video.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Video.cs deleted file mode 100644 index 9e4c1fa023b89..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265Video.cs +++ /dev/null @@ -1,103 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes all the properties for encoding a video with the H.265 codec. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.H265Video")] - public partial class H265Video : Video - { - /// - /// Initializes a new instance of the H265Video class. - /// - public H265Video() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the H265Video class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - /// Specifies whether or not the - /// encoder should insert key frames at scene changes. If not - /// specified, the default is false. This flag should be set to true - /// only when the encoder is being configured to produce a single - /// output video. - /// Tells the encoder how to choose its - /// encoding settings. Quality will provide for a higher compression - /// ratio but at a higher cost and longer compute time. Speed will - /// produce a relatively larger file but is faster and more economical. - /// The default value is Balanced. Possible values include: 'Speed', - /// 'Balanced', 'Quality' - /// The collection of output H.265 layers to be - /// produced by the encoder. - public H265Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), VideoSyncMode? syncMode = default(VideoSyncMode?), bool? sceneChangeDetection = default(bool?), H265Complexity? complexity = default(H265Complexity?), IList layers = default(IList)) - : base(label, keyFrameInterval, stretchMode, syncMode) - { - SceneChangeDetection = sceneChangeDetection; - Complexity = complexity; - Layers = layers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets specifies whether or not the encoder should insert key - /// frames at scene changes. If not specified, the default is false. - /// This flag should be set to true only when the encoder is being - /// configured to produce a single output video. - /// - [JsonProperty(PropertyName = "sceneChangeDetection")] - public bool? SceneChangeDetection { get; set; } - - /// - /// Gets or sets tells the encoder how to choose its encoding settings. - /// Quality will provide for a higher compression ratio but at a higher - /// cost and longer compute time. Speed will produce a relatively - /// larger file but is faster and more economical. The default value is - /// Balanced. Possible values include: 'Speed', 'Balanced', 'Quality' - /// - [JsonProperty(PropertyName = "complexity")] - public H265Complexity? Complexity { get; set; } - - /// - /// Gets or sets the collection of output H.265 layers to be produced - /// by the encoder. - /// - [JsonProperty(PropertyName = "layers")] - public IList Layers { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoLayer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoLayer.cs deleted file mode 100644 index 94c841abb0451..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoLayer.cs +++ /dev/null @@ -1,150 +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.Linq; - - /// - /// Describes the settings to be used when encoding the input video into a - /// desired output bitrate layer. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.H265VideoLayer")] - public partial class H265VideoLayer : Layer - { - /// - /// Initializes a new instance of the H265VideoLayer class. - /// - public H265VideoLayer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the H265VideoLayer class. - /// - /// The average bitrate in bits per second at - /// which to encode the input video when generating this layer. For - /// example: a target bitrate of 3000Kbps or 3Mbps means this value - /// should be 3000000 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - /// 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. - /// The number of B-frames to be used when - /// encoding this layer. If not specified, the encoder chooses an - /// appropriate number based on the video profile and level. - /// The frame rate (in frames per second) at - /// which to encode this layer. The value can be in the form of M/N - /// where M and N are integers (For example, 30000/1001), or in the - /// form of a number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// The number of slices to be used when encoding - /// this layer. If not specified, default is zero, which means that - /// encoder will use a single slice for each frame. - /// Specifies 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 H265VideoLayer(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; - MaxBitrate = maxBitrate; - BFrames = bFrames; - FrameRate = frameRate; - Slices = slices; - AdaptiveBFrame = adaptiveBFrame; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the average bitrate in bits per second at which to - /// encode the input video when generating this layer. For example: a - /// target bitrate of 3000Kbps or 3Mbps means this value should be - /// 3000000 This is a required field. - /// - [JsonProperty(PropertyName = "bitrate")] - public int Bitrate { get; set; } - - /// - /// Gets or sets 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. - /// - [JsonProperty(PropertyName = "maxBitrate")] - public int? MaxBitrate { get; set; } - - /// - /// Gets or sets the number of B-frames to be used when encoding this - /// layer. If not specified, the encoder chooses an appropriate number - /// based on the video profile and level. - /// - [JsonProperty(PropertyName = "bFrames")] - public int? BFrames { get; set; } - - /// - /// Gets or sets the frame rate (in frames per second) at which to - /// encode this layer. The value can be in the form of M/N where M and - /// N are integers (For example, 30000/1001), or in the form of a - /// number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// - [JsonProperty(PropertyName = "frameRate")] - public string FrameRate { get; set; } - - /// - /// Gets or sets the number of slices to be used when encoding this - /// layer. If not specified, default is zero, which means that encoder - /// will use a single slice for each frame. - /// - [JsonProperty(PropertyName = "slices")] - public int? Slices { get; set; } - - /// - /// Gets or sets specifies 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. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfile.cs deleted file mode 100644 index 92e7173f66aad..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfile.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - - /// - /// Defines values for H265VideoProfile. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(H265VideoProfileConverter))] - public struct H265VideoProfile : System.IEquatable - { - private H265VideoProfile(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Tells the encoder to automatically determine the appropriate H.265 - /// profile. - /// - public static readonly H265VideoProfile Auto = "Auto"; - - /// - /// Main profile - /// (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier) - /// - public static readonly H265VideoProfile Main = "Main"; - - - /// - /// Underlying value of enum H265VideoProfile - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for H265VideoProfile - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type H265VideoProfile - /// - public bool Equals(H265VideoProfile e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to H265VideoProfile - /// - public static implicit operator H265VideoProfile(string value) - { - return new H265VideoProfile(value); - } - - /// - /// Implicit operator to convert H265VideoProfile to string - /// - public static implicit operator string(H265VideoProfile e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum H265VideoProfile - /// - public static bool operator == (H265VideoProfile e1, H265VideoProfile e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum H265VideoProfile - /// - public static bool operator != (H265VideoProfile e1, H265VideoProfile e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for H265VideoProfile - /// - public override bool Equals(object obj) - { - return obj is H265VideoProfile && Equals((H265VideoProfile)obj); - } - - /// - /// Returns for hashCode H265VideoProfile - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfileConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfileConverter.cs deleted file mode 100644 index 510dd8095cece..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/H265VideoProfileConverter.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 H265VideoProfile. - /// - public sealed class H265VideoProfileConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to H265VideoProfile by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(H265VideoProfile).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to H265VideoProfile. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (H265VideoProfile)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for H265VideoProfile for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Image.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Image.cs deleted file mode 100644 index 46cdbdf300901..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Image.cs +++ /dev/null @@ -1,159 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the basic properties for generating thumbnails from the input - /// video - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.Image")] - public partial class Image : Video - { - /// - /// Initializes a new instance of the Image class. - /// - public Image() - { - CustomInit(); - } - - /// - /// 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 ISO 8601 format - /// (For example, PT05S to start at 5 seconds), or a frame count (For - /// example, 10 to start at the 10th frame), or a relative value to - /// stream duration (For example, 10% to start at 10% of stream - /// duration). Also supports a macro {Best}, which tells the encoder to - /// select the best thumbnail from the first few seconds of the video - /// and will only produce one thumbnail, no matter what other settings - /// are for Step and Range. The default value is macro {Best}. - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - /// The intervals at which thumbnails are generated. - /// The value can be in ISO 8601 format (For example, PT05S for one - /// image every 5 seconds), or a frame count (For example, 30 for one - /// image every 30 frames), or a relative value to stream duration (For - /// example, 10% for one image every 10% of stream duration). Note: - /// Step value will affect the first generated thumbnail, which may not - /// be exactly the one specified at transform preset start time. This - /// is due to the encoder, which tries to select the best thumbnail - /// between start time and Step position from start time as the first - /// output. As the default value is 10%, it means if stream has long - /// duration, the first generated thumbnail might be far away from the - /// one specified at start time. Try to select reasonable value for - /// Step if the first thumbnail is expected close to start time, or set - /// Range value at 1 if only one thumbnail is needed at start - /// time. - /// The position relative to transform preset start - /// time in the input video at which to stop generating thumbnails. The - /// value can be in ISO 8601 format (For example, PT5M30S to stop at 5 - /// minutes and 30 seconds from start time), or a frame count (For - /// example, 300 to stop at the 300th frame from the frame at start - /// time. If this value is 1, it means only producing one thumbnail at - /// start time), or a relative value to the stream duration (For - /// example, 50% to stop at half of stream duration from start time). - /// The default value is 100%, which means to stop at the end of the - /// stream. - public Image(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), VideoSyncMode? syncMode = default(VideoSyncMode?), string step = default(string), string range = default(string)) - : base(label, keyFrameInterval, stretchMode, syncMode) - { - Start = start; - Step = step; - Range = range; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the position in the input video from where to start - /// generating thumbnails. The value can be in ISO 8601 format (For - /// example, PT05S to start at 5 seconds), or a frame count (For - /// example, 10 to start at the 10th frame), or a relative value to - /// stream duration (For example, 10% to start at 10% of stream - /// duration). Also supports a macro {Best}, which tells the encoder to - /// select the best thumbnail from the first few seconds of the video - /// and will only produce one thumbnail, no matter what other settings - /// are for Step and Range. The default value is macro {Best}. - /// - [JsonProperty(PropertyName = "start")] - public string Start { get; set; } - - /// - /// Gets or sets the intervals at which thumbnails are generated. The - /// value can be in ISO 8601 format (For example, PT05S for one image - /// every 5 seconds), or a frame count (For example, 30 for one image - /// every 30 frames), or a relative value to stream duration (For - /// example, 10% for one image every 10% of stream duration). Note: - /// Step value will affect the first generated thumbnail, which may not - /// be exactly the one specified at transform preset start time. This - /// is due to the encoder, which tries to select the best thumbnail - /// between start time and Step position from start time as the first - /// output. As the default value is 10%, it means if stream has long - /// duration, the first generated thumbnail might be far away from the - /// one specified at start time. Try to select reasonable value for - /// Step if the first thumbnail is expected close to start time, or set - /// Range value at 1 if only one thumbnail is needed at start time. - /// - [JsonProperty(PropertyName = "step")] - public string Step { get; set; } - - /// - /// Gets or sets the position relative to transform preset start time - /// in the input video at which to stop generating thumbnails. The - /// value can be in ISO 8601 format (For example, PT5M30S to stop at 5 - /// minutes and 30 seconds from start time), or a frame count (For - /// example, 300 to stop at the 300th frame from the frame at start - /// time. If this value is 1, it means only producing one thumbnail at - /// start time), or a relative value to the stream duration (For - /// example, 50% to stop at half of stream duration from start time). - /// The default value is 100%, which means to stop at the end of the - /// stream. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ImageFormat.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ImageFormat.cs deleted file mode 100644 index e3a037b002ec6..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ImageFormat.cs +++ /dev/null @@ -1,70 +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.Linq; - - /// - /// Describes the properties for an output image file. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.ImageFormat")] - public partial class ImageFormat : Format - { - /// - /// Initializes a new instance of the ImageFormat class. - /// - public ImageFormat() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ImageFormat class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - public ImageFormat(string filenamePattern) - : base(filenamePattern) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputDefinition.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputDefinition.cs deleted file mode 100644 index 4946c61dc0566..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputDefinition.cs +++ /dev/null @@ -1,56 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Base class for defining an input. Use sub classes of this class to - /// specify tracks selections and related metadata. - /// - public partial class InputDefinition - { - /// - /// Initializes a new instance of the InputDefinition class. - /// - public InputDefinition() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InputDefinition class. - /// - /// The list of TrackDescriptors which - /// define the metadata and selection of tracks in the input. - public InputDefinition(IList includedTracks = default(IList)) - { - IncludedTracks = includedTracks; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of TrackDescriptors which define the metadata - /// and selection of tracks in the input. - /// - [JsonProperty(PropertyName = "includedTracks")] - public IList IncludedTracks { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputFile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputFile.cs deleted file mode 100644 index 190edb869d6aa..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InputFile.cs +++ /dev/null @@ -1,60 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An InputDefinition for a single file. TrackSelections are scoped to - /// the file specified. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.InputFile")] - public partial class InputFile : InputDefinition - { - /// - /// Initializes a new instance of the InputFile class. - /// - public InputFile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InputFile class. - /// - /// The list of TrackDescriptors which - /// define the metadata and selection of tracks in the input. - /// Name of the file that this input definition - /// applies to. - public InputFile(IList includedTracks = default(IList), string filename = default(string)) - : base(includedTracks) - { - Filename = filename; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the file that this input definition applies - /// to. - /// - [JsonProperty(PropertyName = "filename")] - public string Filename { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InsightsType.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InsightsType.cs deleted file mode 100644 index d012f7b77d3ea..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InsightsType.cs +++ /dev/null @@ -1,119 +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; - - /// - /// 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 - { - 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"; - - /// - /// Generate video only insights. Ignore audio if present. Fails if no - /// video is present. - /// - public static readonly InsightsType 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InsightsTypeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/InsightsTypeConverter.cs deleted file mode 100644 index 6a75806e8d0a7..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Job.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Job.cs deleted file mode 100644 index fdf50e587a492..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Job.cs +++ /dev/null @@ -1,181 +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 Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A Job resource type. The progress and state can be obtained by polling - /// a Job or subscribing to events using EventGrid. - /// - [Rest.Serialization.JsonTransformation] - public partial class Job : ProxyResource - { - /// - /// Initializes a new instance of the Job class. - /// - public Job() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Job class. - /// - /// The inputs for the Job. - /// The outputs for the Job. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// The UTC date and time when the customer has - /// created the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. - /// The current state of the job. Possible values - /// include: 'Canceled', 'Canceling', 'Error', 'Finished', - /// 'Processing', 'Queued', 'Scheduled' - /// Optional customer supplied description of - /// the Job. - /// The UTC date and time when the customer - /// has last updated the Job, in 'YYYY-MM-DDThh:mm:ssZ' format. - /// Priority with which the job should be - /// 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 key, value pairs - /// that will be returned in Job and JobOutput state events. - /// The UTC date and time at which this Job - /// began processing. - /// The UTC date and time at which this Job - /// finished processing. - /// The system metadata relating to this - /// resource. - 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), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), SystemData systemData = default(SystemData)) - : base(id, name, type) - { - Created = created; - State = state; - Description = description; - Input = input; - LastModified = lastModified; - Outputs = outputs; - Priority = priority; - CorrelationData = correlationData; - StartTime = startTime; - EndTime = endTime; - SystemData = systemData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the UTC date and time when the customer has created the Job, - /// in 'YYYY-MM-DDThh:mm:ssZ' format. - /// - [JsonProperty(PropertyName = "properties.created")] - public System.DateTime Created { get; private set; } - - /// - /// Gets the current state of the job. Possible values include: - /// 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - /// 'Queued', 'Scheduled' - /// - [JsonProperty(PropertyName = "properties.state")] - public JobState State { get; private set; } - - /// - /// Gets or sets optional customer supplied description of the Job. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets the inputs for the Job. - /// - [JsonProperty(PropertyName = "properties.input")] - public JobInput Input { get; set; } - - /// - /// Gets the UTC date and time when the customer has last updated the - /// Job, in 'YYYY-MM-DDThh:mm:ssZ' format. - /// - [JsonProperty(PropertyName = "properties.lastModified")] - public System.DateTime LastModified { get; private set; } - - /// - /// Gets or sets the outputs for the Job. - /// - [JsonProperty(PropertyName = "properties.outputs")] - public IList Outputs { get; set; } - - /// - /// Gets or sets priority with which the job should be processed. - /// Higher priority jobs are processed before lower priority jobs. If - /// not set, the default is normal. Possible values include: 'Low', - /// 'Normal', 'High' - /// - [JsonProperty(PropertyName = "properties.priority")] - public Priority? Priority { get; set; } - - /// - /// Gets or sets customer provided key, value pairs that will be - /// returned in Job and JobOutput state events. - /// - [JsonProperty(PropertyName = "properties.correlationData")] - public IDictionary CorrelationData { get; set; } - - /// - /// Gets the UTC date and time at which this Job began processing. - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; private set; } - - /// - /// Gets the UTC date and time at which this Job finished processing. - /// - [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; private set; } - - /// - /// Gets the system metadata relating to this resource. - /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Input == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Input"); - } - if (Outputs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Outputs"); - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobError.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobError.cs deleted file mode 100644 index d1b23a32bf660..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobError.cs +++ /dev/null @@ -1,106 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Details of JobOutput errors. - /// - public partial class JobError - { - /// - /// Initializes a new instance of the JobError class. - /// - public JobError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobError class. - /// - /// Error code describing the error. Possible values - /// include: 'ServiceError', 'ServiceTransientError', - /// 'DownloadNotAccessible', 'DownloadTransientError', - /// 'UploadNotAccessible', 'UploadTransientError', - /// 'ConfigurationUnsupported', 'ContentMalformed', - /// 'ContentUnsupported' - /// A human-readable language-dependent - /// representation of the error. - /// Helps with categorization of errors. - /// Possible values include: 'Service', 'Download', 'Upload', - /// 'Configuration', 'Content' - /// Indicates that it may be possible to retry the - /// Job. If retry is unsuccessful, please contact Azure support via - /// Azure Portal. Possible values include: 'DoNotRetry', - /// '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)) - { - Code = code; - Message = message; - Category = category; - Retry = retry; - Details = details; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets error code describing the error. Possible values include: - /// 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', - /// 'DownloadTransientError', 'UploadNotAccessible', - /// 'UploadTransientError', 'ConfigurationUnsupported', - /// 'ContentMalformed', 'ContentUnsupported' - /// - [JsonProperty(PropertyName = "code")] - public JobErrorCode Code { get; private set; } - - /// - /// Gets a human-readable language-dependent representation of the - /// error. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets helps with categorization of errors. Possible values include: - /// 'Service', 'Download', 'Upload', 'Configuration', 'Content' - /// - [JsonProperty(PropertyName = "category")] - public JobErrorCategory Category { get; private set; } - - /// - /// Gets indicates that it may be possible to retry the Job. If retry - /// is unsuccessful, please contact Azure support via Azure Portal. - /// Possible values include: 'DoNotRetry', 'MayRetry' - /// - [JsonProperty(PropertyName = "retry")] - public JobRetry Retry { get; private set; } - - /// - /// Gets an array of details about specific errors that led to this - /// reported error. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCategory.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCategory.cs deleted file mode 100644 index 0461ab6be82a1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCategory.cs +++ /dev/null @@ -1,126 +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; - - /// - /// 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 - { - private JobErrorCategory(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// The error is service related. - /// - public static readonly JobErrorCategory Service = "Service"; - - /// - /// The error is download related. - /// - public static readonly JobErrorCategory Download = "Download"; - - /// - /// The error is upload related. - /// - public static readonly JobErrorCategory Upload = "Upload"; - - /// - /// The error is configuration related. - /// - public static readonly JobErrorCategory 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCategoryConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCategoryConverter.cs deleted file mode 100644 index 3a3341289cea9..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCode.cs deleted file mode 100644 index 74529800c519f..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCode.cs +++ /dev/null @@ -1,159 +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; - - /// - /// 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 - { - private JobErrorCode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Fatal service error, please contact support. - /// - public static readonly JobErrorCode ServiceError = "ServiceError"; - - /// - /// Transient error, please retry, if retry is unsuccessful, please - /// contact support. - /// - public static readonly JobErrorCode 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"; - - /// - /// 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"; - - /// - /// 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"; - - /// - /// 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"; - - /// - /// 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"; - - /// - /// 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"; - - /// - /// 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCodeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobErrorCodeConverter.cs deleted file mode 100644 index b0fe998dcabe6..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs deleted file mode 100644 index ffdf3dc4b89b2..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInput.cs +++ /dev/null @@ -1,35 +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 System.Linq; - - /// - /// Base class for inputs to a Job. - /// - public partial class JobInput - { - /// - /// Initializes a new instance of the JobInput class. - /// - public JobInput() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputAsset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputAsset.cs deleted file mode 100644 index a3bb4b2553f64..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputAsset.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents an Asset for input into a Job. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobInputAsset")] - public partial class JobInputAsset : JobInputClip - { - /// - /// Initializes a new instance of the JobInputAsset class. - /// - public JobInputAsset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobInputAsset class. - /// - /// The name of the input Asset. - /// List of files. Required for JobInputHttp. - /// Maximum of 4000 characters each. - /// Defines a point on the timeline of the input - /// media at which processing will start. Defaults to the beginning of - /// the input media. - /// Defines a point on the timeline of the input - /// media at which processing will end. Defaults to the end of the - /// input media. - /// 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 - /// with the label 'xyz' and apply it as an overlay onto the input - /// video before it is encoded. When submitting a Job, exactly one of - /// the JobInputs should be the image file, and it should have the - /// label 'xyz'. - /// Defines a list of InputDefinitions. - /// For each InputDefinition, it defines a list of track selections and - /// related metadata. - public JobInputAsset(string assetName, IList files = default(IList), ClipTime start = default(ClipTime), ClipTime end = default(ClipTime), string label = default(string), IList inputDefinitions = default(IList)) - : base(files, start, end, label, inputDefinitions) - { - AssetName = assetName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the input Asset. - /// - [JsonProperty(PropertyName = "assetName")] - public string AssetName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AssetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AssetName"); - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputClip.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputClip.cs deleted file mode 100644 index ac64b6aaeeb66..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputClip.cs +++ /dev/null @@ -1,110 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents input files for a Job. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobInputClip")] - public partial class JobInputClip : JobInput - { - /// - /// Initializes a new instance of the JobInputClip class. - /// - public JobInputClip() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobInputClip class. - /// - /// List of files. Required for JobInputHttp. - /// Maximum of 4000 characters each. - /// Defines a point on the timeline of the input - /// media at which processing will start. Defaults to the beginning of - /// the input media. - /// Defines a point on the timeline of the input - /// media at which processing will end. Defaults to the end of the - /// input media. - /// 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 - /// with the label 'xyz' and apply it as an overlay onto the input - /// video before it is encoded. When submitting a Job, exactly one of - /// the JobInputs should be the image file, and it should have the - /// label 'xyz'. - /// Defines a list of InputDefinitions. - /// For each InputDefinition, it defines a list of track selections and - /// related metadata. - public JobInputClip(IList files = default(IList), ClipTime start = default(ClipTime), ClipTime end = default(ClipTime), string label = default(string), IList inputDefinitions = default(IList)) - { - Files = files; - Start = start; - End = end; - Label = label; - InputDefinitions = inputDefinitions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of files. Required for JobInputHttp. Maximum of - /// 4000 characters each. - /// - [JsonProperty(PropertyName = "files")] - public IList Files { get; set; } - - /// - /// Gets or sets defines a point on the timeline of the input media at - /// which processing will start. Defaults to the beginning of the input - /// media. - /// - [JsonProperty(PropertyName = "start")] - public ClipTime Start { get; set; } - - /// - /// Gets or sets defines a point on the timeline of the input media at - /// which processing will end. Defaults to the end of the input media. - /// - [JsonProperty(PropertyName = "end")] - public ClipTime End { get; set; } - - /// - /// Gets or sets 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 with the - /// label 'xyz' and apply it as an overlay onto the input video before - /// it is encoded. When submitting a Job, exactly one of the JobInputs - /// should be the image file, and it should have the label 'xyz'. - /// - [JsonProperty(PropertyName = "label")] - public string Label { get; set; } - - /// - /// Gets or sets defines a list of InputDefinitions. For each - /// InputDefinition, it defines a list of track selections and related - /// metadata. - /// - [JsonProperty(PropertyName = "inputDefinitions")] - public IList InputDefinitions { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputHttp.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputHttp.cs deleted file mode 100644 index 913584a8a207d..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputHttp.cs +++ /dev/null @@ -1,79 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents HTTPS job input. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobInputHttp")] - public partial class JobInputHttp : JobInputClip - { - /// - /// Initializes a new instance of the JobInputHttp class. - /// - public JobInputHttp() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobInputHttp class. - /// - /// List of files. Required for JobInputHttp. - /// Maximum of 4000 characters each. - /// Defines a point on the timeline of the input - /// media at which processing will start. Defaults to the beginning of - /// the input media. - /// Defines a point on the timeline of the input - /// media at which processing will end. Defaults to the end of the - /// input media. - /// 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 - /// with the label 'xyz' and apply it as an overlay onto the input - /// video before it is encoded. When submitting a Job, exactly one of - /// the JobInputs should be the image file, and it should have the - /// label 'xyz'. - /// Defines a list of InputDefinitions. - /// For each InputDefinition, it defines a list of track selections and - /// related metadata. - /// 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. - /// Maximum length of 4000 characters. - public JobInputHttp(IList files = default(IList), ClipTime start = default(ClipTime), ClipTime end = default(ClipTime), string label = default(string), IList inputDefinitions = default(IList), string baseUri = default(string)) - : base(files, start, end, label, inputDefinitions) - { - BaseUri = baseUri; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// 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. Maximum - /// length of 4000 characters. - /// - [JsonProperty(PropertyName = "baseUri")] - public string BaseUri { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputSequence.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputSequence.cs deleted file mode 100644 index 5a5f11df32005..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputSequence.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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A Sequence contains an ordered list of Clips where each clip is a - /// JobInput. The Sequence will be treated as a single input. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobInputSequence")] - public partial class JobInputSequence : JobInput - { - /// - /// Initializes a new instance of the JobInputSequence class. - /// - public JobInputSequence() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobInputSequence class. - /// - /// JobInputs that make up the timeline. - public JobInputSequence(IList inputs = default(IList)) - { - Inputs = inputs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets jobInputs that make up the timeline. - /// - [JsonProperty(PropertyName = "inputs")] - public IList Inputs { get; set; } - - } -} 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 deleted file mode 100644 index 2fa12234cd7cc..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutput.cs +++ /dev/null @@ -1,133 +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.Linq; - - /// - /// Describes all the properties of a JobOutput. - /// - public partial class JobOutput - { - /// - /// Initializes a new instance of the JobOutput class. - /// - public JobOutput() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobOutput class. - /// - /// If the JobOutput is in the Error state, it - /// contains the details of the error. - /// Describes the state of the JobOutput. Possible - /// values include: 'Canceled', 'Canceling', 'Error', 'Finished', - /// 'Processing', 'Queued', 'Scheduled' - /// If the JobOutput is in a Processing state, - /// this contains the Job completion percentage. The value is an - /// estimate and not intended to be used to predict Job completion - /// times. To determine if the JobOutput is complete, use the State - /// property. - /// A label that is assigned to a JobOutput in - /// order to help uniquely identify it. This is useful when your - /// Transform has more than one TransformOutput, whereby your Job has - /// more than one JobOutput. In such cases, when you submit the Job, - /// you will add two or more JobOutputs, in the same order as - /// TransformOutputs in the Transform. Subsequently, when you retrieve - /// the Job, either through events or on a GET request, you can use the - /// label to easily identify the JobOutput. If a label is not provided, - /// a default value of '{presetName}_{outputIndex}' will be used, where - /// the preset name is the name of the preset in the corresponding - /// TransformOutput and the output index is the relative index of the - /// this JobOutput within the Job. Note that this index is the same as - /// the relative index of the corresponding TransformOutput within its - /// Transform. - /// The UTC date and time at which this Job - /// Output began processing. - /// The UTC date and time at which this Job - /// Output finished processing. - public JobOutput(JobError error = default(JobError), JobState state = default(JobState), int progress = default(int), string label = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) - { - Error = error; - State = state; - Progress = progress; - Label = label; - StartTime = startTime; - EndTime = endTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets if the JobOutput is in the Error state, it contains the - /// details of the error. - /// - [JsonProperty(PropertyName = "error")] - public JobError Error { get; private set; } - - /// - /// Gets describes the state of the JobOutput. Possible values include: - /// 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', - /// 'Queued', 'Scheduled' - /// - [JsonProperty(PropertyName = "state")] - public JobState State { get; private set; } - - /// - /// Gets if the JobOutput is in a Processing state, this contains the - /// Job completion percentage. The value is an estimate and not - /// intended to be used to predict Job completion times. To determine - /// if the JobOutput is complete, use the State property. - /// - [JsonProperty(PropertyName = "progress")] - public int Progress { get; private set; } - - /// - /// Gets or sets a label that is assigned to a JobOutput in order to - /// help uniquely identify it. This is useful when your Transform has - /// more than one TransformOutput, whereby your Job has more than one - /// JobOutput. In such cases, when you submit the Job, you will add two - /// or more JobOutputs, in the same order as TransformOutputs in the - /// Transform. Subsequently, when you retrieve the Job, either through - /// events or on a GET request, you can use the label to easily - /// identify the JobOutput. If a label is not provided, a default value - /// of '{presetName}_{outputIndex}' will be used, where the preset name - /// is the name of the preset in the corresponding TransformOutput and - /// the output index is the relative index of the this JobOutput within - /// the Job. Note that this index is the same as the relative index of - /// the corresponding TransformOutput within its Transform. - /// - [JsonProperty(PropertyName = "label")] - public string Label { get; set; } - - /// - /// Gets the UTC date and time at which this Job Output began - /// processing. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; private set; } - - /// - /// Gets the UTC date and time at which this Job Output finished - /// processing. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; private set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutputAsset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutputAsset.cs deleted file mode 100644 index 3afc45d40020b..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobOutputAsset.cs +++ /dev/null @@ -1,95 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Represents an Asset used as a JobOutput. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobOutputAsset")] - public partial class JobOutputAsset : JobOutput - { - /// - /// Initializes a new instance of the JobOutputAsset class. - /// - public JobOutputAsset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JobOutputAsset class. - /// - /// The name of the output Asset. - /// If the JobOutput is in the Error state, it - /// contains the details of the error. - /// Describes the state of the JobOutput. Possible - /// values include: 'Canceled', 'Canceling', 'Error', 'Finished', - /// 'Processing', 'Queued', 'Scheduled' - /// If the JobOutput is in a Processing state, - /// this contains the Job completion percentage. The value is an - /// estimate and not intended to be used to predict Job completion - /// times. To determine if the JobOutput is complete, use the State - /// property. - /// A label that is assigned to a JobOutput in - /// order to help uniquely identify it. This is useful when your - /// Transform has more than one TransformOutput, whereby your Job has - /// more than one JobOutput. In such cases, when you submit the Job, - /// you will add two or more JobOutputs, in the same order as - /// TransformOutputs in the Transform. Subsequently, when you retrieve - /// the Job, either through events or on a GET request, you can use the - /// label to easily identify the JobOutput. If a label is not provided, - /// a default value of '{presetName}_{outputIndex}' will be used, where - /// the preset name is the name of the preset in the corresponding - /// TransformOutput and the output index is the relative index of the - /// this JobOutput within the Job. Note that this index is the same as - /// the relative index of the corresponding TransformOutput within its - /// Transform. - /// The UTC date and time at which this Job - /// Output began processing. - /// The UTC date and time at which this Job - /// Output finished processing. - public JobOutputAsset(string assetName, JobError error = default(JobError), JobState state = default(JobState), int progress = default(int), string label = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) - : base(error, state, progress, label, startTime, endTime) - { - AssetName = assetName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the output Asset. - /// - [JsonProperty(PropertyName = "assetName")] - public string AssetName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AssetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AssetName"); - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobRetryConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobRetryConverter.cs deleted file mode 100644 index c89965bdb3edf..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobState.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobState.cs deleted file mode 100644 index 8ea03d761df58..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobState.cs +++ /dev/null @@ -1,140 +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; - - /// - /// 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 - { - private JobState(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// The job was canceled. This is a final state for the job. - /// - public static readonly JobState 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"; - - /// - /// The job has encountered an error. This is a final state for the - /// job. - /// - public static readonly JobState Error = "Error"; - - /// - /// The job is finished. This is a final state for the job. - /// - public static readonly JobState Finished = "Finished"; - - /// - /// The job is processing. This is a transient state for the job. - /// - public static readonly JobState 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"; - - /// - /// 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobStateConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobStateConverter.cs deleted file mode 100644 index fd6eea8c58807..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgFormat.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgFormat.cs deleted file mode 100644 index 467b911d8efb2..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgFormat.cs +++ /dev/null @@ -1,70 +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.Linq; - - /// - /// Describes the settings for producing JPEG thumbnails. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JpgFormat")] - public partial class JpgFormat : ImageFormat - { - /// - /// Initializes a new instance of the JpgFormat class. - /// - public JpgFormat() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JpgFormat class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - public JpgFormat(string filenamePattern) - : base(filenamePattern) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgImage.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgImage.cs deleted file mode 100644 index 17554a0b3d585..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgImage.cs +++ /dev/null @@ -1,135 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the properties for producing a series of JPEG images from the - /// input video. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JpgImage")] - public partial class JpgImage : Image - { - /// - /// Initializes a new instance of the JpgImage class. - /// - public JpgImage() - { - CustomInit(); - } - - /// - /// 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 ISO 8601 format - /// (For example, PT05S to start at 5 seconds), or a frame count (For - /// example, 10 to start at the 10th frame), or a relative value to - /// stream duration (For example, 10% to start at 10% of stream - /// duration). Also supports a macro {Best}, which tells the encoder to - /// select the best thumbnail from the first few seconds of the video - /// and will only produce one thumbnail, no matter what other settings - /// are for Step and Range. The default value is macro {Best}. - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - /// The intervals at which thumbnails are generated. - /// The value can be in ISO 8601 format (For example, PT05S for one - /// image every 5 seconds), or a frame count (For example, 30 for one - /// image every 30 frames), or a relative value to stream duration (For - /// example, 10% for one image every 10% of stream duration). Note: - /// Step value will affect the first generated thumbnail, which may not - /// be exactly the one specified at transform preset start time. This - /// is due to the encoder, which tries to select the best thumbnail - /// between start time and Step position from start time as the first - /// output. As the default value is 10%, it means if stream has long - /// duration, the first generated thumbnail might be far away from the - /// one specified at start time. Try to select reasonable value for - /// Step if the first thumbnail is expected close to start time, or set - /// Range value at 1 if only one thumbnail is needed at start - /// time. - /// The position relative to transform preset start - /// time in the input video at which to stop generating thumbnails. The - /// value can be in ISO 8601 format (For example, PT5M30S to stop at 5 - /// minutes and 30 seconds from start time), or a frame count (For - /// example, 300 to stop at the 300th frame from the frame at start - /// time. If this value is 1, it means only producing one thumbnail at - /// start time), or a relative value to the stream duration (For - /// example, 50% to stop at half of stream duration from start time). - /// The default value is 100%, which means to stop at the end of the - /// stream. - /// A collection of output JPEG image layers to be - /// produced by the encoder. - /// Sets the number of columns used in - /// thumbnail sprite image. The number of rows are automatically - /// calculated and a VTT file is generated with the coordinate mappings - /// for each thumbnail in the sprite. Note: this value should be a - /// positive integer and a proper value is recommended so that the - /// output image resolution will not go beyond JPEG maximum pixel - /// resolution limit 65535x65535. - public JpgImage(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), VideoSyncMode? syncMode = default(VideoSyncMode?), string step = default(string), string range = default(string), IList layers = default(IList), int? spriteColumn = default(int?)) - : base(start, label, keyFrameInterval, stretchMode, syncMode, step, range) - { - Layers = layers; - SpriteColumn = spriteColumn; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a collection of output JPEG image layers to be - /// produced by the encoder. - /// - [JsonProperty(PropertyName = "layers")] - public IList Layers { get; set; } - - /// - /// Gets or sets sets the number of columns used in thumbnail sprite - /// image. The number of rows are automatically calculated and a VTT - /// file is generated with the coordinate mappings for each thumbnail - /// in the sprite. Note: this value should be a positive integer and a - /// proper value is recommended so that the output image resolution - /// will not go beyond JPEG maximum pixel resolution limit 65535x65535. - /// - [JsonProperty(PropertyName = "spriteColumn")] - public int? SpriteColumn { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgLayer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgLayer.cs deleted file mode 100644 index 9991a1c4abbaa..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JpgLayer.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the settings to produce a JPEG image from the input video. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JpgLayer")] - public partial class JpgLayer : Layer - { - /// - /// Initializes a new instance of the JpgLayer class. - /// - public JpgLayer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JpgLayer class. - /// - /// 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - /// The compression quality of the JPEG output. - /// Range is from 0-100 and the default is 70. - public JpgLayer(string width = default(string), string height = default(string), string label = default(string), int? quality = default(int?)) - : base(width, height, label) - { - Quality = quality; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the compression quality of the JPEG output. Range is - /// from 0-100 and the default is 70. - /// - [JsonProperty(PropertyName = "quality")] - public int? Quality { get; set; } - - } -} 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 deleted file mode 100644 index b1a9abb721e3f..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Layer.cs +++ /dev/null @@ -1,86 +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.Linq; - - /// - /// The encoder can be configured to produce video and/or images - /// (thumbnails) at different resolutions, by specifying a layer for each - /// desired resolution. A layer represents the properties for the video or - /// image at a resolution. - /// - public partial class Layer - { - /// - /// Initializes a new instance of the Layer class. - /// - public Layer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Layer class. - /// - /// 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - public Layer(string width = default(string), string height = default(string), string label = default(string)) - { - Width = width; - Height = height; - Label = label; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets 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 width - /// as the input. - /// - [JsonProperty(PropertyName = "width")] - public string Width { get; set; } - - /// - /// Gets or sets the height 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 - /// height as the input. - /// - [JsonProperty(PropertyName = "height")] - public string Height { get; set; } - - /// - /// Gets or sets the alphanumeric label for this layer, which can be - /// used in multiplexing different video and audio layers, or in naming - /// the output file. - /// - [JsonProperty(PropertyName = "label")] - public string Label { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncoding.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncoding.cs index 7b5a5495f775b..635fd6ae1a6a4 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncoding.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncoding.cs @@ -38,7 +38,7 @@ public LiveEventEncoding() /// https://go.microsoft.com/fwlink/?linkid=2095101 for more /// information. This property cannot be modified after the live event /// is created. Possible values include: 'None', 'Standard', - /// 'Premium1080p' + /// 'Premium1080p', 'PassthroughBasic', 'PassthroughStandard' /// The optional encoding preset name, used /// when encodingType is not None. This value is specified at creation /// time and cannot be updated. If the encodingType is set to Standard, @@ -79,7 +79,7 @@ public LiveEventEncoding() /// https://go.microsoft.com/fwlink/?linkid=2095101 for more /// information. This property cannot be modified after the live event /// is created. Possible values include: 'None', 'Standard', - /// 'Premium1080p' + /// 'Premium1080p', 'PassthroughBasic', 'PassthroughStandard' /// [JsonProperty(PropertyName = "encodingType")] public LiveEventEncodingType? EncodingType { get; set; } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncodingType.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncodingType.cs index e20e6dd5c42c0..7f0fed3e9d048 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncodingType.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveEventEncodingType.cs @@ -48,6 +48,16 @@ private LiveEventEncodingType(string underlyingValue) /// public static readonly LiveEventEncodingType Premium1080p = "Premium1080p"; + /// + /// Pending update... + /// + public static readonly LiveEventEncodingType PassthroughBasic = "PassthroughBasic"; + + /// + /// Pending update... + /// + public static readonly LiveEventEncodingType PassthroughStandard = "PassthroughStandard"; + /// /// Underlying value of enum LiveEventEncodingType diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveOutput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveOutput.cs index aaf5ac125263d..92551844cb28e 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveOutput.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/LiveOutput.cs @@ -62,7 +62,9 @@ public LiveOutput() /// output. /// The resource state of the live output. /// Possible values include: 'Creating', 'Running', 'Deleting' - public LiveOutput(string assetName, System.TimeSpan archiveWindowLength, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string manifestName = default(string), Hls hls = default(Hls), long? outputSnapTime = default(long?), System.DateTime? created = default(System.DateTime?), System.DateTime? lastModified = default(System.DateTime?), string provisioningState = default(string), LiveOutputResourceState? resourceState = default(LiveOutputResourceState?)) + /// The system metadata relating to this + /// resource. + public LiveOutput(string assetName, System.TimeSpan archiveWindowLength, string id = default(string), string name = default(string), string type = default(string), string description = default(string), string manifestName = default(string), Hls hls = default(Hls), long? outputSnapTime = default(long?), System.DateTime? created = default(System.DateTime?), System.DateTime? lastModified = default(System.DateTime?), string provisioningState = default(string), LiveOutputResourceState? resourceState = default(LiveOutputResourceState?), SystemData systemData = default(SystemData)) : base(id, name, type) { Description = description; @@ -75,6 +77,7 @@ public LiveOutput() LastModified = lastModified; ProvisioningState = provisioningState; ResourceState = resourceState; + SystemData = systemData; CustomInit(); } @@ -151,6 +154,12 @@ public LiveOutput() [JsonProperty(PropertyName = "properties.resourceState")] public LiveOutputResourceState? ResourceState { get; private set; } + /// + /// Gets the system metadata relating to this resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityType.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityType.cs deleted file mode 100644 index 8bf17a4020486..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityType.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - - /// - /// Defines values for ManagedIdentityType. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(ManagedIdentityTypeConverter))] - public struct ManagedIdentityType : System.IEquatable - { - private ManagedIdentityType(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// A system-assigned managed identity. - /// - public static readonly ManagedIdentityType SystemAssigned = "SystemAssigned"; - - /// - /// No managed identity. - /// - public static readonly ManagedIdentityType None = "None"; - - - /// - /// Underlying value of enum ManagedIdentityType - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for ManagedIdentityType - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type ManagedIdentityType - /// - public bool Equals(ManagedIdentityType e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to ManagedIdentityType - /// - public static implicit operator ManagedIdentityType(string value) - { - return new ManagedIdentityType(value); - } - - /// - /// Implicit operator to convert ManagedIdentityType to string - /// - public static implicit operator string(ManagedIdentityType e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum ManagedIdentityType - /// - public static bool operator == (ManagedIdentityType e1, ManagedIdentityType e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum ManagedIdentityType - /// - public static bool operator != (ManagedIdentityType e1, ManagedIdentityType e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for ManagedIdentityType - /// - public override bool Equals(object obj) - { - return obj is ManagedIdentityType && Equals((ManagedIdentityType)obj); - } - - /// - /// Returns for hashCode ManagedIdentityType - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaService.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaService.cs index 3a2594f8a389d..672ae61e62cd9 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaService.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaService.cs @@ -51,11 +51,14 @@ public MediaService() /// The account encryption properties. /// The Key Delivery properties for Media /// Services account. + /// Whether or not public network + /// access is allowed for resources under the Media Services account. + /// Possible values include: 'Enabled', 'Disabled' /// The Managed Identity for the Media Services /// account. /// The system metadata relating to this /// resource. - public MediaService(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.Guid mediaServiceId = default(System.Guid), IList storageAccounts = default(IList), StorageAuthentication? storageAuthentication = default(StorageAuthentication?), AccountEncryption encryption = default(AccountEncryption), KeyDelivery keyDelivery = default(KeyDelivery), MediaServiceIdentity identity = default(MediaServiceIdentity), SystemData systemData = default(SystemData)) + public MediaService(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.Guid mediaServiceId = default(System.Guid), IList storageAccounts = default(IList), StorageAuthentication? storageAuthentication = default(StorageAuthentication?), AccountEncryption encryption = default(AccountEncryption), KeyDelivery keyDelivery = default(KeyDelivery), PublicNetworkAccess? publicNetworkAccess = default(PublicNetworkAccess?), MediaServiceIdentity identity = default(MediaServiceIdentity), SystemData systemData = default(SystemData)) : base(location, id, name, type, tags) { MediaServiceId = mediaServiceId; @@ -63,6 +66,7 @@ public MediaService() StorageAuthentication = storageAuthentication; Encryption = encryption; KeyDelivery = keyDelivery; + PublicNetworkAccess = publicNetworkAccess; Identity = identity; SystemData = systemData; CustomInit(); @@ -104,6 +108,14 @@ public MediaService() [JsonProperty(PropertyName = "properties.keyDelivery")] public KeyDelivery KeyDelivery { get; set; } + /// + /// Gets or sets whether or not public network access is allowed for + /// resources under the Media Services account. Possible values + /// include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// /// Gets or sets the Managed Identity for the Media Services account. /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceIdentity.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceIdentity.cs index c193c28b768e5..616cc4cf7ce46 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceIdentity.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceIdentity.cs @@ -10,7 +10,10 @@ namespace Microsoft.Azure.Management.Media.Models { + using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; public partial class MediaServiceIdentity @@ -26,15 +29,17 @@ public MediaServiceIdentity() /// /// Initializes a new instance of the MediaServiceIdentity class. /// - /// The identity type. Possible values include: - /// 'SystemAssigned', 'None' + /// The identity type. /// The Principal ID of the identity. /// The Tenant ID of the identity. - public MediaServiceIdentity(ManagedIdentityType type, string principalId = default(string), string tenantId = default(string)) + /// The user assigned managed + /// identities. + public MediaServiceIdentity(string type, System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), IDictionary userAssignedIdentities = default(IDictionary)) { Type = type; PrincipalId = principalId; TenantId = tenantId; + UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -44,32 +49,41 @@ public MediaServiceIdentity() partial void CustomInit(); /// - /// Gets or sets the identity type. Possible values include: - /// 'SystemAssigned', 'None' + /// Gets or sets the identity type. /// [JsonProperty(PropertyName = "type")] - public ManagedIdentityType Type { get; set; } + public string Type { get; set; } /// /// Gets the Principal ID of the identity. /// [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + public System.Guid? PrincipalId { get; private set; } /// /// Gets the Tenant ID of the identity. /// [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } + public System.Guid? TenantId { get; private set; } + + /// + /// Gets or sets the user assigned managed identities. + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IDictionary UserAssignedIdentities { 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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceUpdate.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceUpdate.cs index 57ed5df3feddc..0b065c3b3213b 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceUpdate.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MediaServiceUpdate.cs @@ -43,9 +43,12 @@ public MediaServiceUpdate() /// The account encryption properties. /// The Key Delivery properties for Media /// Services account. + /// Whether or not public network + /// access is allowed for resources under the Media Services account. + /// Possible values include: 'Enabled', 'Disabled' /// The Managed Identity for the Media Services /// account. - public MediaServiceUpdate(IDictionary tags = default(IDictionary), System.Guid mediaServiceId = default(System.Guid), IList storageAccounts = default(IList), StorageAuthentication? storageAuthentication = default(StorageAuthentication?), AccountEncryption encryption = default(AccountEncryption), KeyDelivery keyDelivery = default(KeyDelivery), MediaServiceIdentity identity = default(MediaServiceIdentity)) + public MediaServiceUpdate(IDictionary tags = default(IDictionary), System.Guid mediaServiceId = default(System.Guid), IList storageAccounts = default(IList), StorageAuthentication? storageAuthentication = default(StorageAuthentication?), AccountEncryption encryption = default(AccountEncryption), KeyDelivery keyDelivery = default(KeyDelivery), PublicNetworkAccess? publicNetworkAccess = default(PublicNetworkAccess?), MediaServiceIdentity identity = default(MediaServiceIdentity)) { Tags = tags; MediaServiceId = mediaServiceId; @@ -53,6 +56,7 @@ public MediaServiceUpdate() StorageAuthentication = storageAuthentication; Encryption = encryption; KeyDelivery = keyDelivery; + PublicNetworkAccess = publicNetworkAccess; Identity = identity; CustomInit(); } @@ -99,6 +103,14 @@ public MediaServiceUpdate() [JsonProperty(PropertyName = "properties.keyDelivery")] public KeyDelivery KeyDelivery { get; set; } + /// + /// Gets or sets whether or not public network access is allowed for + /// resources under the Media Services account. Possible values + /// include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// /// Gets or sets the Managed Identity for the Media Services account. /// diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Mp4Format.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Mp4Format.cs deleted file mode 100644 index 5441e3bd701dc..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Mp4Format.cs +++ /dev/null @@ -1,75 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the properties for an output ISO MP4 file. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.Mp4Format")] - public partial class Mp4Format : MultiBitrateFormat - { - /// - /// Initializes a new instance of the Mp4Format class. - /// - public Mp4Format() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Mp4Format class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - /// 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, IList outputFiles = default(IList)) - : base(filenamePattern, outputFiles) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MultiBitrateFormat.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MultiBitrateFormat.cs deleted file mode 100644 index aa43af5943e22..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/MultiBitrateFormat.cs +++ /dev/null @@ -1,98 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the properties for producing a collection of GOP aligned - /// multi-bitrate files. The default behavior is to produce one output file - /// for each video layer which is muxed together with all the audios. The - /// exact output files produced can be controlled by specifying the - /// outputFiles collection. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.MultiBitrateFormat")] - public partial class MultiBitrateFormat : Format - { - /// - /// Initializes a new instance of the MultiBitrateFormat class. - /// - public MultiBitrateFormat() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MultiBitrateFormat class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - /// 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, IList outputFiles = default(IList)) - : base(filenamePattern) - { - OutputFiles = outputFiles; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets 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 . - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OnErrorType.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OnErrorType.cs deleted file mode 100644 index 62c817d94560d..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OnErrorType.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.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 - { - 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"; - - /// - /// 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OnErrorTypeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OnErrorTypeConverter.cs deleted file mode 100644 index caa81cc852473..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputs.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OperationCollection.cs similarity index 60% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputs.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OperationCollection.cs index a81081c42ead7..05e7decbc84fa 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobInputs.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OperationCollection.cs @@ -16,26 +16,25 @@ namespace Microsoft.Azure.Management.Media.Models using System.Linq; /// - /// Describes a list of inputs to a Job. + /// A collection of Operation items. /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.JobInputs")] - public partial class JobInputs : JobInput + public partial class OperationCollection { /// - /// Initializes a new instance of the JobInputs class. + /// Initializes a new instance of the OperationCollection class. /// - public JobInputs() + public OperationCollection() { CustomInit(); } /// - /// Initializes a new instance of the JobInputs class. + /// Initializes a new instance of the OperationCollection class. /// - /// List of inputs to a Job. - public JobInputs(IList inputs = default(IList)) + /// A collection of Operation items. + public OperationCollection(IList value = default(IList)) { - Inputs = inputs; + Value = value; CustomInit(); } @@ -45,10 +44,10 @@ public JobInputs() partial void CustomInit(); /// - /// Gets or sets list of inputs to a Job. + /// Gets or sets a collection of Operation items. /// - [JsonProperty(PropertyName = "inputs")] - public IList Inputs { get; set; } + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OutputFile.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OutputFile.cs deleted file mode 100644 index 799a4b69fb5e7..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/OutputFile.cs +++ /dev/null @@ -1,78 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents an output file produced. - /// - public partial class OutputFile - { - /// - /// Initializes a new instance of the OutputFile class. - /// - public OutputFile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OutputFile class. - /// - /// The list of labels that describe how the - /// encoder should multiplex video and audio into an output file. For - /// example, if the encoder is producing two video layers with labels - /// v1 and v2, and one audio layer with label a1, then an array like - /// '[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) - { - Labels = labels; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of labels that describe how the encoder - /// should multiplex video and audio into an output file. For example, - /// if the encoder is producing two video layers with labels v1 and v2, - /// and one audio layer with label a1, then an array like '[v1, a1]' - /// tells the encoder to produce an output file with the video track - /// represented by v1 and the audio track represented by a1. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs deleted file mode 100644 index ae3715aea6446..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Overlay.cs +++ /dev/null @@ -1,152 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Base type for all overlays - image, audio or video. - /// - public partial class Overlay - { - /// - /// Initializes a new instance of the Overlay class. - /// - public Overlay() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Overlay class. - /// - /// The label of the job input which is to be - /// used as an overlay. The Input must specify exactly one file. You - /// can specify an image file in JPG, PNG, GIF or BMP format, or an - /// audio file (such as a WAV, MP3, WMA or M4A file), or a video file. - /// See https://aka.ms/mesformats for the complete list of supported - /// audio and video file formats. - /// The start position, with reference to the input - /// video, at which the overlay starts. The value should be in ISO 8601 - /// format. For example, PT05S to start the overlay at 5 seconds into - /// the input video. If not specified the overlay starts from the - /// beginning of the input video. - /// The end position, with reference to the input - /// video, at which the overlay ends. The value should be in ISO 8601 - /// format. For example, PT30S to end the overlay at 30 seconds into - /// the input video. If not specified or the value is greater than the - /// input video duration, the overlay will be applied until the end of - /// the input video if the overlay media duration is greater than the - /// input video duration, else the overlay will last as long as the - /// overlay media duration. - /// The duration over which the overlay - /// fades in onto the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade in (same as PT0S). - /// The duration over which the overlay - /// fades out of the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade out (same as PT0S). - /// 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, 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; - End = end; - FadeInDuration = fadeInDuration; - FadeOutDuration = fadeOutDuration; - AudioGainLevel = audioGainLevel; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the label of the job input which is to be used as an - /// overlay. The Input must specify exactly one file. You can specify - /// an image file in JPG, PNG, GIF or BMP format, or an audio file - /// (such as a WAV, MP3, WMA or M4A file), or a video file. See - /// https://aka.ms/mesformats for the complete list of supported audio - /// and video file formats. - /// - [JsonProperty(PropertyName = "inputLabel")] - public string InputLabel { get; set; } - - /// - /// Gets or sets the start position, with reference to the input video, - /// at which the overlay starts. The value should be in ISO 8601 - /// format. For example, PT05S to start the overlay at 5 seconds into - /// the input video. If not specified the overlay starts from the - /// beginning of the input video. - /// - [JsonProperty(PropertyName = "start")] - public System.TimeSpan? Start { get; set; } - - /// - /// Gets or sets the end position, with reference to the input video, - /// at which the overlay ends. The value should be in ISO 8601 format. - /// For example, PT30S to end the overlay at 30 seconds into the input - /// video. If not specified or the value is greater than the input - /// video duration, the overlay will be applied until the end of the - /// input video if the overlay media duration is greater than the input - /// video duration, else the overlay will last as long as the overlay - /// media duration. - /// - [JsonProperty(PropertyName = "end")] - public System.TimeSpan? End { get; set; } - - /// - /// Gets or sets the duration over which the overlay fades in onto the - /// input video. The value should be in ISO 8601 duration format. If - /// not specified the default behavior is to have no fade in (same as - /// PT0S). - /// - [JsonProperty(PropertyName = "fadeInDuration")] - public System.TimeSpan? FadeInDuration { get; set; } - - /// - /// Gets or sets the duration over which the overlay fades out of the - /// input video. The value should be in ISO 8601 duration format. If - /// not specified the default behavior is to have no fade out (same as - /// PT0S). - /// - [JsonProperty(PropertyName = "fadeOutDuration")] - public System.TimeSpan? FadeOutDuration { get; set; } - - /// - /// Gets or sets the gain level of audio in the overlay. The value - /// should be in the range [0, 1.0]. The default is 1.0. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngFormat.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngFormat.cs deleted file mode 100644 index 6e30a5469220b..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngFormat.cs +++ /dev/null @@ -1,70 +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.Linq; - - /// - /// Describes the settings for producing PNG thumbnails. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.PngFormat")] - public partial class PngFormat : ImageFormat - { - /// - /// Initializes a new instance of the PngFormat class. - /// - public PngFormat() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PngFormat class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - public PngFormat(string filenamePattern) - : base(filenamePattern) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngImage.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngImage.cs deleted file mode 100644 index a746fedcd81f5..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngImage.cs +++ /dev/null @@ -1,116 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the properties for producing a series of PNG images from the - /// input video. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.PngImage")] - public partial class PngImage : Image - { - /// - /// Initializes a new instance of the PngImage class. - /// - public PngImage() - { - CustomInit(); - } - - /// - /// 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 ISO 8601 format - /// (For example, PT05S to start at 5 seconds), or a frame count (For - /// example, 10 to start at the 10th frame), or a relative value to - /// stream duration (For example, 10% to start at 10% of stream - /// duration). Also supports a macro {Best}, which tells the encoder to - /// select the best thumbnail from the first few seconds of the video - /// and will only produce one thumbnail, no matter what other settings - /// are for Step and Range. The default value is macro {Best}. - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - /// The intervals at which thumbnails are generated. - /// The value can be in ISO 8601 format (For example, PT05S for one - /// image every 5 seconds), or a frame count (For example, 30 for one - /// image every 30 frames), or a relative value to stream duration (For - /// example, 10% for one image every 10% of stream duration). Note: - /// Step value will affect the first generated thumbnail, which may not - /// be exactly the one specified at transform preset start time. This - /// is due to the encoder, which tries to select the best thumbnail - /// between start time and Step position from start time as the first - /// output. As the default value is 10%, it means if stream has long - /// duration, the first generated thumbnail might be far away from the - /// one specified at start time. Try to select reasonable value for - /// Step if the first thumbnail is expected close to start time, or set - /// Range value at 1 if only one thumbnail is needed at start - /// time. - /// The position relative to transform preset start - /// time in the input video at which to stop generating thumbnails. The - /// value can be in ISO 8601 format (For example, PT5M30S to stop at 5 - /// minutes and 30 seconds from start time), or a frame count (For - /// example, 300 to stop at the 300th frame from the frame at start - /// time. If this value is 1, it means only producing one thumbnail at - /// start time), or a relative value to the stream duration (For - /// example, 50% to stop at half of stream duration from start time). - /// The default value is 100%, which means to stop at the end of the - /// stream. - /// A collection of output PNG image layers to be - /// produced by the encoder. - public PngImage(string start, string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), VideoSyncMode? syncMode = default(VideoSyncMode?), string step = default(string), string range = default(string), IList layers = default(IList)) - : base(start, label, keyFrameInterval, stretchMode, syncMode, step, range) - { - Layers = layers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a collection of output PNG image layers to be produced - /// by the encoder. - /// - [JsonProperty(PropertyName = "layers")] - public IList Layers { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngLayer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngLayer.cs deleted file mode 100644 index 1f76b59e4085d..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PngLayer.cs +++ /dev/null @@ -1,56 +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.Linq; - - /// - /// Describes the settings to produce a PNG image from the input video. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.PngLayer")] - public partial class PngLayer : Layer - { - /// - /// Initializes a new instance of the PngLayer class. - /// - public PngLayer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PngLayer class. - /// - /// 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - public PngLayer(string width = default(string), string height = default(string), string label = default(string)) - : base(width, height, label) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} 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 deleted file mode 100644 index 6406af393cf07..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Preset.cs +++ /dev/null @@ -1,36 +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 System.Linq; - - /// - /// Base type for all Presets, which define the recipe or instructions on - /// how the input media files should be processed. - /// - public partial class Preset - { - /// - /// Initializes a new instance of the Preset class. - /// - public Preset() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Priority.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Priority.cs deleted file mode 100644 index 9dca8eea07ab4..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Priority.cs +++ /dev/null @@ -1,117 +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; - - /// - /// 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 - { - 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"; - - /// - /// Used for TransformOutputs that can be generated at Normal priority. - /// - public static readonly Priority 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PriorityConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PriorityConverter.cs deleted file mode 100644 index 56415c95237fa..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Provider.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Provider.cs deleted file mode 100644 index d136dadfc0c2b..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Provider.cs +++ /dev/null @@ -1,65 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A resource provider. - /// - public partial class Provider - { - /// - /// Initializes a new instance of the Provider class. - /// - public Provider() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Provider class. - /// - /// The provider name. - public Provider(string providerName) - { - ProviderName = providerName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the provider name. - /// - [JsonProperty(PropertyName = "providerName")] - public string ProviderName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ProviderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderName"); - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobRetry.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccess.cs similarity index 55% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobRetry.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccess.cs index 9c1bbc42ff3f4..899ec7937b997 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/JobRetry.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccess.cs @@ -13,41 +13,38 @@ namespace Microsoft.Azure.Management.Media.Models using Newtonsoft.Json; /// - /// Defines values for JobRetry. + /// Defines values for PublicNetworkAccess. /// /// /// Determine base value for a given allowed value if exists, else return /// the value itself /// - [JsonConverter(typeof(JobRetryConverter))] - public struct JobRetry : System.IEquatable + [JsonConverter(typeof(PublicNetworkAccessConverter))] + public struct PublicNetworkAccess : System.IEquatable { - private JobRetry(string underlyingValue) + private PublicNetworkAccess(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 network access is enabled. /// - public static readonly JobRetry DoNotRetry = "DoNotRetry"; + public static readonly PublicNetworkAccess Enabled = "Enabled"; /// - /// Issue may be resolved after waiting for a period of time and - /// resubmitting the same Job. + /// Public network access is disabled. /// - public static readonly JobRetry MayRetry = "MayRetry"; + public static readonly PublicNetworkAccess Disabled = "Disabled"; /// - /// Underlying value of enum JobRetry + /// Underlying value of enum PublicNetworkAccess /// private readonly string UnderlyingValue; /// - /// Returns string representation for JobRetry + /// Returns string representation for PublicNetworkAccess /// public override string ToString() { @@ -55,55 +52,55 @@ public override string ToString() } /// - /// Compares enums of type JobRetry + /// Compares enums of type PublicNetworkAccess /// - public bool Equals(JobRetry e) + public bool Equals(PublicNetworkAccess e) { return UnderlyingValue.Equals(e.UnderlyingValue); } /// - /// Implicit operator to convert string to JobRetry + /// Implicit operator to convert string to PublicNetworkAccess /// - public static implicit operator JobRetry(string value) + public static implicit operator PublicNetworkAccess(string value) { - return new JobRetry(value); + return new PublicNetworkAccess(value); } /// - /// Implicit operator to convert JobRetry to string + /// Implicit operator to convert PublicNetworkAccess to string /// - public static implicit operator string(JobRetry e) + public static implicit operator string(PublicNetworkAccess e) { return e.UnderlyingValue; } /// - /// Overriding == operator for enum JobRetry + /// Overriding == operator for enum PublicNetworkAccess /// - public static bool operator == (JobRetry e1, JobRetry e2) + public static bool operator == (PublicNetworkAccess e1, PublicNetworkAccess e2) { return e2.Equals(e1); } /// - /// Overriding != operator for enum JobRetry + /// Overriding != operator for enum PublicNetworkAccess /// - public static bool operator != (JobRetry e1, JobRetry e2) + public static bool operator != (PublicNetworkAccess e1, PublicNetworkAccess e2) { return !e2.Equals(e1); } /// - /// Overrides Equals operator for JobRetry + /// Overrides Equals operator for PublicNetworkAccess /// public override bool Equals(object obj) { - return obj is JobRetry && Equals((JobRetry)obj); + return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); } /// - /// Returns for hashCode JobRetry + /// Returns for hashCode PublicNetworkAccess /// public override int GetHashCode() { diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityTypeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccessConverter.cs similarity index 73% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityTypeConverter.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccessConverter.cs index 366f0cfd99375..3992c86fb8241 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ManagedIdentityTypeConverter.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/PublicNetworkAccessConverter.cs @@ -15,22 +15,22 @@ namespace Microsoft.Azure.Management.Media.Models using System.Reflection; /// - /// Defines values for ManagedIdentityType. + /// Defines values for PublicNetworkAccess. /// - public sealed class ManagedIdentityTypeConverter : JsonConverter + public sealed class PublicNetworkAccessConverter : JsonConverter { /// - /// Returns if objectType can be converted to ManagedIdentityType by + /// Returns if objectType can be converted to PublicNetworkAccess by /// the converter. /// public override bool CanConvert(System.Type objectType) { - return typeof(ManagedIdentityType).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + return typeof(PublicNetworkAccess).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); } /// - /// Overrides ReadJson and converts token to ManagedIdentityType. + /// Overrides ReadJson and converts token to PublicNetworkAccess. /// public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) { @@ -38,11 +38,11 @@ public override object ReadJson(JsonReader reader, System.Type objectType, objec { return null; } - return (ManagedIdentityType)serializer.Deserialize(reader); + return (PublicNetworkAccess)serializer.Deserialize(reader); } /// - /// Overriding WriteJson for ManagedIdentityType for serialization. + /// Overriding WriteJson for PublicNetworkAccess for serialization. /// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rectangle.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rectangle.cs deleted file mode 100644 index e445c346187a5..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rectangle.cs +++ /dev/null @@ -1,92 +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.Linq; - - /// - /// Describes the properties of a rectangular window applied to the input - /// media before processing it. - /// - public partial class Rectangle - { - /// - /// Initializes a new instance of the Rectangle class. - /// - public Rectangle() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Rectangle class. - /// - /// The number of pixels from the left-margin. This - /// can be absolute pixel value (e.g 100), or relative to the size of - /// the video (For example, 50%). - /// The number of pixels from the top-margin. This - /// can be absolute pixel value (e.g 100), or relative to the size of - /// the video (For example, 50%). - /// The width of the rectangular region in pixels. - /// This can be absolute pixel value (e.g 100), or relative to the size - /// of the video (For example, 50%). - /// The height of the rectangular region in - /// pixels. This can be absolute pixel value (e.g 100), or relative to - /// the size of the video (For example, 50%). - public Rectangle(string left = default(string), string top = default(string), string width = default(string), string height = default(string)) - { - Left = left; - Top = top; - Width = width; - Height = height; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the number of pixels from the left-margin. This can be - /// absolute pixel value (e.g 100), or relative to the size of the - /// video (For example, 50%). - /// - [JsonProperty(PropertyName = "left")] - public string Left { get; set; } - - /// - /// Gets or sets the number of pixels from the top-margin. This can be - /// absolute pixel value (e.g 100), or relative to the size of the - /// video (For example, 50%). - /// - [JsonProperty(PropertyName = "top")] - public string Top { get; set; } - - /// - /// Gets or sets the width of the rectangular region in pixels. This - /// can be absolute pixel value (e.g 100), or relative to the size of - /// the video (For example, 50%). - /// - [JsonProperty(PropertyName = "width")] - public string Width { get; set; } - - /// - /// Gets or sets the height of the rectangular region in pixels. This - /// can be absolute pixel value (e.g 100), or relative to the size of - /// the video (For example, 50%). - /// - [JsonProperty(PropertyName = "height")] - public string Height { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ResourceIdentity.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ResourceIdentity.cs new file mode 100644 index 0000000000000..daca01b3cd6d4 --- /dev/null +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/ResourceIdentity.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated 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 ResourceIdentity + { + /// + /// Initializes a new instance of the ResourceIdentity class. + /// + public ResourceIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceIdentity class. + /// + /// Indicates whether to use + /// System Assigned Managed Identity. Mutual exclusive with User + /// Assigned Managed Identity. + /// The user assigned managed + /// identity's ARM ID to use when accessing a resource. + public ResourceIdentity(bool useSystemAssignedIdentity, string userAssignedIdentity = default(string)) + { + UserAssignedIdentity = userAssignedIdentity; + UseSystemAssignedIdentity = useSystemAssignedIdentity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the user assigned managed identity's ARM ID to use + /// when accessing a resource. + /// + [JsonProperty(PropertyName = "userAssignedIdentity")] + public string UserAssignedIdentity { get; set; } + + /// + /// Gets or sets indicates whether to use System Assigned Managed + /// Identity. Mutual exclusive with User Assigned Managed Identity. + /// + [JsonProperty(PropertyName = "useSystemAssignedIdentity")] + public bool UseSystemAssignedIdentity { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rotation.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rotation.cs deleted file mode 100644 index 484a8f6f179f1..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Rotation.cs +++ /dev/null @@ -1,132 +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; - - /// - /// 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 - { - private Rotation(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// Automatically detect and rotate as needed. - /// - public static readonly Rotation 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"; - - /// - /// Do not rotate the video but remove any metadata about the rotation. - /// - public static readonly Rotation Rotate0 = "Rotate0"; - - /// - /// Rotate 90 degrees clockwise. - /// - public static readonly Rotation Rotate90 = "Rotate90"; - - /// - /// Rotate 180 degrees clockwise. - /// - public static readonly Rotation 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(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/RotationConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/RotationConverter.cs deleted file mode 100644 index 9c69486b01103..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackByAttribute.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackByAttribute.cs deleted file mode 100644 index 9debd9baa1c4c..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackByAttribute.cs +++ /dev/null @@ -1,95 +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.Linq; - - /// - /// Select audio tracks from the input by specifying an attribute and an - /// attribute filter. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.SelectAudioTrackByAttribute")] - public partial class SelectAudioTrackByAttribute : AudioTrackDescriptor - { - /// - /// Initializes a new instance of the SelectAudioTrackByAttribute - /// class. - /// - public SelectAudioTrackByAttribute() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SelectAudioTrackByAttribute - /// class. - /// - /// The TrackAttribute to filter the tracks by. - /// Possible values include: 'Bitrate', 'Language' - /// The type of AttributeFilter to apply to the - /// TrackAttribute in order to select the tracks. Possible values - /// include: 'All', 'Top', 'Bottom', 'ValueEquals' - /// Optional designation for single - /// channel audio tracks. Can be used to combine the tracks into - /// stereo or multi-channel audio tracks. Possible values include: - /// 'FrontLeft', 'FrontRight', 'Center', 'LowFrequencyEffects', - /// 'BackLeft', 'BackRight', 'StereoLeft', 'StereoRight' - /// The value to filter the tracks by. Only - /// used when AttributeFilter.ValueEquals is specified for the Filter - /// property. - public SelectAudioTrackByAttribute(TrackAttribute attribute, AttributeFilter filter, ChannelMapping? channelMapping = default(ChannelMapping?), string filterValue = default(string)) - : base(channelMapping) - { - Attribute = attribute; - Filter = filter; - FilterValue = filterValue; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the TrackAttribute to filter the tracks by. Possible - /// values include: 'Bitrate', 'Language' - /// - [JsonProperty(PropertyName = "attribute")] - public TrackAttribute Attribute { get; set; } - - /// - /// Gets or sets the type of AttributeFilter to apply to the - /// TrackAttribute in order to select the tracks. Possible values - /// include: 'All', 'Top', 'Bottom', 'ValueEquals' - /// - [JsonProperty(PropertyName = "filter")] - public AttributeFilter Filter { get; set; } - - /// - /// Gets or sets the value to filter the tracks by. Only used when - /// AttributeFilter.ValueEquals is specified for the Filter property. - /// - [JsonProperty(PropertyName = "filterValue")] - public string FilterValue { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackById.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackById.cs deleted file mode 100644 index 64711096d0e10..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectAudioTrackById.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Select audio tracks from the input by specifying a track identifier. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.SelectAudioTrackById")] - public partial class SelectAudioTrackById : AudioTrackDescriptor - { - /// - /// Initializes a new instance of the SelectAudioTrackById class. - /// - public SelectAudioTrackById() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SelectAudioTrackById class. - /// - /// Track identifier to select - /// Optional designation for single - /// channel audio tracks. Can be used to combine the tracks into - /// stereo or multi-channel audio tracks. Possible values include: - /// 'FrontLeft', 'FrontRight', 'Center', 'LowFrequencyEffects', - /// 'BackLeft', 'BackRight', 'StereoLeft', 'StereoRight' - public SelectAudioTrackById(long trackId, ChannelMapping? channelMapping = default(ChannelMapping?)) - : base(channelMapping) - { - TrackId = trackId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets track identifier to select - /// - [JsonProperty(PropertyName = "trackId")] - public long TrackId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackByAttribute.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackByAttribute.cs deleted file mode 100644 index 0c54079aeb5e6..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackByAttribute.cs +++ /dev/null @@ -1,94 +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.Linq; - - /// - /// Select video tracks from the input by specifying an attribute and an - /// attribute filter. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.SelectVideoTrackByAttribute")] - public partial class SelectVideoTrackByAttribute : VideoTrackDescriptor - { - /// - /// Initializes a new instance of the SelectVideoTrackByAttribute - /// class. - /// - public SelectVideoTrackByAttribute() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SelectVideoTrackByAttribute - /// class. - /// - /// The TrackAttribute to filter the tracks by. - /// Possible values include: 'Bitrate', 'Language' - /// The type of AttributeFilter to apply to the - /// TrackAttribute in order to select the tracks. Possible values - /// include: 'All', 'Top', 'Bottom', 'ValueEquals' - /// The value to filter the tracks by. Only - /// used when AttributeFilter.ValueEquals is specified for the Filter - /// property. For TrackAttribute.Bitrate, this should be an integer - /// value in bits per second (e.g: '1500000'). The - /// TrackAttribute.Language is not supported for video tracks. - public SelectVideoTrackByAttribute(TrackAttribute attribute, AttributeFilter filter, string filterValue = default(string)) - { - Attribute = attribute; - Filter = filter; - FilterValue = filterValue; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the TrackAttribute to filter the tracks by. Possible - /// values include: 'Bitrate', 'Language' - /// - [JsonProperty(PropertyName = "attribute")] - public TrackAttribute Attribute { get; set; } - - /// - /// Gets or sets the type of AttributeFilter to apply to the - /// TrackAttribute in order to select the tracks. Possible values - /// include: 'All', 'Top', 'Bottom', 'ValueEquals' - /// - [JsonProperty(PropertyName = "filter")] - public AttributeFilter Filter { get; set; } - - /// - /// Gets or sets the value to filter the tracks by. Only used when - /// AttributeFilter.ValueEquals is specified for the Filter property. - /// For TrackAttribute.Bitrate, this should be an integer value in bits - /// per second (e.g: '1500000'). The TrackAttribute.Language is not - /// supported for video tracks. - /// - [JsonProperty(PropertyName = "filterValue")] - public string FilterValue { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackById.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackById.cs deleted file mode 100644 index 99be8ee3455a5..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/SelectVideoTrackById.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Select video tracks from the input by specifying a track identifier. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.SelectVideoTrackById")] - public partial class SelectVideoTrackById : VideoTrackDescriptor - { - /// - /// Initializes a new instance of the SelectVideoTrackById class. - /// - public SelectVideoTrackById() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SelectVideoTrackById class. - /// - /// Track identifier to select - public SelectVideoTrackById(long trackId) - { - TrackId = trackId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets track identifier to select - /// - [JsonProperty(PropertyName = "trackId")] - public long TrackId { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StandardEncoderPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StandardEncoderPreset.cs deleted file mode 100644 index 5718877c040ea..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StandardEncoderPreset.cs +++ /dev/null @@ -1,104 +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 Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes all the settings to be used when encoding the input video - /// with the Standard Encoder. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.StandardEncoderPreset")] - public partial class StandardEncoderPreset : Preset - { - /// - /// Initializes a new instance of the StandardEncoderPreset class. - /// - public StandardEncoderPreset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StandardEncoderPreset class. - /// - /// The list of codecs to be used when encoding - /// the input video. - /// The list of outputs to be produced by the - /// encoder. - /// 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; - Formats = formats; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets one or more filtering operations that are applied to - /// the input media before encoding. - /// - [JsonProperty(PropertyName = "filters")] - public Filters Filters { get; set; } - - /// - /// Gets or sets the list of codecs to be used when encoding the input - /// video. - /// - [JsonProperty(PropertyName = "codecs")] - public IList Codecs { get; set; } - - /// - /// Gets or sets the list of outputs to be produced by the encoder. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StorageAccount.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StorageAccount.cs index 40bbb97259e3c..546ade30fd48b 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StorageAccount.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StorageAccount.cs @@ -36,10 +36,15 @@ 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)) + /// The storage account identity. + /// The current status of the storage account + /// mapping. + public StorageAccount(StorageAccountType type, string id = default(string), ResourceIdentity identity = default(ResourceIdentity), string status = default(string)) { Id = id; Type = type; + Identity = identity; + Status = status; CustomInit(); } @@ -65,6 +70,18 @@ public StorageAccount() [JsonProperty(PropertyName = "type")] public StorageAccountType Type { get; set; } + /// + /// Gets or sets the storage account identity. + /// + [JsonProperty(PropertyName = "identity")] + public ResourceIdentity Identity { get; set; } + + /// + /// Gets the current status of the storage account mapping. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + /// /// Validate the object. /// @@ -73,6 +90,10 @@ public StorageAccount() /// public virtual void Validate() { + if (Identity != null) + { + Identity.Validate(); + } } } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StretchMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StretchMode.cs index 9d58e599bb23d..114a2cb38af19 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StretchMode.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/StretchMode.cs @@ -28,8 +28,9 @@ private StretchMode(string underlyingValue) } /// - /// Strictly respect the output resolution without considering the - /// pixel aspect ratio or display aspect ratio of the input video. + /// Strictly respects the output resolution specified in the encoding + /// preset without considering the pixel aspect ratio or display aspect + /// ratio of the input video. /// public static readonly StretchMode None = "None"; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttribute.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttribute.cs deleted file mode 100644 index ed25e48c7d9bd..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttribute.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - - /// - /// Defines values for TrackAttribute. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(TrackAttributeConverter))] - public struct TrackAttribute : System.IEquatable - { - private TrackAttribute(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// The bitrate of the track. - /// - public static readonly TrackAttribute Bitrate = "Bitrate"; - - /// - /// The language of the track. - /// - public static readonly TrackAttribute Language = "Language"; - - - /// - /// Underlying value of enum TrackAttribute - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for TrackAttribute - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type TrackAttribute - /// - public bool Equals(TrackAttribute e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to TrackAttribute - /// - public static implicit operator TrackAttribute(string value) - { - return new TrackAttribute(value); - } - - /// - /// Implicit operator to convert TrackAttribute to string - /// - public static implicit operator string(TrackAttribute e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum TrackAttribute - /// - public static bool operator == (TrackAttribute e1, TrackAttribute e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum TrackAttribute - /// - public static bool operator != (TrackAttribute e1, TrackAttribute e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for TrackAttribute - /// - public override bool Equals(object obj) - { - return obj is TrackAttribute && Equals((TrackAttribute)obj); - } - - /// - /// Returns for hashCode TrackAttribute - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttributeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttributeConverter.cs deleted file mode 100644 index 5c014343a3197..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackAttributeConverter.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 TrackAttribute. - /// - public sealed class TrackAttributeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to TrackAttribute by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(TrackAttribute).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to TrackAttribute. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (TrackAttribute)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for TrackAttribute for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackDescriptor.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackDescriptor.cs deleted file mode 100644 index 9abcee8dac8ee..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TrackDescriptor.cs +++ /dev/null @@ -1,36 +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 System.Linq; - - /// - /// Base type for all TrackDescriptor types, which define the metadata and - /// selection for tracks that should be processed by a Job - /// - public partial class TrackDescriptor - { - /// - /// Initializes a new instance of the TrackDescriptor class. - /// - public TrackDescriptor() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Transform.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Transform.cs deleted file mode 100644 index 2ec2a2899fddd..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Transform.cs +++ /dev/null @@ -1,129 +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 Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A Transform encapsulates the rules or instructions for generating - /// desired outputs from input media, such as by transcoding or by - /// extracting insights. After the Transform is created, it can be applied - /// to input media by creating Jobs. - /// - [Rest.Serialization.JsonTransformation] - public partial class Transform : ProxyResource - { - /// - /// Initializes a new instance of the Transform class. - /// - public Transform() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Transform class. - /// - /// An array of one or more TransformOutputs that - /// the Transform should generate. - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// The UTC date and time when the Transform was - /// created, in 'YYYY-MM-DDThh:mm:ssZ' format. - /// An optional verbose description of the - /// Transform. - /// The UTC date and time when the Transform - /// was last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. - /// The system metadata relating to this - /// resource. - public Transform(IList outputs, string id = default(string), string name = default(string), string type = default(string), System.DateTime created = default(System.DateTime), string description = default(string), System.DateTime lastModified = default(System.DateTime), SystemData systemData = default(SystemData)) - : base(id, name, type) - { - Created = created; - Description = description; - LastModified = lastModified; - Outputs = outputs; - SystemData = systemData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the UTC date and time when the Transform was created, in - /// 'YYYY-MM-DDThh:mm:ssZ' format. - /// - [JsonProperty(PropertyName = "properties.created")] - public System.DateTime Created { get; private set; } - - /// - /// Gets or sets an optional verbose description of the Transform. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets the UTC date and time when the Transform was last updated, in - /// 'YYYY-MM-DDThh:mm:ssZ' format. - /// - [JsonProperty(PropertyName = "properties.lastModified")] - public System.DateTime LastModified { get; private set; } - - /// - /// Gets or sets an array of one or more TransformOutputs that the - /// Transform should generate. - /// - [JsonProperty(PropertyName = "properties.outputs")] - public IList Outputs { get; set; } - - /// - /// Gets the system metadata relating to this resource. - /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Outputs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Outputs"); - } - if (Outputs != null) - { - foreach (var element in Outputs) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransformOutput.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransformOutput.cs deleted file mode 100644 index d192680baeca3..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransformOutput.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the properties of a TransformOutput, which are the rules to - /// be applied while generating the desired output. - /// - public partial class TransformOutput - { - /// - /// Initializes a new instance of the TransformOutput class. - /// - public TransformOutput() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TransformOutput class. - /// - /// Preset that describes the operations that will - /// be used to modify, transcode, or extract insights from the source - /// file to generate the output. - /// A Transform can define more than one outputs. - /// This property defines what the service should do when one output - /// fails - either continue to produce other outputs, or, stop the - /// other outputs. The overall Job state will not reflect failures of - /// outputs that are specified with 'ContinueJob'. The default is - /// 'StopProcessingJob'. Possible values include: 'StopProcessingJob', - /// 'ContinueJob' - /// Sets the relative priority of the - /// TransformOutputs within a Transform. This sets the priority that - /// 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?)) - { - OnError = onError; - RelativePriority = relativePriority; - Preset = preset; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a Transform can define more than one outputs. This - /// property defines what the service should do when one output fails - - /// either continue to produce other outputs, or, stop the other - /// outputs. The overall Job state will not reflect failures of outputs - /// that are specified with 'ContinueJob'. The default is - /// 'StopProcessingJob'. Possible values include: 'StopProcessingJob', - /// 'ContinueJob' - /// - [JsonProperty(PropertyName = "onError")] - public OnErrorType? OnError { get; set; } - - /// - /// Gets or sets sets the relative priority of the TransformOutputs - /// within a Transform. This sets the priority that the service uses - /// for processing TransformOutputs. The default priority is Normal. - /// Possible values include: 'Low', 'Normal', 'High' - /// - [JsonProperty(PropertyName = "relativePriority")] - public Priority? RelativePriority { get; set; } - - /// - /// Gets or sets preset that describes the operations that will be used - /// to modify, transcode, or extract insights from the source file to - /// generate the output. - /// - [JsonProperty(PropertyName = "preset")] - public Preset Preset { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Preset == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Preset"); - } - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransportStreamFormat.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransportStreamFormat.cs deleted file mode 100644 index e6d385da111b0..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/TransportStreamFormat.cs +++ /dev/null @@ -1,76 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes the properties for generating an MPEG-2 Transport Stream - /// (ISO/IEC 13818-1) output video file(s). - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.TransportStreamFormat")] - public partial class TransportStreamFormat : MultiBitrateFormat - { - /// - /// Initializes a new instance of the TransportStreamFormat class. - /// - public TransportStreamFormat() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TransportStreamFormat class. - /// - /// The pattern of the file names for the - /// generated output files. The following macros are supported in the - /// file name: {Basename} - An expansion macro that will use the name - /// of the input video file. If the base name(the file suffix is not - /// included) of the input video file is less than 32 characters long, - /// the base name of input video files will be used. If the length of - /// base name of the input video file exceeds 32 characters, the base - /// name is truncated to the first 32 characters in total length. - /// {Extension} - The appropriate extension for this format. {Label} - - /// The label assigned to the codec/layer. {Index} - A unique index for - /// thumbnails. Only applicable to thumbnails. {Bitrate} - The - /// audio/video bitrate. Not applicable to thumbnails. {Codec} - The - /// type of the audio/video codec. {Resolution} - The video resolution. - /// Any unsubstituted macros will be collapsed and removed from the - /// filename. - /// 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, IList outputFiles = default(IList)) - : base(filenamePattern, outputFiles) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Location.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UserAssignedManagedIdentity.cs similarity index 50% rename from sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Location.cs rename to sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UserAssignedManagedIdentity.cs index a7181860b9583..d7726728c2941 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Location.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UserAssignedManagedIdentity.cs @@ -10,26 +10,30 @@ namespace Microsoft.Azure.Management.Media.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; - public partial class Location + public partial class UserAssignedManagedIdentity { /// - /// Initializes a new instance of the Location class. + /// Initializes a new instance of the UserAssignedManagedIdentity + /// class. /// - public Location() + public UserAssignedManagedIdentity() { CustomInit(); } /// - /// Initializes a new instance of the Location class. + /// Initializes a new instance of the UserAssignedManagedIdentity + /// class. /// - public Location(string name) + /// The client ID. + /// The principal ID. + public UserAssignedManagedIdentity(System.Guid? clientId = default(System.Guid?), System.Guid? principalId = default(System.Guid?)) { - Name = name; + ClientId = clientId; + PrincipalId = principalId; CustomInit(); } @@ -39,22 +43,16 @@ public Location(string name) partial void CustomInit(); /// + /// Gets the client ID. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [JsonProperty(PropertyName = "clientId")] + public System.Guid? ClientId { get; private set; } /// - /// Validate the object. + /// Gets the principal ID. /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - } + [JsonProperty(PropertyName = "principalId")] + public System.Guid? PrincipalId { get; private set; } + } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UtcClipTime.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UtcClipTime.cs deleted file mode 100644 index cc8a6fb8b3984..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/UtcClipTime.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specifies the clip time as a Utc time position in the media file. The - /// Utc time can point to a different position depending on whether the - /// media file starts from a timestamp of zero or not. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.UtcClipTime")] - public partial class UtcClipTime : ClipTime - { - /// - /// Initializes a new instance of the UtcClipTime class. - /// - public UtcClipTime() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the UtcClipTime class. - /// - /// The time position on the timeline of the input - /// media based on Utc time. - public UtcClipTime(System.DateTime time) - { - Time = time; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the time position on the timeline of the input media - /// based on Utc time. - /// - [JsonProperty(PropertyName = "time")] - public System.DateTime Time { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Video.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Video.cs deleted file mode 100644 index 2458de4e13b4f..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/Video.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.Media.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the basic properties for encoding the input video. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.Video")] - public partial class Video : Codec - { - /// - /// Initializes a new instance of the Video class. - /// - public Video() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Video class. - /// - /// An optional label for the codec. The label can - /// be used to control muxing behavior. - /// The distance between two key frames. - /// The value should be non-zero in the range [0.5, 20] seconds, - /// specified in ISO 8601 format. The default is 2 seconds(PT2S). Note - /// that this setting is ignored if VideoSyncMode.Passthrough is set, - /// where the KeyFrameInterval value will follow the input source - /// setting. - /// The resizing mode - how the input video - /// will be resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', - /// 'AutoFit' - /// The Video Sync Mode. Possible values - /// include: 'Auto', 'Passthrough', 'Cfr', 'Vfr' - public Video(string label = default(string), System.TimeSpan? keyFrameInterval = default(System.TimeSpan?), StretchMode? stretchMode = default(StretchMode?), VideoSyncMode? syncMode = default(VideoSyncMode?)) - : base(label) - { - KeyFrameInterval = keyFrameInterval; - StretchMode = stretchMode; - SyncMode = syncMode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the distance between two key frames. The value should - /// be non-zero in the range [0.5, 20] seconds, specified in ISO 8601 - /// format. The default is 2 seconds(PT2S). Note that this setting is - /// ignored if VideoSyncMode.Passthrough is set, where the - /// KeyFrameInterval value will follow the input source setting. - /// - [JsonProperty(PropertyName = "keyFrameInterval")] - public System.TimeSpan? KeyFrameInterval { get; set; } - - /// - /// Gets or sets the resizing mode - how the input video will be - /// resized to fit the desired output resolution(s). Default is - /// AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' - /// - [JsonProperty(PropertyName = "stretchMode")] - public StretchMode? StretchMode { get; set; } - - /// - /// Gets or sets the Video Sync Mode. Possible values include: 'Auto', - /// 'Passthrough', 'Cfr', 'Vfr' - /// - [JsonProperty(PropertyName = "syncMode")] - public VideoSyncMode? SyncMode { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoAnalyzerPreset.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoAnalyzerPreset.cs deleted file mode 100644 index f9c96595102c4..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoAnalyzerPreset.cs +++ /dev/null @@ -1,98 +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.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A video analyzer preset that extracts insights (rich metadata) from - /// both audio and video, and outputs a JSON format file. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.VideoAnalyzerPreset")] - public partial class VideoAnalyzerPreset : AudioAnalyzerPreset - { - /// - /// Initializes a new instance of the VideoAnalyzerPreset class. - /// - public VideoAnalyzerPreset() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VideoAnalyzerPreset class. - /// - /// The language for the audio payload in - /// the input using the BCP-47 format of 'language tag-region' (e.g: - /// 'en-US'). If you know the language of your content, it is - /// recommended that you specify it. The language must be specified - /// explicitly for AudioAnalysisMode::Basic, since automatic language - /// detection is not included in basic mode. 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. 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'." The - /// list of supported languages is available here: - /// https://go.microsoft.com/fwlink/?linkid=2109463 - /// Determines the set of audio analysis operations - /// to be performed. If unspecified, the Standard AudioAnalysisMode - /// would be chosen. Possible values include: 'Standard', - /// 'Basic' - /// Dictionary containing key value - /// pairs for parameters not exposed in the preset itself - /// Defines the type of insights that - /// you want the service to generate. The allowed values are - /// 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The - /// default is AllInsights. If you set this to AllInsights and the - /// input is audio only, then only audio insights are generated. - /// Similarly if the input is video only, then only video insights are - /// generated. It is recommended that you not use AudioInsightsOnly if - /// you expect some of your inputs to be video only; or use - /// VideoInsightsOnly if you expect some of your inputs to be audio - /// only. Your Jobs in such conditions would error out. Possible values - /// include: 'AudioInsightsOnly', 'VideoInsightsOnly', - /// 'AllInsights' - public VideoAnalyzerPreset(string audioLanguage = default(string), AudioAnalysisMode? mode = default(AudioAnalysisMode?), IDictionary experimentalOptions = default(IDictionary), InsightsType? insightsToExtract = default(InsightsType?)) - : base(audioLanguage, mode, experimentalOptions) - { - InsightsToExtract = insightsToExtract; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets defines the type of insights that you want the service - /// to generate. The allowed values are 'AudioInsightsOnly', - /// 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. - /// If you set this to AllInsights and the input is audio only, then - /// only audio insights are generated. Similarly if the input is video - /// only, then only video insights are generated. It is recommended - /// that you not use AudioInsightsOnly if you expect some of your - /// inputs to be video only; or use VideoInsightsOnly if you expect - /// some of your inputs to be audio only. Your Jobs in such conditions - /// would error out. Possible values include: 'AudioInsightsOnly', - /// 'VideoInsightsOnly', 'AllInsights' - /// - [JsonProperty(PropertyName = "insightsToExtract")] - public InsightsType? InsightsToExtract { get; set; } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoLayer.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoLayer.cs deleted file mode 100644 index 74c5c4082b7c7..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoLayer.cs +++ /dev/null @@ -1,147 +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.Linq; - - /// - /// Describes the settings to be used when encoding the input video into a - /// desired output bitrate layer. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.VideoLayer")] - public partial class VideoLayer : Layer - { - /// - /// Initializes a new instance of the VideoLayer class. - /// - public VideoLayer() - { - CustomInit(); - } - - /// - /// 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 - /// width as the input. - /// The height 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 - /// height as the input. - /// The alphanumeric label for this layer, which - /// can be used in multiplexing different video and audio layers, or in - /// naming the output file. - /// 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. - /// The number of B-frames to be used when - /// encoding this layer. If not specified, the encoder chooses an - /// appropriate number based on the video profile and level. - /// The frame rate (in frames per second) at - /// which to encode this layer. The value can be in the form of M/N - /// where M and N are integers (For example, 30000/1001), or in the - /// form of a number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// The number of slices to be used when encoding - /// this layer. If not specified, default is zero, which means that - /// encoder will use a single slice for each frame. - /// 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(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; - MaxBitrate = maxBitrate; - BFrames = bFrames; - FrameRate = frameRate; - Slices = slices; - AdaptiveBFrame = adaptiveBFrame; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the average bitrate in bits per second at which to - /// encode the input video when generating this layer. This is a - /// required field. - /// - [JsonProperty(PropertyName = "bitrate")] - public int Bitrate { get; set; } - - /// - /// Gets or sets 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. - /// - [JsonProperty(PropertyName = "maxBitrate")] - public int? MaxBitrate { get; set; } - - /// - /// Gets or sets the number of B-frames to be used when encoding this - /// layer. If not specified, the encoder chooses an appropriate number - /// based on the video profile and level. - /// - [JsonProperty(PropertyName = "bFrames")] - public int? BFrames { get; set; } - - /// - /// Gets or sets the frame rate (in frames per second) at which to - /// encode this layer. The value can be in the form of M/N where M and - /// N are integers (For example, 30000/1001), or in the form of a - /// number (For example, 30, or 29.97). The encoder enforces - /// constraints on allowed frame rates based on the profile and level. - /// If it is not specified, the encoder will use the same frame rate as - /// the input video. - /// - [JsonProperty(PropertyName = "frameRate")] - public string FrameRate { get; set; } - - /// - /// Gets or sets the number of slices to be used when encoding this - /// layer. If not specified, default is zero, which means that encoder - /// will use a single slice for each frame. - /// - [JsonProperty(PropertyName = "slices")] - public int? Slices { get; set; } - - /// - /// Gets or sets 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. - /// - [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/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoOverlay.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoOverlay.cs deleted file mode 100644 index 599c23f962d0b..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoOverlay.cs +++ /dev/null @@ -1,116 +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.Linq; - - /// - /// Describes the properties of a video overlay. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.VideoOverlay")] - public partial class VideoOverlay : Overlay - { - /// - /// Initializes a new instance of the VideoOverlay class. - /// - public VideoOverlay() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VideoOverlay class. - /// - /// The label of the job input which is to be - /// used as an overlay. The Input must specify exactly one file. You - /// can specify an image file in JPG, PNG, GIF or BMP format, or an - /// audio file (such as a WAV, MP3, WMA or M4A file), or a video file. - /// See https://aka.ms/mesformats for the complete list of supported - /// audio and video file formats. - /// The start position, with reference to the input - /// video, at which the overlay starts. The value should be in ISO 8601 - /// format. For example, PT05S to start the overlay at 5 seconds into - /// the input video. If not specified the overlay starts from the - /// beginning of the input video. - /// The end position, with reference to the input - /// video, at which the overlay ends. The value should be in ISO 8601 - /// format. For example, PT30S to end the overlay at 30 seconds into - /// the input video. If not specified or the value is greater than the - /// input video duration, the overlay will be applied until the end of - /// the input video if the overlay media duration is greater than the - /// input video duration, else the overlay will last as long as the - /// overlay media duration. - /// The duration over which the overlay - /// fades in onto the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade in (same as PT0S). - /// The duration over which the overlay - /// fades out of the input video. The value should be in ISO 8601 - /// duration format. If not specified the default behavior is to have - /// no fade out (same as PT0S). - /// The gain level of audio in the - /// overlay. The value should be in the range [0, 1.0]. The default is - /// 1.0. - /// The location in the input video where the - /// overlay is applied. - /// The opacity of the overlay. This is a value - /// in the range [0 - 1.0]. Default is 1.0 which mean the overlay is - /// opaque. - /// An optional rectangular window used to - /// crop the overlay image or video. - 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; - Opacity = opacity; - CropRectangle = cropRectangle; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the location in the input video where the overlay is - /// applied. - /// - [JsonProperty(PropertyName = "position")] - public Rectangle Position { get; set; } - - /// - /// Gets or sets the opacity of the overlay. This is a value in the - /// range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. - /// - [JsonProperty(PropertyName = "opacity")] - public double? Opacity { get; set; } - - /// - /// Gets or sets an optional rectangular window used to crop the - /// overlay image or video. - /// - [JsonProperty(PropertyName = "cropRectangle")] - public Rectangle CropRectangle { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncMode.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncMode.cs deleted file mode 100644 index 814f587c7bd60..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncMode.cs +++ /dev/null @@ -1,136 +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; - - /// - /// Defines values for VideoSyncMode. - /// - /// - /// Determine base value for a given allowed value if exists, else return - /// the value itself - /// - [JsonConverter(typeof(VideoSyncModeConverter))] - public struct VideoSyncMode : System.IEquatable - { - private VideoSyncMode(string underlyingValue) - { - UnderlyingValue=underlyingValue; - } - - /// - /// This is the default method. Chooses between Cfr and Vfr depending - /// on muxer capabilities. For output format MP4, the default mode is - /// Cfr. - /// - public static readonly VideoSyncMode Auto = "Auto"; - - /// - /// The presentation timestamps on frames are passed through from the - /// input file to the output file writer. Recommended when the input - /// source has variable frame rate, and are attempting to produce - /// multiple layers for adaptive streaming in the output which have - /// aligned GOP boundaries. Note: if two or more frames in the input - /// have duplicate timestamps, then the output will also have the same - /// behavior - /// - public static readonly VideoSyncMode Passthrough = "Passthrough"; - - /// - /// Input frames will be repeated and/or dropped as needed to achieve - /// exactly the requested constant frame rate. Recommended when the - /// output frame rate is explicitly set at a specified value - /// - public static readonly VideoSyncMode Cfr = "Cfr"; - - /// - /// Similar to the Passthrough mode, but if the input has frames that - /// have duplicate timestamps, then only one frame is passed through to - /// the output, and others are dropped. Recommended when the number of - /// output frames is expected to be equal to the number of input - /// frames. For example, the output is used to calculate a quality - /// metric like PSNR against the input - /// - public static readonly VideoSyncMode Vfr = "Vfr"; - - - /// - /// Underlying value of enum VideoSyncMode - /// - private readonly string UnderlyingValue; - - /// - /// Returns string representation for VideoSyncMode - /// - public override string ToString() - { - return UnderlyingValue == null ? null : UnderlyingValue.ToString(); - } - - /// - /// Compares enums of type VideoSyncMode - /// - public bool Equals(VideoSyncMode e) - { - return UnderlyingValue.Equals(e.UnderlyingValue); - } - - /// - /// Implicit operator to convert string to VideoSyncMode - /// - public static implicit operator VideoSyncMode(string value) - { - return new VideoSyncMode(value); - } - - /// - /// Implicit operator to convert VideoSyncMode to string - /// - public static implicit operator string(VideoSyncMode e) - { - return e.UnderlyingValue; - } - - /// - /// Overriding == operator for enum VideoSyncMode - /// - public static bool operator == (VideoSyncMode e1, VideoSyncMode e2) - { - return e2.Equals(e1); - } - - /// - /// Overriding != operator for enum VideoSyncMode - /// - public static bool operator != (VideoSyncMode e1, VideoSyncMode e2) - { - return !e2.Equals(e1); - } - - /// - /// Overrides Equals operator for VideoSyncMode - /// - public override bool Equals(object obj) - { - return obj is VideoSyncMode && Equals((VideoSyncMode)obj); - } - - /// - /// Returns for hashCode VideoSyncMode - /// - public override int GetHashCode() - { - return UnderlyingValue.GetHashCode(); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncModeConverter.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncModeConverter.cs deleted file mode 100644 index 3e5c033edf187..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoSyncModeConverter.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 VideoSyncMode. - /// - public sealed class VideoSyncModeConverter : JsonConverter - { - - /// - /// Returns if objectType can be converted to VideoSyncMode by the - /// converter. - /// - public override bool CanConvert(System.Type objectType) - { - return typeof(VideoSyncMode).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); - } - - /// - /// Overrides ReadJson and converts token to VideoSyncMode. - /// - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == Newtonsoft.Json.JsonToken.Null) - { - return null; - } - return (VideoSyncMode)serializer.Deserialize(reader); - } - - /// - /// Overriding WriteJson for VideoSyncMode for serialization. - /// - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoTrackDescriptor.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoTrackDescriptor.cs deleted file mode 100644 index a1e19e9386d35..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Models/VideoTrackDescriptor.cs +++ /dev/null @@ -1,37 +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.Linq; - - /// - /// A TrackSelection to select video tracks. - /// - [Newtonsoft.Json.JsonObject("#Microsoft.Media.VideoTrackDescriptor")] - public partial class VideoTrackDescriptor : TrackDescriptor - { - /// - /// Initializes a new instance of the VideoTrackDescriptor class. - /// - public VideoTrackDescriptor() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Operations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Operations.cs index 01f959a247d85..23327575bec4d 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Operations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/Operations.cs @@ -62,173 +62,7 @@ internal Operations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - string apiVersion = "2021-05-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Media/operations").ToString(); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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 Operations - /// - /// - /// Lists all the Media Services operations. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -243,11 +77,11 @@ internal Operations(AzureMediaServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextPageLink == null) + if (Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -256,14 +90,17 @@ internal Operations(AzureMediaServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Media/operations").ToString(); List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -324,11 +161,11 @@ internal Operations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -352,7 +189,7 @@ internal Operations(AzureMediaServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -365,7 +202,7 @@ internal Operations(AzureMediaServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/OperationsExtensions.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/OperationsExtensions.cs index a0f85054992cd..57ea5f1eb22d4 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/OperationsExtensions.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/OperationsExtensions.cs @@ -30,7 +30,7 @@ public static partial class OperationsExtensions /// /// The operations group for this extension method. /// - public static IPage List(this IOperations operations) + public static OperationCollection List(this IOperations operations) { return operations.ListAsync().GetAwaiter().GetResult(); } @@ -47,7 +47,7 @@ public static IPage List(this IOperations operations) /// /// The cancellation token. /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { @@ -55,45 +55,5 @@ public static IPage List(this IOperations operations) } } - /// - /// List Operations - /// - /// - /// Lists all the Media Services operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Operations - /// - /// - /// Lists all the Media Services operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - } } diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateEndpointConnectionsOperations.cs index 34f7fb7802860..030e967420750 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateEndpointConnectionsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -68,7 +68,7 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -107,7 +110,6 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -118,9 +120,9 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -182,11 +184,11 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -262,7 +264,7 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -295,7 +297,10 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -306,7 +311,6 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("name", name); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -318,9 +322,9 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -382,11 +386,11 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -465,7 +469,7 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -506,7 +510,10 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -518,7 +525,6 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("name", name); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } @@ -530,9 +536,9 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -600,11 +606,11 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -680,7 +686,7 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -710,7 +716,10 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -721,7 +730,6 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("name", name); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -733,9 +741,9 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -795,13 +803,13 @@ internal PrivateEndpointConnectionsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateLinkResourcesOperations.cs index 0151d896c140d..9367cddb4e6a3 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateLinkResourcesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/PrivateLinkResourcesOperations.cs @@ -68,7 +68,7 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -107,7 +110,6 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -118,9 +120,9 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -182,11 +184,11 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -262,7 +264,7 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -295,7 +297,10 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "name"); } - string apiVersion = "2021-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -306,7 +311,6 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("name", name); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -318,9 +322,9 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -382,11 +386,11 @@ internal PrivateLinkResourcesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; 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 30e53c4f09970..5fc7cc0165bdb 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 @@ -19,35 +19,22 @@ public static IEnumerable> ApiInfo_AzureMediaServi { return new Tuple[] { - new Tuple("Media", "AccountFilters", "2020-05-01"), - new Tuple("Media", "AssetFilters", "2020-05-01"), - new Tuple("Media", "Assets", "2020-05-01"), - new Tuple("Media", "ContentKeyPolicies", "2020-05-01"), - new Tuple("Media", "Jobs", "2020-05-01"), - new Tuple("Media", "LiveEvents", "2020-05-01"), - new Tuple("Media", "LiveOutputs", "2020-05-01"), - new Tuple("Media", "Locations", "2021-05-01"), - new Tuple("Media", "Mediaservices", "2021-05-01"), - new Tuple("Media", "Operations", "2021-05-01"), - new Tuple("Media", "PrivateEndpointConnections", "2021-05-01"), - new Tuple("Media", "PrivateLinkResources", "2021-05-01"), - new Tuple("Media", "StreamingEndpoints", "2020-05-01"), - new Tuple("Media", "StreamingLocators", "2020-05-01"), - new Tuple("Media", "StreamingPolicies", "2020-05-01"), - new Tuple("Media", "Transforms", "2020-05-01"), + new Tuple("Media", "AccountFilters", "2021-06-01"), + new Tuple("Media", "AssetFilters", "2021-06-01"), + new Tuple("Media", "Assets", "2021-06-01"), + new Tuple("Media", "ContentKeyPolicies", "2021-06-01"), + new Tuple("Media", "LiveEvents", "2021-06-01"), + new Tuple("Media", "LiveOutputs", "2021-06-01"), + new Tuple("Media", "Locations", "2021-06-01"), + new Tuple("Media", "Mediaservices", "2021-06-01"), + new Tuple("Media", "Operations", "2021-06-01"), + new Tuple("Media", "PrivateEndpointConnections", "2021-06-01"), + new Tuple("Media", "PrivateLinkResources", "2021-06-01"), + new Tuple("Media", "StreamingEndpoints", "2021-06-01"), + new Tuple("Media", "StreamingLocators", "2021-06-01"), + new Tuple("Media", "StreamingPolicies", "2021-06-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@1.9.1"; - 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=v2 --reflect-api-versions --opt-in-extensible-enums --tag=package-2021-05 --csharp-sdks-folder=D:\\GitHub\\Azure\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "e92d236d96ab4e229a9943ddea7a7534982a4028"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingEndpointsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingEndpointsOperations.cs index 529e67a242e9b..c31aa3fe594a6 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingEndpointsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingEndpointsOperations.cs @@ -68,7 +68,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -97,7 +97,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -107,7 +110,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -118,9 +120,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -182,11 +184,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -263,7 +265,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -311,7 +313,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -322,7 +327,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -334,9 +338,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -396,13 +400,13 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -667,7 +671,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -715,6 +719,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); @@ -723,7 +731,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -734,7 +741,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("autoStart", autoStart); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); @@ -748,9 +754,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (autoStart != null) { @@ -822,11 +828,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -924,7 +930,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -972,11 +978,14 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (parameters == null) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -987,7 +996,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); @@ -1000,9 +1008,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1070,11 +1078,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1169,7 +1177,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1214,7 +1222,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1225,7 +1236,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } @@ -1237,9 +1247,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1301,11 +1311,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1364,7 +1374,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1409,7 +1419,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1420,7 +1433,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); } @@ -1432,9 +1444,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1496,11 +1508,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1559,7 +1571,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1604,7 +1616,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1615,7 +1630,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); } @@ -1627,9 +1641,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1691,11 +1705,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1757,7 +1771,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1802,7 +1816,10 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) throw new ValidationException(ValidationRules.Pattern, "streamingEndpointName", "^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$"); } } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } StreamingEntityScaleUnit parameters = new StreamingEntityScaleUnit(); if (scaleUnit != null) { @@ -1818,7 +1835,6 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingEndpointName", streamingEndpointName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginScale", tracingParameters); @@ -1831,9 +1847,9 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingEndpointName}", System.Uri.EscapeDataString(streamingEndpointName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1901,11 +1917,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1958,7 +1974,7 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2054,11 +2070,11 @@ internal StreamingEndpointsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingLocatorsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingLocatorsOperations.cs index 61f7766f2ef91..ec08d495b7fb2 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingLocatorsOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingLocatorsOperations.cs @@ -72,7 +72,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -101,7 +101,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -112,7 +115,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -131,9 +133,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _queryParameters.Add(_odataFilter); } } - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -195,11 +197,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -276,7 +278,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -309,7 +311,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingLocatorName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -320,7 +325,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingLocatorName", streamingLocatorName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -332,9 +336,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingLocatorName}", System.Uri.EscapeDataString(streamingLocatorName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -394,13 +398,13 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -480,7 +484,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -521,7 +525,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -533,7 +540,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingLocatorName", streamingLocatorName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } @@ -545,9 +551,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingLocatorName}", System.Uri.EscapeDataString(streamingLocatorName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -615,11 +621,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -696,7 +702,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -726,7 +732,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingLocatorName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -737,7 +746,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingLocatorName", streamingLocatorName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -749,9 +757,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingLocatorName}", System.Uri.EscapeDataString(streamingLocatorName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -813,11 +821,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -876,7 +884,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -909,7 +917,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingLocatorName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -920,7 +931,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingLocatorName", streamingLocatorName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListContentKeys", tracingParameters); } @@ -932,9 +942,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingLocatorName}", System.Uri.EscapeDataString(streamingLocatorName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -996,11 +1006,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1077,7 +1087,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1110,7 +1120,10 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingLocatorName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1121,7 +1134,6 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingLocatorName", streamingLocatorName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListPaths", tracingParameters); } @@ -1133,9 +1145,9 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingLocatorName}", System.Uri.EscapeDataString(streamingLocatorName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1197,11 +1209,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -1272,7 +1284,7 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1368,11 +1380,11 @@ internal StreamingLocatorsOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingPoliciesOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingPoliciesOperations.cs index 0471b87b46f98..99dda0480a614 100644 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingPoliciesOperations.cs +++ b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/StreamingPoliciesOperations.cs @@ -72,7 +72,7 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -101,7 +101,10 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "accountName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -112,7 +115,6 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -131,9 +133,9 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) _queryParameters.Add(_odataFilter); } } - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -195,11 +197,11 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -276,7 +278,7 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -309,7 +311,10 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingPolicyName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -320,7 +325,6 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingPolicyName", streamingPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -332,9 +336,9 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingPolicyName}", System.Uri.EscapeDataString(streamingPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -394,13 +398,13 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) + if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -480,7 +484,7 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -521,7 +525,10 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -533,7 +540,6 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingPolicyName", streamingPolicyName); tracingParameters.Add("parameters", parameters); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } @@ -545,9 +551,9 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingPolicyName}", System.Uri.EscapeDataString(streamingPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -615,11 +621,11 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 201) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -696,7 +702,7 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -726,7 +732,10 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "streamingPolicyName"); } - string apiVersion = "2020-05-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -737,7 +746,6 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("accountName", accountName); tracingParameters.Add("streamingPolicyName", streamingPolicyName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } @@ -749,9 +757,9 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) _url = _url.Replace("{accountName}", System.Uri.EscapeDataString(accountName)); _url = _url.Replace("{streamingPolicyName}", System.Uri.EscapeDataString(streamingPolicyName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -813,11 +821,11 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; @@ -870,7 +878,7 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -966,11 +974,11 @@ internal StreamingPoliciesOperations(AzureMediaServicesClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperations.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperations.cs deleted file mode 100644 index 1e6eaadec5c55..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperations.cs +++ /dev/null @@ -1,1299 +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 -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// TransformsOperations operations. - /// - internal partial class TransformsOperations : IServiceOperations, ITransformsOperations - { - /// - /// Initializes a new instance of the TransformsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal TransformsOperations(AzureMediaServicesClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the AzureMediaServicesClient - /// - public AzureMediaServicesClient Client { get; private set; } - - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string accountName, ODataQuery odataQuery = default(ODataQuery), 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"); - } - string apiVersion = "2020-05-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("odataQuery", odataQuery); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("accountName", accountName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", 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}/transforms").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 (odataQuery != null) - { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) - { - _queryParameters.Add(_odataFilter); - } - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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; - } - - /// - /// Get Transform - /// - /// - /// Gets a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - 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; - } - - /// - /// Create or Update Transform - /// - /// - /// Creates or updates a new Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, IList outputs, string description = 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (outputs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "outputs"); - } - if (outputs != null) - { - foreach (var element in outputs) - { - if (element != null) - { - element.Validate(); - } - } - } - string apiVersion = "2020-05-01"; - Transform parameters = new Transform(); - if (description != null || outputs != null) - { - parameters.Description = description; - parameters.Outputs = outputs; - } - // 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("transformName", transformName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new 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); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete Transform - /// - /// - /// Deletes a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - string apiVersion = "2020-05-01"; - // 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("transformName", transformName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 204) - { - var ex = new 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(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Update Transform - /// - /// - /// Updates a Transform. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, string transformName, IList outputs, string description = 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 (transformName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "transformName"); - } - if (outputs == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "outputs"); - } - if (outputs != null) - { - foreach (var element in outputs) - { - if (element != null) - { - element.Validate(); - } - } - } - string apiVersion = "2020-05-01"; - Transform parameters = new Transform(); - if (description != null || outputs != null) - { - parameters.Description = description; - parameters.Outputs = outputs; - } - // 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("transformName", transformName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}").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)); - _url = _url.Replace("{transformName}", System.Uri.EscapeDataString(transformName)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(parameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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 Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new 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; - } - - } -} diff --git a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperationsExtensions.cs b/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperationsExtensions.cs deleted file mode 100644 index a9adebae0b7f2..0000000000000 --- a/sdk/mediaservices/Microsoft.Azure.Management.Media/src/Generated/TransformsOperationsExtensions.cs +++ /dev/null @@ -1,353 +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 -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TransformsOperations. - /// - public static partial class TransformsOperationsExtensions - { - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this ITransformsOperations operations, string resourceGroupName, string accountName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(resourceGroupName, accountName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ITransformsOperations operations, string resourceGroupName, string accountName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, accountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Transform - /// - /// - /// Gets a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - public static Transform Get(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName) - { - return operations.GetAsync(resourceGroupName, accountName, transformName).GetAwaiter().GetResult(); - } - - /// - /// Get Transform - /// - /// - /// Gets a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, transformName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or Update Transform - /// - /// - /// Creates or updates a new Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - public static Transform CreateOrUpdate(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string)) - { - return operations.CreateOrUpdateAsync(resourceGroupName, accountName, transformName, outputs, description).GetAwaiter().GetResult(); - } - - /// - /// Create or Update Transform - /// - /// - /// Creates or updates a new Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, transformName, outputs, description, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete Transform - /// - /// - /// Deletes a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - public static void Delete(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName) - { - operations.DeleteAsync(resourceGroupName, accountName, transformName).GetAwaiter().GetResult(); - } - - /// - /// Delete Transform - /// - /// - /// Deletes a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, transformName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Update Transform - /// - /// - /// Updates a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - public static Transform Update(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string)) - { - return operations.UpdateAsync(resourceGroupName, accountName, transformName, outputs, description).GetAwaiter().GetResult(); - } - - /// - /// Update Transform - /// - /// - /// Updates a Transform. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group within the Azure subscription. - /// - /// - /// The Media Services account name. - /// - /// - /// The Transform name. - /// - /// - /// An array of one or more TransformOutputs that the Transform should - /// generate. - /// - /// - /// An optional verbose description of the Transform. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ITransformsOperations operations, string resourceGroupName, string accountName, string transformName, IList outputs, string description = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, transformName, outputs, description, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ITransformsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Transforms - /// - /// - /// Lists the Transforms in the account. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ITransformsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -}