diff --git a/lib/services/mediaServicesManagement/README.md b/lib/services/mediaServicesManagement/README.md index 7f4bd1ed4a..a341ba1297 100644 --- a/lib/services/mediaServicesManagement/README.md +++ b/lib/services/mediaServicesManagement/README.md @@ -18,7 +18,7 @@ npm install azure-arm-mediaservices ## How to use -### Authentication, client creation and list operations as an example. +### Authentication, client creation and list accountFilters as an example. ```javascript const msRestAzure = require("ms-rest-azure"); @@ -26,7 +26,9 @@ const AzureMediaServices = require("azure-arm-mediaservices"); msRestAzure.interactiveLogin().then((creds) => { const subscriptionId = ""; const client = new AzureMediaServices(creds, subscriptionId); - return client.operations.list().then((result) => { + const resourceGroupName = "testresourceGroupName"; + const accountName = "testaccountName"; + return client.accountFilters.list(resourceGroupName, accountName).then((result) => { console.log("The result is:"); console.log(result); }); diff --git a/lib/services/mediaServicesManagement/lib/azureMediaServices.d.ts b/lib/services/mediaServicesManagement/lib/azureMediaServices.d.ts index f4a40915f8..ba1fbab737 100644 --- a/lib/services/mediaServicesManagement/lib/azureMediaServices.d.ts +++ b/lib/services/mediaServicesManagement/lib/azureMediaServices.d.ts @@ -34,11 +34,11 @@ export default class AzureMediaServices extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); @@ -56,10 +56,12 @@ export default class AzureMediaServices extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups + accountFilters: operations.AccountFilters; operations: operations.Operations; mediaservices: operations.Mediaservices; locations: operations.Locations; assets: operations.Assets; + assetFilters: operations.AssetFilters; contentKeyPolicies: operations.ContentKeyPolicies; transforms: operations.Transforms; jobs: operations.Jobs; diff --git a/lib/services/mediaServicesManagement/lib/azureMediaServices.js b/lib/services/mediaServicesManagement/lib/azureMediaServices.js index d00dd12ed6..1e514a6a1b 100644 --- a/lib/services/mediaServicesManagement/lib/azureMediaServices.js +++ b/lib/services/mediaServicesManagement/lib/azureMediaServices.js @@ -34,9 +34,9 @@ class AzureMediaServices extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { @@ -50,7 +50,7 @@ class AzureMediaServices extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-06-01-preview'; + this.apiVersion = '2018-07-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -72,10 +72,12 @@ class AzureMediaServices extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } + this.accountFilters = new operations.AccountFilters(this); this.operations = new operations.Operations(this); this.mediaservices = new operations.Mediaservices(this); this.locations = new operations.Locations(this); this.assets = new operations.Assets(this); + this.assetFilters = new operations.AssetFilters(this); this.contentKeyPolicies = new operations.ContentKeyPolicies(this); this.transforms = new operations.Transforms(this); this.jobs = new operations.Jobs(this); diff --git a/lib/services/mediaServicesManagement/lib/models/accountFilter.js b/lib/services/mediaServicesManagement/lib/models/accountFilter.js new file mode 100644 index 0000000000..282b206653 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/accountFilter.js @@ -0,0 +1,119 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * An Account Filter. + * + * @extends models['ProxyResource'] + */ +class AccountFilter extends models['ProxyResource'] { + /** + * Create a AccountFilter. + * @member {object} [presentationTimeRange] The presentation time range. + * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * time boundary. + * @member {number} [presentationTimeRange.endTimestamp] The absolute end + * time boundary. + * @member {number} [presentationTimeRange.presentationWindowDuration] The + * relative to end sliding window. + * @member {number} [presentationTimeRange.liveBackoffDuration] The relative + * to end right edge. + * @member {number} [presentationTimeRange.timescale] The time scale of time + * stamps. + * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator + * of forcing exsiting of end time stamp. + * @member {object} [firstQuality] The first quality. + * @member {number} [firstQuality.bitrate] The first quality bitrate. + * @member {array} [tracks] The tracks selection conditions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AccountFilter + * + * @returns {object} metadata of AccountFilter + * + */ + mapper() { + return { + required: false, + serializedName: 'AccountFilter', + type: { + name: 'Composite', + className: 'AccountFilter', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + presentationTimeRange: { + required: false, + serializedName: 'properties.presentationTimeRange', + type: { + name: 'Composite', + className: 'PresentationTimeRange' + } + }, + firstQuality: { + required: false, + serializedName: 'properties.firstQuality', + type: { + name: 'Composite', + className: 'FirstQuality' + } + }, + tracks: { + required: false, + serializedName: 'properties.tracks', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FilterTrackSelectionElementType', + type: { + name: 'Composite', + className: 'FilterTrackSelection' + } + } + } + } + } + } + }; + } +} + +module.exports = AccountFilter; diff --git a/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js b/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js new file mode 100644 index 0000000000..210b556327 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/accountFilterCollection.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A collection of AccountFilter items. + */ +class AccountFilterCollection extends Array { + /** + * Create a AccountFilterCollection. + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AccountFilterCollection + * + * @returns {object} metadata of AccountFilterCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'AccountFilterCollection', + type: { + name: 'Composite', + className: 'AccountFilterCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AccountFilterElementType', + type: { + name: 'Composite', + className: 'AccountFilter' + } + } + } + }, + odatanextLink: { + required: false, + serializedName: '@odata\\.nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AccountFilterCollection; diff --git a/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js b/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js index 35d0e4e252..db629466fb 100644 --- a/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/akamaiAccessControl.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Akamai access control * diff --git a/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js b/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js index abc27eac0c..2bd9ed32f6 100644 --- a/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js +++ b/lib/services/mediaServicesManagement/lib/models/akamaiSignatureHeaderAuthenticationKey.js @@ -19,7 +19,7 @@ class AkamaiSignatureHeaderAuthenticationKey { * Create a AkamaiSignatureHeaderAuthenticationKey. * @member {string} [identifier] identifier of the key * @member {string} [base64Key] authentication key - * @member {date} [expiration] The exact time the authentication key. + * @member {date} [expiration] The expiration time of the authentication key. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/apiError.js b/lib/services/mediaServicesManagement/lib/models/apiError.js index 20ddeb52a1..c46090683e 100644 --- a/lib/services/mediaServicesManagement/lib/models/apiError.js +++ b/lib/services/mediaServicesManagement/lib/models/apiError.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The API error. * @@ -19,7 +17,7 @@ const models = require('./index'); class ApiError { /** * Create a ApiError. - * @member {object} [error] The error properties. + * @member {object} [error] ApiError. The error properties. * @member {string} [error.code] A language-independent error name. * @member {string} [error.message] The error message. * @member {string} [error.target] The target of the error (for example, the diff --git a/lib/services/mediaServicesManagement/lib/models/asset.js b/lib/services/mediaServicesManagement/lib/models/asset.js index 9f65fcaf1e..63876ee283 100644 --- a/lib/services/mediaServicesManagement/lib/models/asset.js +++ b/lib/services/mediaServicesManagement/lib/models/asset.js @@ -75,6 +75,7 @@ class Asset extends models['ProxyResource'] { }, assetId: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.assetId', type: { @@ -83,6 +84,7 @@ class Asset extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { @@ -91,6 +93,7 @@ class Asset extends models['ProxyResource'] { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.lastModified', type: { @@ -127,6 +130,7 @@ class Asset extends models['ProxyResource'] { }, storageEncryptionFormat: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.storageEncryptionFormat', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js b/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js new file mode 100644 index 0000000000..127d6e784c --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/assetFileEncryptionMetadata.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The Asset File Storage encryption metadata. + * + */ +class AssetFileEncryptionMetadata { + /** + * Create a AssetFileEncryptionMetadata. + * @member {string} [initializationVector] The Asset File initialization + * vector. + * @member {string} [assetFileName] The Asset File name. + * @member {uuid} assetFileId The Asset File Id. + */ + constructor() { + } + + /** + * Defines the metadata of AssetFileEncryptionMetadata + * + * @returns {object} metadata of AssetFileEncryptionMetadata + * + */ + mapper() { + return { + required: false, + serializedName: 'AssetFileEncryptionMetadata', + type: { + name: 'Composite', + className: 'AssetFileEncryptionMetadata', + modelProperties: { + initializationVector: { + required: false, + serializedName: 'initializationVector', + type: { + name: 'String' + } + }, + assetFileName: { + required: false, + serializedName: 'assetFileName', + type: { + name: 'String' + } + }, + assetFileId: { + required: true, + serializedName: 'assetFileId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AssetFileEncryptionMetadata; diff --git a/lib/services/mediaServicesManagement/lib/models/assetFilter.js b/lib/services/mediaServicesManagement/lib/models/assetFilter.js new file mode 100644 index 0000000000..456a6c18f8 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/assetFilter.js @@ -0,0 +1,119 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * An Asset Filter. + * + * @extends models['ProxyResource'] + */ +class AssetFilter extends models['ProxyResource'] { + /** + * Create a AssetFilter. + * @member {object} [presentationTimeRange] The presentation time range. + * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * time boundary. + * @member {number} [presentationTimeRange.endTimestamp] The absolute end + * time boundary. + * @member {number} [presentationTimeRange.presentationWindowDuration] The + * relative to end sliding window. + * @member {number} [presentationTimeRange.liveBackoffDuration] The relative + * to end right edge. + * @member {number} [presentationTimeRange.timescale] The time scale of time + * stamps. + * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator + * of forcing exsiting of end time stamp. + * @member {object} [firstQuality] The first quality. + * @member {number} [firstQuality.bitrate] The first quality bitrate. + * @member {array} [tracks] The tracks selection conditions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AssetFilter + * + * @returns {object} metadata of AssetFilter + * + */ + mapper() { + return { + required: false, + serializedName: 'AssetFilter', + type: { + name: 'Composite', + className: 'AssetFilter', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + presentationTimeRange: { + required: false, + serializedName: 'properties.presentationTimeRange', + type: { + name: 'Composite', + className: 'PresentationTimeRange' + } + }, + firstQuality: { + required: false, + serializedName: 'properties.firstQuality', + type: { + name: 'Composite', + className: 'FirstQuality' + } + }, + tracks: { + required: false, + serializedName: 'properties.tracks', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FilterTrackSelectionElementType', + type: { + name: 'Composite', + className: 'FilterTrackSelection' + } + } + } + } + } + } + }; + } +} + +module.exports = AssetFilter; diff --git a/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js b/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js new file mode 100644 index 0000000000..3f3f0ec041 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/assetFilterCollection.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A collection of AssetFilter items. + */ +class AssetFilterCollection extends Array { + /** + * Create a AssetFilterCollection. + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AssetFilterCollection + * + * @returns {object} metadata of AssetFilterCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'AssetFilterCollection', + type: { + name: 'Composite', + className: 'AssetFilterCollection', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AssetFilterElementType', + type: { + name: 'Composite', + className: 'AssetFilter' + } + } + } + }, + odatanextLink: { + required: false, + serializedName: '@odata\\.nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AssetFilterCollection; diff --git a/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js b/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js new file mode 100644 index 0000000000..df4bd4ee21 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/assetStreamingLocator.js @@ -0,0 +1,123 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Properties of the Streaming Locator. + * + */ +class AssetStreamingLocator { + /** + * Create a AssetStreamingLocator. + * @member {string} [name] Streaming Locator name. + * @member {string} [assetName] Asset Name. + * @member {date} [created] The creation time of the Streaming Locator. + * @member {date} [startTime] The start time of the Streaming Locator. + * @member {date} [endTime] The end time of the Streaming Locator. + * @member {uuid} [streamingLocatorId] StreamingLocatorId of the Streaming + * Locator. + * @member {string} [streamingPolicyName] Name of the Streaming Policy used + * by this Streaming Locator. + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. + */ + constructor() { + } + + /** + * Defines the metadata of AssetStreamingLocator + * + * @returns {object} metadata of AssetStreamingLocator + * + */ + mapper() { + return { + required: false, + serializedName: 'AssetStreamingLocator', + type: { + name: 'Composite', + className: 'AssetStreamingLocator', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + assetName: { + required: false, + readOnly: true, + serializedName: 'assetName', + type: { + name: 'String' + } + }, + created: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'created', + type: { + name: 'DateTime' + } + }, + startTime: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + streamingLocatorId: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'streamingLocatorId', + type: { + name: 'String' + } + }, + streamingPolicyName: { + required: false, + readOnly: true, + serializedName: 'streamingPolicyName', + type: { + name: 'String' + } + }, + defaultContentKeyPolicyName: { + required: false, + readOnly: true, + serializedName: 'defaultContentKeyPolicyName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AssetStreamingLocator; diff --git a/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js b/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js index 5d434bc75a..af9c404eb7 100644 --- a/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/audioAnalyzerPreset.js @@ -25,7 +25,13 @@ class AudioAnalyzerPreset extends models['Preset'] { * @member {string} [audioLanguage] The language for the audio payload in the * input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The * list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', - * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', + * 'hi-IN'. If not specified, automatic language detection would be employed. + * This feature currently supports English, Chinese, French, German, Italian, + * Japanese, Spanish, Russian, and Portuguese. The automatic detection works + * best with audio recordings with clearly discernable speech. If automatic + * detection fails to find the language, transcription would fallback to + * English. */ constructor() { super(); diff --git a/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js b/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js index 4dc1a622eb..3b0aee1b41 100644 --- a/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/builtInStandardEncoderPreset.js @@ -22,7 +22,8 @@ class BuiltInStandardEncoderPreset extends models['Preset'] { /** * Create a BuiltInStandardEncoderPreset. * @member {string} presetName The built-in preset to be used for encoding - * videos. Possible values include: 'AdaptiveStreaming', + * videos. Possible values include: 'H264SingleBitrateSD', + * 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', * 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', * 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' */ @@ -62,7 +63,7 @@ class BuiltInStandardEncoderPreset extends models['Preset'] { serializedName: 'presetName', type: { name: 'Enum', - allowedValues: [ 'AdaptiveStreaming', 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' ] + allowedValues: [ 'H264SingleBitrateSD', 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' ] } } } diff --git a/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js b/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js index 746146424d..fd53711b80 100644 --- a/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/cbcsDrmConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class to specify DRM configurations of CommonEncryptionCbcs scheme in * Streaming Policy diff --git a/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js b/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js index 9423f287aa..71e8e992a5 100644 --- a/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/cencDrmConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class to specify DRM configurations of CommonEncryptionCenc scheme in * Streaming Policy diff --git a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js index 8a3e1ee426..5699c74024 100644 --- a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js +++ b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCbcs.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class for CommonEncryptionCbcs encryption scheme * diff --git a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js index 3b409e61df..8b95457158 100644 --- a/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js +++ b/lib/services/mediaServicesManagement/lib/models/commonEncryptionCenc.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class for envelope encryption scheme * diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js index dd445c3f0d..96cbab4094 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicy.js @@ -70,6 +70,7 @@ class ContentKeyPolicy extends models['ProxyResource'] { }, policyId: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.policyId', type: { @@ -78,6 +79,7 @@ class ContentKeyPolicy extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { @@ -86,6 +88,7 @@ class ContentKeyPolicy extends models['ProxyResource'] { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.lastModified', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js index 1849186b05..6b38bb138f 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyFairPlayConfiguration.js @@ -20,7 +20,8 @@ const models = require('./index'); class ContentKeyPolicyFairPlayConfiguration extends models['ContentKeyPolicyConfiguration'] { /** * Create a ContentKeyPolicyFairPlayConfiguration. - * @member {buffer} ask The key that must be used as FairPlay ASk. + * @member {buffer} ask The key that must be used as FairPlay Application + * Secret key. * @member {string} fairPlayPfxPassword The password encrypting FairPlay * certificate in PKCS 12 (pfx) format. * @member {string} fairPlayPfx The Base64 representation of FairPlay diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js index c3ff325f72..87f967d262 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyOption.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Represents a policy option. * @@ -46,6 +44,7 @@ class ContentKeyPolicyOption { modelProperties: { policyOptionId: { required: false, + nullable: false, readOnly: true, serializedName: 'policyOptionId', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js index 5571cce6e5..52d3eb2f8c 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyLicense.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The PlayReady license * diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js index 6acd466d78..218ccc99c8 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyPlayReadyPlayRight.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Configures the Play Right in the PlayReady license. * diff --git a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js index f6111d3a8c..e02821c4a1 100644 --- a/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js +++ b/lib/services/mediaServicesManagement/lib/models/contentKeyPolicyProperties.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The properties of the Content Key Policy. * @@ -44,6 +42,7 @@ class ContentKeyPolicyProperties { modelProperties: { policyId: { required: false, + nullable: false, readOnly: true, serializedName: 'policyId', type: { @@ -52,6 +51,7 @@ class ContentKeyPolicyProperties { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -60,6 +60,7 @@ class ContentKeyPolicyProperties { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'lastModified', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js b/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js index 2cc9ff86d0..2e32c524b2 100644 --- a/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js +++ b/lib/services/mediaServicesManagement/lib/models/envelopeEncryption.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class for EnvelopeEncryption encryption scheme * diff --git a/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js b/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js new file mode 100644 index 0000000000..a4292b858f --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/filterTrackPropertyCondition.js @@ -0,0 +1,72 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The class to specify one track property condition. + * + */ +class FilterTrackPropertyCondition { + /** + * Create a FilterTrackPropertyCondition. + * @member {string} property The track property type. Possible values + * include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + * @member {string} value The track proprty value. + * @member {string} operation The track property condition operation. + * Possible values include: 'Equal', 'NotEqual' + */ + constructor() { + } + + /** + * Defines the metadata of FilterTrackPropertyCondition + * + * @returns {object} metadata of FilterTrackPropertyCondition + * + */ + mapper() { + return { + required: false, + serializedName: 'FilterTrackPropertyCondition', + type: { + name: 'Composite', + className: 'FilterTrackPropertyCondition', + modelProperties: { + property: { + required: true, + serializedName: 'property', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' ] + } + }, + value: { + required: true, + serializedName: 'value', + type: { + name: 'String' + } + }, + operation: { + required: true, + serializedName: 'operation', + type: { + name: 'Enum', + allowedValues: [ 'Equal', 'NotEqual' ] + } + } + } + } + }; + } +} + +module.exports = FilterTrackPropertyCondition; diff --git a/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js b/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js new file mode 100644 index 0000000000..dbf25b4c31 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/filterTrackSelection.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Representing a list of FilterTrackPropertyConditions to select a track. The + * filters are combined using a logical AND operation. + * + */ +class FilterTrackSelection { + /** + * Create a FilterTrackSelection. + * @member {array} trackSelections The track selections. + */ + constructor() { + } + + /** + * Defines the metadata of FilterTrackSelection + * + * @returns {object} metadata of FilterTrackSelection + * + */ + mapper() { + return { + required: false, + serializedName: 'FilterTrackSelection', + type: { + name: 'Composite', + className: 'FilterTrackSelection', + modelProperties: { + trackSelections: { + required: true, + serializedName: 'trackSelections', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FilterTrackPropertyConditionElementType', + type: { + name: 'Composite', + className: 'FilterTrackPropertyCondition' + } + } + } + } + } + } + }; + } +} + +module.exports = FilterTrackSelection; diff --git a/lib/services/mediaServicesManagement/lib/models/filters.js b/lib/services/mediaServicesManagement/lib/models/filters.js index c2b26955aa..3851a50e6b 100644 --- a/lib/services/mediaServicesManagement/lib/models/filters.js +++ b/lib/services/mediaServicesManagement/lib/models/filters.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes all the filtering operations, such as de-interlacing, rotation * etc. that are to be applied to the input media before encoding. diff --git a/lib/services/mediaServicesManagement/lib/models/firstQuality.js b/lib/services/mediaServicesManagement/lib/models/firstQuality.js new file mode 100644 index 0000000000..e70ed2d75d --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/firstQuality.js @@ -0,0 +1,52 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Filter First Quality + * + */ +class FirstQuality { + /** + * Create a FirstQuality. + * @member {number} bitrate The first quality bitrate. + */ + constructor() { + } + + /** + * Defines the metadata of FirstQuality + * + * @returns {object} metadata of FirstQuality + * + */ + mapper() { + return { + required: false, + serializedName: 'FirstQuality', + type: { + name: 'Composite', + className: 'FirstQuality', + modelProperties: { + bitrate: { + required: true, + serializedName: 'bitrate', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = FirstQuality; diff --git a/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js b/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js index 559fa97a4f..f727f4ab2d 100644 --- a/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/iPAccessControl.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The IP access control. * diff --git a/lib/services/mediaServicesManagement/lib/models/index.d.ts b/lib/services/mediaServicesManagement/lib/models/index.d.ts index 39cccc113f..eeb96c7098 100644 --- a/lib/services/mediaServicesManagement/lib/models/index.d.ts +++ b/lib/services/mediaServicesManagement/lib/models/index.d.ts @@ -16,6 +16,179 @@ export { BaseResource } from 'ms-rest-azure'; export { CloudError } from 'ms-rest-azure'; +/** + * @class + * Initializes a new instance of the PresentationTimeRange class. + * @constructor + * The presentation time range, this is asset related and not recommended for + * Account Filter. + * + * @member {number} startTimestamp The absolute start time boundary. + * @member {number} endTimestamp The absolute end time boundary. + * @member {number} presentationWindowDuration The relative to end sliding + * window. + * @member {number} liveBackoffDuration The relative to end right edge. + * @member {number} timescale The time scale of time stamps. + * @member {boolean} forceEndTimestamp The indicator of forcing exsiting of end + * time stamp. + */ +export interface PresentationTimeRange { + startTimestamp: number; + endTimestamp: number; + presentationWindowDuration: number; + liveBackoffDuration: number; + timescale: number; + forceEndTimestamp: boolean; +} + +/** + * @class + * Initializes a new instance of the FilterTrackPropertyCondition class. + * @constructor + * The class to specify one track property condition. + * + * @member {string} property The track property type. Possible values include: + * 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + * @member {string} value The track proprty value. + * @member {string} operation The track property condition operation. Possible + * values include: 'Equal', 'NotEqual' + */ +export interface FilterTrackPropertyCondition { + property: string; + value: string; + operation: string; +} + +/** + * @class + * Initializes a new instance of the FirstQuality class. + * @constructor + * Filter First Quality + * + * @member {number} bitrate The first quality bitrate. + */ +export interface FirstQuality { + bitrate: number; +} + +/** + * @class + * Initializes a new instance of the FilterTrackSelection class. + * @constructor + * Representing a list of FilterTrackPropertyConditions to select a track. The + * filters are combined using a logical AND operation. + * + * @member {array} trackSelections The track selections. + */ +export interface FilterTrackSelection { + trackSelections: FilterTrackPropertyCondition[]; +} + +/** + * @class + * Initializes a new instance of the Resource class. + * @constructor + * The core properties of ARM resources. + * + * @member {string} [id] Fully qualified resource ID for the resource. + * @member {string} [name] The name of the resource. + * @member {string} [type] The type of the resource. + */ +export interface Resource extends BaseResource { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +/** + * @class + * Initializes a new instance of the ProxyResource class. + * @constructor + * The resource model definition for a ARM proxy resource. + * + */ +export interface ProxyResource extends Resource { +} + +/** + * @class + * Initializes a new instance of the AccountFilter class. + * @constructor + * An Account Filter. + * + * @member {object} [presentationTimeRange] The presentation time range. + * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * time boundary. + * @member {number} [presentationTimeRange.endTimestamp] The absolute end time + * boundary. + * @member {number} [presentationTimeRange.presentationWindowDuration] The + * relative to end sliding window. + * @member {number} [presentationTimeRange.liveBackoffDuration] The relative to + * end right edge. + * @member {number} [presentationTimeRange.timescale] The time scale of time + * stamps. + * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator of + * forcing exsiting of end time stamp. + * @member {object} [firstQuality] The first quality. + * @member {number} [firstQuality.bitrate] The first quality bitrate. + * @member {array} [tracks] The tracks selection conditions. + */ +export interface AccountFilter extends ProxyResource { + presentationTimeRange?: PresentationTimeRange; + firstQuality?: FirstQuality; + tracks?: FilterTrackSelection[]; +} + +/** + * @class + * Initializes a new instance of the ODataError class. + * @constructor + * Information about an error. + * + * @member {string} [code] A language-independent error name. + * @member {string} [message] The error message. + * @member {string} [target] The target of the error (for example, the name of + * the property in error). + * @member {array} [details] The error details. + */ +export interface ODataError { + code?: string; + message?: string; + target?: string; + details?: ODataError[]; +} + +/** + * @class + * Initializes a new instance of the ApiError class. + * @constructor + * The API error. + * + * @member {object} [error] ApiError. The error properties. + * @member {string} [error.code] A language-independent error name. + * @member {string} [error.message] The error message. + * @member {string} [error.target] The target of the error (for example, the + * name of the property in error). + * @member {array} [error.details] The error details. + */ +export interface ApiError { + error?: ODataError; +} + +/** + * @class + * Initializes a new instance of the TrackedResource class. + * @constructor + * The resource model definition for a ARM tracked resource. + * + * @member {object} [tags] Resource tags. + * @member {string} [location] The Azure Region of the resource. + */ +export interface TrackedResource extends Resource { + tags?: { [propertyName: string]: string }; + location?: string; +} + /** * @class * Initializes a new instance of the Provider class. @@ -46,6 +219,73 @@ export interface OperationDisplay { description?: string; } +/** + * @class + * Initializes a new instance of the MetricDimension class. + * @constructor + * A metric dimension. + * + * @member {string} [name] The metric dimension name. + * @member {string} [displayName] The display name for the dimension. + * @member {boolean} [toBeExportedForShoebox] Whether to export metric to + * shoebox. + */ +export interface MetricDimension { + readonly name?: string; + readonly displayName?: string; + readonly toBeExportedForShoebox?: boolean; +} + +/** + * @class + * Initializes a new instance of the Metric class. + * @constructor + * A metric emitted by service. + * + * @member {string} [name] The metric name. + * @member {string} [displayName] The metric display name. + * @member {string} [displayDescription] The metric display description. + * @member {string} [unit] The metric unit. Possible values include: 'Bytes', + * 'Count', 'Milliseconds' + * @member {string} [aggregationType] The metric aggregation type. Possible + * values include: 'Average', 'Count', 'Total' + * @member {array} [dimensions] The metric dimensions. + */ +export interface Metric { + readonly name?: string; + readonly displayName?: string; + readonly displayDescription?: string; + readonly unit?: string; + readonly aggregationType?: string; + readonly dimensions?: MetricDimension[]; +} + +/** + * @class + * Initializes a new instance of the ServiceSpecification class. + * @constructor + * The service metric specifications. + * + * @member {array} [metricSpecifications] List of metric specifications. + */ +export interface ServiceSpecification { + readonly metricSpecifications?: Metric[]; +} + +/** + * @class + * Initializes a new instance of the MetricProperties class. + * @constructor + * Metric properties. + * + * @member {object} [serviceSpecification] The service specifications. + * @member {array} [serviceSpecification.metricSpecifications] List of metric + * specifications. + */ +export interface MetricProperties { + readonly serviceSpecification?: ServiceSpecification; +} + /** * @class * Initializes a new instance of the Operation class. @@ -59,10 +299,18 @@ export interface OperationDisplay { * performed. * @member {string} [display.operation] The operation type. * @member {string} [display.description] The operation description. + * @member {string} [origin] Origin of the operation. + * @member {object} [properties] Operation properties format. + * @member {object} [properties.serviceSpecification] The service + * specifications. + * @member {array} [properties.serviceSpecification.metricSpecifications] List + * of metric specifications. */ export interface Operation { name: string; display?: OperationDisplay; + origin?: string; + properties?: MetricProperties; } /** @@ -123,36 +371,6 @@ export interface SyncStorageKeysInput { id?: string; } -/** - * @class - * Initializes a new instance of the Resource class. - * @constructor - * The core properties of ARM resources. - * - * @member {string} [id] Fully qualified resource ID for the resource. - * @member {string} [name] The name of the resource. - * @member {string} [type] The type of the resource. - */ -export interface Resource extends BaseResource { - readonly id?: string; - readonly name?: string; - readonly type?: string; -} - -/** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor - * The resource model definition for a ARM tracked resource. - * - * @member {object} [tags] Resource tags. - * @member {string} [location] The Azure Region of the resource. - */ -export interface TrackedResource extends Resource { - tags?: { [propertyName: string]: string }; - location?: string; -} - /** * @class * Initializes a new instance of the MediaService class. @@ -183,88 +401,103 @@ export interface SubscriptionMediaService extends TrackedResource { /** * @class - * Initializes a new instance of the ODataError class. + * Initializes a new instance of the CheckNameAvailabilityInput class. * @constructor - * Information about an error. + * The input to the check name availability request. * - * @member {string} [code] A language-independent error name. - * @member {string} [message] The error message. - * @member {string} [target] The target of the error (for example, the name of - * the property in error). - * @member {array} [details] The error details. + * @member {string} [name] The account name. + * @member {string} [type] The account type. For a Media Services account, this + * should be 'MediaServices'. */ -export interface ODataError { - code?: string; - message?: string; - target?: string; - details?: ODataError[]; +export interface CheckNameAvailabilityInput { + name?: string; + type?: string; } /** * @class - * Initializes a new instance of the ApiError class. + * Initializes a new instance of the AssetContainerSas class. * @constructor - * The API error. + * The Asset Storage container SAS URLs. * - * @member {object} [error] The error properties. - * @member {string} [error.code] A language-independent error name. - * @member {string} [error.message] The error message. - * @member {string} [error.target] The target of the error (for example, the - * name of the property in error). - * @member {array} [error.details] The error details. + * @member {array} [assetContainerSasUrls] The list of Asset container SAS + * URLs. */ -export interface ApiError { - error?: ODataError; +export interface AssetContainerSas { + assetContainerSasUrls?: string[]; } /** * @class - * Initializes a new instance of the CheckNameAvailabilityInput class. + * Initializes a new instance of the AssetFileEncryptionMetadata class. * @constructor - * The input to the check name availability request. + * The Asset File Storage encryption metadata. * - * @member {string} [name] The account name. - * @member {string} [type] The account type. For a Media Services account, this - * should be 'MediaServices'. + * @member {string} [initializationVector] The Asset File initialization + * vector. + * @member {string} [assetFileName] The Asset File name. + * @member {uuid} assetFileId The Asset File Id. */ -export interface CheckNameAvailabilityInput { - name?: string; - type?: string; +export interface AssetFileEncryptionMetadata { + initializationVector?: string; + assetFileName?: string; + assetFileId: string; } /** * @class - * Initializes a new instance of the ProxyResource class. + * Initializes a new instance of the StorageEncryptedAssetDecryptionData class. * @constructor - * The resource model definition for a ARM proxy resource. + * Data needed to decrypt asset files encrypted with legacy storage encryption. * + * @member {buffer} [key] The Asset File storage encryption key. + * @member {array} [assetFileEncryptionMetadata] Asset File encryption + * metadata. */ -export interface ProxyResource extends Resource { +export interface StorageEncryptedAssetDecryptionData { + key?: Buffer; + assetFileEncryptionMetadata?: AssetFileEncryptionMetadata[]; } /** * @class - * Initializes a new instance of the AssetContainerSas class. + * Initializes a new instance of the AssetStreamingLocator class. * @constructor - * The Asset Storage container SAS URLs. + * Properties of the Streaming Locator. * - * @member {array} [assetContainerSasUrls] The list of Asset container SAS - * URLs. + * @member {string} [name] Streaming Locator name. + * @member {string} [assetName] Asset Name. + * @member {date} [created] The creation time of the Streaming Locator. + * @member {date} [startTime] The start time of the Streaming Locator. + * @member {date} [endTime] The end time of the Streaming Locator. + * @member {uuid} [streamingLocatorId] StreamingLocatorId of the Streaming + * Locator. + * @member {string} [streamingPolicyName] Name of the Streaming Policy used by + * this Streaming Locator. + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. */ -export interface AssetContainerSas { - assetContainerSasUrls?: string[]; +export interface AssetStreamingLocator { + readonly name?: string; + readonly assetName?: string; + readonly created?: Date; + readonly startTime?: Date; + readonly endTime?: Date; + readonly streamingLocatorId?: string; + readonly streamingPolicyName?: string; + readonly defaultContentKeyPolicyName?: string; } /** * @class - * Initializes a new instance of the AssetStorageEncryptionKey class. + * Initializes a new instance of the ListStreamingLocatorsResponse class. * @constructor - * The Asset Storage encryption key. + * The Streaming Locators associated with this Asset. * - * @member {string} [storageEncryptionKey] The Asset storage encryption key. + * @member {array} [streamingLocators] The list of Streaming Locators. */ -export interface AssetStorageEncryptionKey { - storageEncryptionKey?: string; +export interface ListStreamingLocatorsResponse { + readonly streamingLocators?: AssetStreamingLocator[]; } /** @@ -295,11 +528,40 @@ export interface Asset extends ProxyResource { readonly storageEncryptionFormat?: string; } +/** + * @class + * Initializes a new instance of the AssetFilter class. + * @constructor + * An Asset Filter. + * + * @member {object} [presentationTimeRange] The presentation time range. + * @member {number} [presentationTimeRange.startTimestamp] The absolute start + * time boundary. + * @member {number} [presentationTimeRange.endTimestamp] The absolute end time + * boundary. + * @member {number} [presentationTimeRange.presentationWindowDuration] The + * relative to end sliding window. + * @member {number} [presentationTimeRange.liveBackoffDuration] The relative to + * end right edge. + * @member {number} [presentationTimeRange.timescale] The time scale of time + * stamps. + * @member {boolean} [presentationTimeRange.forceEndTimestamp] The indicator of + * forcing exsiting of end time stamp. + * @member {object} [firstQuality] The first quality. + * @member {number} [firstQuality.bitrate] The first quality bitrate. + * @member {array} [tracks] The tracks selection conditions. + */ +export interface AssetFilter extends ProxyResource { + presentationTimeRange?: PresentationTimeRange; + firstQuality?: FirstQuality; + tracks?: FilterTrackSelection[]; +} + /** * @class * Initializes a new instance of the ListContainerSasInput class. * @constructor - * The parameters to the list SAS requet. + * The parameters to the list SAS request. * * @member {string} [permissions] The permissions to set on the SAS URL. * Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' @@ -692,7 +954,8 @@ export interface ContentKeyPolicyPlayReadyConfiguration extends ContentKeyPolicy * @constructor * Specifies a configuration for FairPlay licenses. * - * @member {buffer} ask The key that must be used as FairPlay ASk. + * @member {buffer} ask The key that must be used as FairPlay Application + * Secret key. * @member {string} fairPlayPfxPassword The password encrypting FairPlay * certificate in PKCS 12 (pfx) format. * @member {string} fairPlayPfx The Base64 representation of FairPlay @@ -842,7 +1105,13 @@ export interface AacAudio extends Audio { * @member {string} [audioLanguage] The language for the audio payload in the * input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The * list of supported languages are, 'en-US', 'en-GB', 'es-ES', 'es-MX', - * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN'. + * 'fr-FR', 'it-IT', 'ja-JP', 'pt-BR', 'zh-CN', 'de-DE', 'ar-EG', 'ru-RU', + * 'hi-IN'. If not specified, automatic language detection would be employed. + * This feature currently supports English, Chinese, French, German, Italian, + * Japanese, Spanish, Russian, and Portuguese. The automatic detection works + * best with audio recordings with clearly discernable speech. If automatic + * detection fails to find the language, transcription would fallback to + * English. */ export interface AudioAnalyzerPreset extends Preset { audioLanguage?: string; @@ -1327,9 +1596,10 @@ export interface PngImage extends Image { * Encoder. * * @member {string} presetName The built-in preset to be used for encoding - * videos. Possible values include: 'AdaptiveStreaming', 'AACGoodQualityAudio', - * 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', - * 'H264MultipleBitrateSD' + * videos. Possible values include: 'H264SingleBitrateSD', + * 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', + * 'AACGoodQualityAudio', 'H264MultipleBitrate1080p', + * 'H264MultipleBitrate720p', 'H264MultipleBitrateSD' */ export interface BuiltInStandardEncoderPreset extends Preset { presetName: string; @@ -1386,11 +1656,14 @@ export interface StandardEncoderPreset extends Preset { * A video analyzer preset that extracts insights (rich metadata) from both * audio and video, and outputs a JSON format file. * - * @member {boolean} [audioInsightsOnly] Whether to only extract audio insights - * when processing a video file. + * @member {string} [insightsToExtract] The type of insights to be extracted. + * If not set then based on the content the type will selected. If the content + * is audi only then only audio insights are extraced and if it is video only. + * Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', + * 'AllInsights' */ export interface VideoAnalyzerPreset extends AudioAnalyzerPreset { - audioInsightsOnly?: boolean; + insightsToExtract?: string; } /** @@ -1457,7 +1730,9 @@ export interface VideoOverlay extends Overlay { * @member {string} [onError] 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 - * default is stop. Possible values include: 'StopProcessingJob', 'ContinueJob' + * overall Job state will not reflect failures of outputs that are specified + * with 'ContinueJob'. The default is 'StopProcessingJob'. Possible values + * include: 'StopProcessingJob', 'ContinueJob' * @member {string} [relativePriority] 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. @@ -1504,16 +1779,9 @@ export interface Transform extends ProxyResource { * @constructor * Base class for inputs to a Job. * - * @member {string} [label] A label that is assigned to a JobInput, 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'. * @member {string} odatatype Polymorphic Discriminator */ export interface JobInput { - label?: string; odatatype: string; } @@ -1524,9 +1792,16 @@ export interface JobInput { * Represents input files for a Job. * * @member {array} [files] List of files. Required for JobInputHttp. + * @member {string} [label] 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'. */ export interface JobInputClip extends JobInput { files?: string[]; + label?: string; } /** @@ -1636,15 +1911,28 @@ export interface JobError { * values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', * 'Queued', 'Scheduled' * @member {number} [progress] 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 + * 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. + * @member {string} [label] 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. * @member {string} odatatype Polymorphic Discriminator */ export interface JobOutput { readonly error?: JobError; readonly state?: string; readonly progress?: number; + label?: string; odatatype: string; } @@ -1675,12 +1963,6 @@ export interface JobOutputAsset extends JobOutput { * @member {string} [description] Optional customer supplied description of the * Job. * @member {object} input The inputs for the Job. - * @member {string} [input.label] A label that is assigned to a JobInput, 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'. * @member {string} [input.odatatype] Polymorphic Discriminator * @member {date} [lastModified] The UTC date and time when the Job was last * updated, in 'YYYY-MM-DDThh:mm:ssZ' format. @@ -1689,7 +1971,7 @@ export interface JobOutputAsset extends JobOutput { * Higher priority jobs are processed before lower priority jobs. If not set, * the default is normal. Possible values include: 'Low', 'Normal', 'High' * @member {object} [correlationData] Customer provided correlation data that - * will be returned in Job completed events. + * will be returned in Job and JobOutput state events. */ export interface Job extends ProxyResource { readonly created?: Date; @@ -2205,7 +2487,8 @@ export interface StreamingPolicy extends ProxyResource { * @member {string} [type] Encryption type of Content Key. Possible values * include: 'CommonEncryptionCenc', 'CommonEncryptionCbcs', * 'EnvelopeEncryption' - * @member {string} [label] Label of Content Key + * @member {string} [labelReferenceInStreamingPolicy] Label of Content Key as + * specified in the Streaming Policy * @member {string} [value] Value of of Content Key * @member {string} [policyName] ContentKeyPolicy used by Content Key * @member {array} [tracks] Tracks which use this Content Key @@ -2213,10 +2496,10 @@ export interface StreamingPolicy extends ProxyResource { export interface StreamingLocatorContentKey { id: string; readonly type?: string; - label?: string; + labelReferenceInStreamingPolicy?: string; value?: string; readonly policyName?: string; - tracks?: TrackSelection[]; + readonly tracks?: TrackSelection[]; } /** @@ -2274,26 +2557,24 @@ export interface ListPathsResponse { * A Streaming Locator resource * * @member {string} assetName Asset Name - * @member {date} [created] Creation time of Streaming Locator - * @member {date} [startTime] StartTime of Streaming Locator - * @member {date} [endTime] EndTime of Streaming Locator - * @member {uuid} [streamingLocatorId] StreamingLocatorId of Streaming Locator - * @member {string} streamingPolicyName Streaming policy name used by this - * streaming locator. Either specify the name of streaming policy you created - * or use one of the predefined streaming polices. The predefined streaming - * policies available are: 'Predefined_DownloadOnly', + * @member {date} [created] The creation time of the Streaming Locator. + * @member {date} [startTime] The start time of the Streaming Locator. + * @member {date} [endTime] The end time of the Streaming Locator. + * @member {uuid} [streamingLocatorId] The StreamingLocatorId of the Streaming + * Locator. + * @member {string} streamingPolicyName Name of the Streaming Policy used by + * this Streaming Locator. Either specify the name of Streaming Policy you + * created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' - * @member {string} [defaultContentKeyPolicyName] Default ContentKeyPolicy used - * by this Streaming Locator - * @member {array} [contentKeys] ContentKeys used by this Streaming Locator - * @member {string} [alternativeMediaId] An Alternative Media Identifier - * associated with the StreamingLocator. This identifier can be used to - * distinguish different StreamingLocators for the same Asset for authorization - * purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. + * @member {array} [contentKeys] The ContentKeys used by this Streaming + * Locator. + * @member {string} [alternativeMediaId] Alternative Media ID of this Streaming + * Locator */ export interface StreamingLocator extends ProxyResource { assetName: string; @@ -2331,7 +2612,8 @@ export interface Hls { * @member {moment.duration} archiveWindowLength ISO 8601 timespan duration of * the archive window length. This is duration that customer want to retain the * recorded content. - * @member {string} [manifestName] The manifest file name. + * @member {string} [manifestName] The manifest file name. If not provided, + * the service will generate one automatically. * @member {object} [hls] The HLS configuration. * @member {number} [hls.fragmentsPerTsSegment] The amount of fragments per * HTTP Live Streaming (HLS) segment. @@ -2371,26 +2653,6 @@ export interface LiveEventEndpoint { url?: string; } -/** - * @class - * Initializes a new instance of the LiveEventInput class. - * @constructor - * The Live Event input. - * - * @member {string} streamingProtocol The streaming protocol for the Live - * Event. Possible values include: 'FragmentedMP4', 'RTMP' - * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of - * the key frame interval duration. - * @member {string} [accessToken] The access token. - * @member {array} [endpoints] The input endpoints for the Live Event. - */ -export interface LiveEventInput { - streamingProtocol: string; - keyFrameIntervalDuration?: string; - accessToken?: string; - endpoints?: LiveEventEndpoint[]; -} - /** * @class * Initializes a new instance of the IPRange class. @@ -2420,6 +2682,46 @@ export interface IPAccessControl { allow?: IPRange[]; } +/** + * @class + * Initializes a new instance of the LiveEventInputAccessControl class. + * @constructor + * The IP access control for Live Event Input. + * + * @member {object} [ip] The IP access control properties. + * @member {array} [ip.allow] The IP allow list. + */ +export interface LiveEventInputAccessControl { + ip?: IPAccessControl; +} + +/** + * @class + * Initializes a new instance of the LiveEventInput class. + * @constructor + * The Live Event input. + * + * @member {string} streamingProtocol The streaming protocol for the Live + * Event. This is specified at creation time and cannot be updated. Possible + * values include: 'FragmentedMP4', 'RTMP' + * @member {object} [accessControl] The access control for LiveEvent Input. + * @member {object} [accessControl.ip] The IP access control properties. + * @member {array} [accessControl.ip.allow] The IP allow list. + * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of + * the key frame interval duration. + * @member {string} [accessToken] A unique identifier for a stream. This can + * be specified at creation time but cannot be updated. If omitted, the + * service will generate a unique value. + * @member {array} [endpoints] The input endpoints for the Live Event. + */ +export interface LiveEventInput { + streamingProtocol: string; + accessControl?: LiveEventInputAccessControl; + keyFrameIntervalDuration?: string; + accessToken?: string; + endpoints?: LiveEventEndpoint[]; +} + /** * @class * Initializes a new instance of the LiveEventPreviewAccessControl class. @@ -2443,14 +2745,20 @@ export interface LiveEventPreviewAccessControl { * @member {object} [accessControl] The access control for LiveEvent preview. * @member {object} [accessControl.ip] The IP access control properties. * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [previewLocator] The preview locator Guid. + * @member {string} [previewLocator] The identifier of the preview locator in + * Guid format. Specifying this at creation time allows the caller to know the + * preview locator url before the event is created. If omitted, the service + * will generate a random identifier. This value cannot be updated once the + * live event is created. * @member {string} [streamingPolicyName] The name of streaming policy used for - * LiveEvent preview + * the LiveEvent preview. This value is specified at creation time and cannot + * be updated. * @member {string} [alternativeMediaId] An Alternative Media Identifier - * associated with the preview url. This identifier can be used to distinguish - * the preview of different live events for authorization purposes in the - * CustomLicenseAcquisitionUrlTemplate or the CustomKeyAcquisitionUrlTemplate - * of the StreamingPolicy specified in the StreamingPolicyName field. + * associated with the StreamingLocator created for the preview. This value is + * specified at creation time and cannot be updated. The identifier can be + * used in the CustomLicenseAcquisitionUrlTemplate or the + * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the + * StreamingPolicyName field. */ export interface LiveEventPreview { endpoints?: LiveEventEndpoint[]; @@ -2466,9 +2774,11 @@ export interface LiveEventPreview { * @constructor * The Live Event encoding. * - * @member {string} [encodingType] The encoding type for Live Event. Possible - * values include: 'None', 'Basic' - * @member {string} [presetName] The encoding preset name. + * @member {string} [encodingType] The encoding type for Live Event. This + * value is specified at creation time and cannot be updated. Possible values + * include: 'None', 'Basic' + * @member {string} [presetName] The encoding preset name. This value is + * specified at creation time and cannot be updated. */ export interface LiveEventEncoding { encodingType?: string; @@ -2513,10 +2823,17 @@ export interface LiveEventActionInput { * @member {string} [description] The Live Event description. * @member {object} input The Live Event input. * @member {string} [input.streamingProtocol] The streaming protocol for the - * Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * Live Event. This is specified at creation time and cannot be updated. + * Possible values include: 'FragmentedMP4', 'RTMP' + * @member {object} [input.accessControl] The access control for LiveEvent + * Input. + * @member {object} [input.accessControl.ip] The IP access control properties. + * @member {array} [input.accessControl.ip.allow] The IP allow list. * @member {string} [input.keyFrameIntervalDuration] ISO 8601 timespan duration * of the key frame interval duration. - * @member {string} [input.accessToken] The access token. + * @member {string} [input.accessToken] A unique identifier for a stream. This + * can be specified at creation time but cannot be updated. If omitted, the + * service will generate a unique value. * @member {array} [input.endpoints] The input endpoints for the Live Event. * @member {object} [preview] The Live Event preview. * @member {array} [preview.endpoints] The endpoints for preview. @@ -2525,19 +2842,26 @@ export interface LiveEventActionInput { * @member {object} [preview.accessControl.ip] The IP access control * properties. * @member {array} [preview.accessControl.ip.allow] The IP allow list. - * @member {string} [preview.previewLocator] The preview locator Guid. + * @member {string} [preview.previewLocator] The identifier of the preview + * locator in Guid format. Specifying this at creation time allows the caller + * to know the preview locator url before the event is created. If omitted, + * the service will generate a random identifier. This value cannot be updated + * once the live event is created. * @member {string} [preview.streamingPolicyName] The name of streaming policy - * used for LiveEvent preview + * used for the LiveEvent preview. This value is specified at creation time + * and cannot be updated. * @member {string} [preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * @member {object} [encoding] The Live Event encoding. * @member {string} [encoding.encodingType] The encoding type for Live Event. - * Possible values include: 'None', 'Basic' - * @member {string} [encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. Possible + * values include: 'None', 'Basic' + * @member {string} [encoding.presetName] The encoding preset name. This value + * is specified at creation time and cannot be updated. * @member {string} [provisioningState] The provisioning state of the Live * Event. * @member {string} [resourceState] The resource state of the Live Event. @@ -2548,8 +2872,10 @@ export interface LiveEventActionInput { * clientaccesspolicy.xml used by Silverlight. * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content of * crossdomain.xml used by Silverlight. - * @member {boolean} [vanityUrl] The Live Event vanity URL flag. - * @member {array} [streamOptions] The stream options. + * @member {boolean} [vanityUrl] Specifies whether to use a vanity url with the + * Live Event. This value is specified at creation time and cannot be updated. + * @member {array} [streamOptions] The options to use for the LiveEvent. This + * value is specified at creation time and cannot be updated. * @member {date} [created] The exact time the Live Event was created. * @member {date} [lastModified] The exact time the Live Event was last * modified. @@ -2576,7 +2902,7 @@ export interface LiveEvent extends TrackedResource { * * @member {string} [identifier] identifier of the key * @member {string} [base64Key] authentication key - * @member {date} [expiration] The exact time the authentication key. + * @member {date} [expiration] The expiration time of the authentication key. */ export interface AkamaiSignatureHeaderAuthenticationKey { identifier?: string; @@ -2620,8 +2946,7 @@ export interface StreamingEndpointAccessControl { * @constructor * scale units definition * - * @member {number} [scaleUnit] ScaleUnit. The scale unit number of the - * StreamingEndpoint. + * @member {number} [scaleUnit] The scale unit number of the StreamingEndpoint. */ export interface StreamingEntityScaleUnit { scaleUnit?: number; @@ -2634,8 +2959,11 @@ export interface StreamingEntityScaleUnit { * The StreamingEndpoint. * * @member {string} [description] The StreamingEndpoint description. - * @member {number} [scaleUnits] The number of scale units. - * @member {string} [availabilitySetName] AvailabilitySet name + * @member {number} scaleUnits The number of scale units. Use the Scale + * operation to adjust this value. + * @member {string} [availabilitySetName] The name of the AvailabilitySet used + * with this StreamingEndpoint for high availability streaming. This value can + * only be set at creation time. * @member {object} [accessControl] The access control definition of the * StreamingEndpoint. * @member {object} [accessControl.akamai] The access control of Akamai @@ -2670,7 +2998,7 @@ export interface StreamingEntityScaleUnit { */ export interface StreamingEndpoint extends TrackedResource { description?: string; - scaleUnits?: number; + scaleUnits: number; availabilitySetName?: string; accessControl?: StreamingEndpointAccessControl; maxCacheAge?: number; @@ -2688,6 +3016,19 @@ export interface StreamingEndpoint extends TrackedResource { } +/** + * @class + * Initializes a new instance of the AccountFilterCollection class. + * @constructor + * A collection of AccountFilter items. + * + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ +export interface AccountFilterCollection extends Array { + odatanextLink?: string; +} + /** * @class * Initializes a new instance of the OperationCollection class. @@ -2740,6 +3081,19 @@ export interface AssetCollection extends Array { odatanextLink?: string; } +/** + * @class + * Initializes a new instance of the AssetFilterCollection class. + * @constructor + * A collection of AssetFilter items. + * + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ +export interface AssetFilterCollection extends Array { + odatanextLink?: string; +} + /** * @class * Initializes a new instance of the ContentKeyPolicyCollection class. diff --git a/lib/services/mediaServicesManagement/lib/models/index.js b/lib/services/mediaServicesManagement/lib/models/index.js index e0cc9a7288..60c890672c 100644 --- a/lib/services/mediaServicesManagement/lib/models/index.js +++ b/lib/services/mediaServicesManagement/lib/models/index.js @@ -18,24 +18,37 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.PresentationTimeRange = require('./presentationTimeRange'); +exports.FilterTrackPropertyCondition = require('./filterTrackPropertyCondition'); +exports.FirstQuality = require('./firstQuality'); +exports.FilterTrackSelection = require('./filterTrackSelection'); +exports.Resource = require('./resource'); +exports.ProxyResource = require('./proxyResource'); +exports.AccountFilter = require('./accountFilter'); +exports.ODataError = require('./oDataError'); +exports.ApiError = require('./apiError'); +exports.TrackedResource = require('./trackedResource'); exports.Provider = require('./provider'); exports.OperationDisplay = require('./operationDisplay'); +exports.MetricDimension = require('./metricDimension'); +exports.Metric = require('./metric'); +exports.ServiceSpecification = require('./serviceSpecification'); +exports.MetricProperties = require('./metricProperties'); exports.Operation = require('./operation'); exports.Location = require('./location'); exports.EntityNameAvailabilityCheckOutput = require('./entityNameAvailabilityCheckOutput'); exports.StorageAccount = require('./storageAccount'); exports.SyncStorageKeysInput = require('./syncStorageKeysInput'); -exports.Resource = require('./resource'); -exports.TrackedResource = require('./trackedResource'); exports.MediaService = require('./mediaService'); exports.SubscriptionMediaService = require('./subscriptionMediaService'); -exports.ODataError = require('./oDataError'); -exports.ApiError = require('./apiError'); exports.CheckNameAvailabilityInput = require('./checkNameAvailabilityInput'); -exports.ProxyResource = require('./proxyResource'); exports.AssetContainerSas = require('./assetContainerSas'); -exports.AssetStorageEncryptionKey = require('./assetStorageEncryptionKey'); +exports.AssetFileEncryptionMetadata = require('./assetFileEncryptionMetadata'); +exports.StorageEncryptedAssetDecryptionData = require('./storageEncryptedAssetDecryptionData'); +exports.AssetStreamingLocator = require('./assetStreamingLocator'); +exports.ListStreamingLocatorsResponse = require('./listStreamingLocatorsResponse'); exports.Asset = require('./asset'); +exports.AssetFilter = require('./assetFilter'); exports.ListContainerSasInput = require('./listContainerSasInput'); exports.ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction = require('./contentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction'); exports.ContentKeyPolicyPlayReadyContentKeyLocation = require('./contentKeyPolicyPlayReadyContentKeyLocation'); @@ -131,9 +144,10 @@ exports.StreamingLocator = require('./streamingLocator'); exports.Hls = require('./hls'); exports.LiveOutput = require('./liveOutput'); exports.LiveEventEndpoint = require('./liveEventEndpoint'); -exports.LiveEventInput = require('./liveEventInput'); exports.IPRange = require('./iPRange'); exports.IPAccessControl = require('./iPAccessControl'); +exports.LiveEventInputAccessControl = require('./liveEventInputAccessControl'); +exports.LiveEventInput = require('./liveEventInput'); exports.LiveEventPreviewAccessControl = require('./liveEventPreviewAccessControl'); exports.LiveEventPreview = require('./liveEventPreview'); exports.LiveEventEncoding = require('./liveEventEncoding'); @@ -145,10 +159,12 @@ exports.AkamaiAccessControl = require('./akamaiAccessControl'); exports.StreamingEndpointAccessControl = require('./streamingEndpointAccessControl'); exports.StreamingEntityScaleUnit = require('./streamingEntityScaleUnit'); exports.StreamingEndpoint = require('./streamingEndpoint'); +exports.AccountFilterCollection = require('./accountFilterCollection'); exports.OperationCollection = require('./operationCollection'); exports.MediaServiceCollection = require('./mediaServiceCollection'); exports.SubscriptionMediaServiceCollection = require('./subscriptionMediaServiceCollection'); exports.AssetCollection = require('./assetCollection'); +exports.AssetFilterCollection = require('./assetFilterCollection'); exports.ContentKeyPolicyCollection = require('./contentKeyPolicyCollection'); exports.TransformCollection = require('./transformCollection'); exports.JobCollection = require('./jobCollection'); diff --git a/lib/services/mediaServicesManagement/lib/models/job.js b/lib/services/mediaServicesManagement/lib/models/job.js index aa75cc7f8e..ac3677dc6e 100644 --- a/lib/services/mediaServicesManagement/lib/models/job.js +++ b/lib/services/mediaServicesManagement/lib/models/job.js @@ -29,12 +29,6 @@ class Job extends models['ProxyResource'] { * @member {string} [description] Optional customer supplied description of * the Job. * @member {object} input The inputs for the Job. - * @member {string} [input.label] A label that is assigned to a JobInput, - * 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'. * @member {string} [input.odatatype] Polymorphic Discriminator * @member {date} [lastModified] The UTC date and time when the Job was last * updated, in 'YYYY-MM-DDThh:mm:ssZ' format. @@ -44,7 +38,7 @@ class Job extends models['ProxyResource'] { * If not set, the default is normal. Possible values include: 'Low', * 'Normal', 'High' * @member {object} [correlationData] Customer provided correlation data that - * will be returned in Job completed events. + * will be returned in Job and JobOutput state events. */ constructor() { super(); @@ -90,6 +84,7 @@ class Job extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { @@ -98,6 +93,7 @@ class Job extends models['ProxyResource'] { }, state: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.state', type: { @@ -127,6 +123,7 @@ class Job extends models['ProxyResource'] { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.lastModified', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/jobError.js b/lib/services/mediaServicesManagement/lib/models/jobError.js index 4b681fe48b..57c7703a42 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobError.js +++ b/lib/services/mediaServicesManagement/lib/models/jobError.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Details of JobOutput errors. * @@ -53,6 +51,7 @@ class JobError { modelProperties: { code: { required: false, + nullable: false, readOnly: true, serializedName: 'code', type: { @@ -70,6 +69,7 @@ class JobError { }, category: { required: false, + nullable: false, readOnly: true, serializedName: 'category', type: { @@ -79,6 +79,7 @@ class JobError { }, retry: { required: false, + nullable: false, readOnly: true, serializedName: 'retry', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/jobInput.js b/lib/services/mediaServicesManagement/lib/models/jobInput.js index bf36df2331..97d4988679 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInput.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInput.js @@ -17,12 +17,6 @@ class JobInput { /** * Create a JobInput. - * @member {string} [label] A label that is assigned to a JobInput, 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'. * @member {string} odatatype Polymorphic Discriminator */ constructor() { @@ -47,13 +41,6 @@ class JobInput { uberParent: 'JobInput', className: 'JobInput', modelProperties: { - label: { - required: false, - serializedName: 'label', - type: { - name: 'String' - } - }, odatatype: { required: true, serializedName: '@odata\\.type', diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js b/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js index 6b33b9e85c..d86b44a912 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputAsset.js @@ -45,13 +45,6 @@ class JobInputAsset extends models['JobInputClip'] { uberParent: 'JobInput', className: 'JobInputAsset', modelProperties: { - label: { - required: false, - serializedName: 'label', - type: { - name: 'String' - } - }, odatatype: { required: true, serializedName: '@odata\\.type', @@ -74,6 +67,13 @@ class JobInputAsset extends models['JobInputClip'] { } } }, + label: { + required: false, + serializedName: 'label', + type: { + name: 'String' + } + }, assetName: { required: true, serializedName: 'assetName', diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputClip.js b/lib/services/mediaServicesManagement/lib/models/jobInputClip.js index dfaf14e73c..d97e599b9e 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputClip.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputClip.js @@ -21,6 +21,12 @@ class JobInputClip extends models['JobInput'] { /** * Create a JobInputClip. * @member {array} [files] List of files. Required for JobInputHttp. + * @member {string} [label] 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'. */ constructor() { super(); @@ -45,13 +51,6 @@ class JobInputClip extends models['JobInput'] { uberParent: 'JobInput', className: 'JobInputClip', modelProperties: { - label: { - required: false, - serializedName: 'label', - type: { - name: 'String' - } - }, odatatype: { required: true, serializedName: '@odata\\.type', @@ -73,6 +72,13 @@ class JobInputClip extends models['JobInput'] { } } } + }, + label: { + required: false, + serializedName: 'label', + type: { + name: 'String' + } } } } diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js b/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js index a81c2aad69..55958106d0 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputHttp.js @@ -47,13 +47,6 @@ class JobInputHttp extends models['JobInputClip'] { uberParent: 'JobInput', className: 'JobInputHttp', modelProperties: { - label: { - required: false, - serializedName: 'label', - type: { - name: 'String' - } - }, odatatype: { required: true, serializedName: '@odata\\.type', @@ -76,6 +69,13 @@ class JobInputHttp extends models['JobInputClip'] { } } }, + label: { + required: false, + serializedName: 'label', + type: { + name: 'String' + } + }, baseUri: { required: false, serializedName: 'baseUri', diff --git a/lib/services/mediaServicesManagement/lib/models/jobInputs.js b/lib/services/mediaServicesManagement/lib/models/jobInputs.js index 3e8d03f276..2ae98fa5de 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobInputs.js +++ b/lib/services/mediaServicesManagement/lib/models/jobInputs.js @@ -45,13 +45,6 @@ class JobInputs extends models['JobInput'] { uberParent: 'JobInput', className: 'JobInputs', modelProperties: { - label: { - required: false, - serializedName: 'label', - type: { - name: 'String' - } - }, odatatype: { required: true, serializedName: '@odata\\.type', diff --git a/lib/services/mediaServicesManagement/lib/models/jobOutput.js b/lib/services/mediaServicesManagement/lib/models/jobOutput.js index fa8f6ea839..6b5699f157 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/jobOutput.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes all the properties of a JobOutput. * @@ -40,9 +38,21 @@ class JobOutput { * values include: 'Canceled', 'Canceling', 'Error', 'Finished', * 'Processing', 'Queued', 'Scheduled' * @member {number} [progress] 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 + * 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. + * @member {string} [label] 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. * @member {string} odatatype Polymorphic Discriminator */ constructor() { @@ -78,6 +88,7 @@ class JobOutput { }, state: { required: false, + nullable: false, readOnly: true, serializedName: 'state', type: { @@ -87,12 +98,20 @@ class JobOutput { }, progress: { required: false, + nullable: false, readOnly: true, serializedName: 'progress', type: { name: 'Number' } }, + label: { + required: false, + serializedName: 'label', + type: { + name: 'String' + } + }, odatatype: { required: true, serializedName: '@odata\\.type', diff --git a/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js b/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js index 15747d6bb4..98b2b3ee0c 100644 --- a/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js +++ b/lib/services/mediaServicesManagement/lib/models/jobOutputAsset.js @@ -56,6 +56,7 @@ class JobOutputAsset extends models['JobOutput'] { }, state: { required: false, + nullable: false, readOnly: true, serializedName: 'state', type: { @@ -65,12 +66,20 @@ class JobOutputAsset extends models['JobOutput'] { }, progress: { required: false, + nullable: false, readOnly: true, serializedName: 'progress', type: { name: 'Number' } }, + label: { + required: false, + serializedName: 'label', + type: { + name: 'String' + } + }, odatatype: { required: true, serializedName: '@odata\\.type', diff --git a/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js b/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js index 856a7ed981..b57953d33a 100644 --- a/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js +++ b/lib/services/mediaServicesManagement/lib/models/listContainerSasInput.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The parameters to the list SAS requet. + * The parameters to the list SAS request. * */ class ListContainerSasInput { diff --git a/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js b/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js index baea4ff95e..de0d1fdb0f 100644 --- a/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js +++ b/lib/services/mediaServicesManagement/lib/models/listContentKeysResponse.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class of response for listContentKeys action * diff --git a/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js b/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js index 6810a92fc3..15c813856e 100644 --- a/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js +++ b/lib/services/mediaServicesManagement/lib/models/listPathsResponse.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class of response for listPaths action * diff --git a/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js b/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js new file mode 100644 index 0000000000..9533ab636c --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/listStreamingLocatorsResponse.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The Streaming Locators associated with this Asset. + * + */ +class ListStreamingLocatorsResponse { + /** + * Create a ListStreamingLocatorsResponse. + * @member {array} [streamingLocators] The list of Streaming Locators. + */ + constructor() { + } + + /** + * Defines the metadata of ListStreamingLocatorsResponse + * + * @returns {object} metadata of ListStreamingLocatorsResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ListStreamingLocatorsResponse', + type: { + name: 'Composite', + className: 'ListStreamingLocatorsResponse', + modelProperties: { + streamingLocators: { + required: false, + readOnly: true, + serializedName: 'streamingLocators', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AssetStreamingLocatorElementType', + type: { + name: 'Composite', + className: 'AssetStreamingLocator' + } + } + } + } + } + } + }; + } +} + +module.exports = ListStreamingLocatorsResponse; diff --git a/lib/services/mediaServicesManagement/lib/models/liveEvent.js b/lib/services/mediaServicesManagement/lib/models/liveEvent.js index c32101e92d..c5a0e1b180 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEvent.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEvent.js @@ -23,10 +23,18 @@ class LiveEvent extends models['TrackedResource'] { * @member {string} [description] The Live Event description. * @member {object} input The Live Event input. * @member {string} [input.streamingProtocol] The streaming protocol for the - * Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * Live Event. This is specified at creation time and cannot be updated. + * Possible values include: 'FragmentedMP4', 'RTMP' + * @member {object} [input.accessControl] The access control for LiveEvent + * Input. + * @member {object} [input.accessControl.ip] The IP access control + * properties. + * @member {array} [input.accessControl.ip.allow] The IP allow list. * @member {string} [input.keyFrameIntervalDuration] ISO 8601 timespan * duration of the key frame interval duration. - * @member {string} [input.accessToken] The access token. + * @member {string} [input.accessToken] A unique identifier for a stream. + * This can be specified at creation time but cannot be updated. If omitted, + * the service will generate a unique value. * @member {array} [input.endpoints] The input endpoints for the Live Event. * @member {object} [preview] The Live Event preview. * @member {array} [preview.endpoints] The endpoints for preview. @@ -35,19 +43,26 @@ class LiveEvent extends models['TrackedResource'] { * @member {object} [preview.accessControl.ip] The IP access control * properties. * @member {array} [preview.accessControl.ip.allow] The IP allow list. - * @member {string} [preview.previewLocator] The preview locator Guid. + * @member {string} [preview.previewLocator] The identifier of the preview + * locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * @member {string} [preview.streamingPolicyName] The name of streaming - * policy used for LiveEvent preview + * policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * @member {string} [preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used - * to distinguish the preview of different live events for authorization - * purposes in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * @member {object} [encoding] The Live Event encoding. * @member {string} [encoding.encodingType] The encoding type for Live Event. - * Possible values include: 'None', 'Basic' - * @member {string} [encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. Possible + * values include: 'None', 'Basic' + * @member {string} [encoding.presetName] The encoding preset name. This + * value is specified at creation time and cannot be updated. * @member {string} [provisioningState] The provisioning state of the Live * Event. * @member {string} [resourceState] The resource state of the Live Event. @@ -58,8 +73,11 @@ class LiveEvent extends models['TrackedResource'] { * of clientaccesspolicy.xml used by Silverlight. * @member {string} [crossSiteAccessPolicies.crossDomainPolicy] The content * of crossdomain.xml used by Silverlight. - * @member {boolean} [vanityUrl] The Live Event vanity URL flag. - * @member {array} [streamOptions] The stream options. + * @member {boolean} [vanityUrl] Specifies whether to use a vanity url with + * the Live Event. This value is specified at creation time and cannot be + * updated. + * @member {array} [streamOptions] The options to use for the LiveEvent. + * This value is specified at creation time and cannot be updated. * @member {date} [created] The exact time the Live Event was created. * @member {date} [lastModified] The exact time the Live Event was last * modified. diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js b/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js index a14a71279a..56714adbf0 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventEncoding.js @@ -17,9 +17,11 @@ class LiveEventEncoding { /** * Create a LiveEventEncoding. - * @member {string} [encodingType] The encoding type for Live Event. Possible - * values include: 'None', 'Basic' - * @member {string} [presetName] The encoding preset name. + * @member {string} [encodingType] The encoding type for Live Event. This + * value is specified at creation time and cannot be updated. Possible values + * include: 'None', 'Basic' + * @member {string} [presetName] The encoding preset name. This value is + * specified at creation time and cannot be updated. */ constructor() { } diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventInput.js b/lib/services/mediaServicesManagement/lib/models/liveEventInput.js index cef67e5b23..94c2bb4209 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventInput.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventInput.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The Live Event input. * @@ -20,10 +18,16 @@ class LiveEventInput { /** * Create a LiveEventInput. * @member {string} streamingProtocol The streaming protocol for the Live - * Event. Possible values include: 'FragmentedMP4', 'RTMP' + * Event. This is specified at creation time and cannot be updated. Possible + * values include: 'FragmentedMP4', 'RTMP' + * @member {object} [accessControl] The access control for LiveEvent Input. + * @member {object} [accessControl.ip] The IP access control properties. + * @member {array} [accessControl.ip.allow] The IP allow list. * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of * the key frame interval duration. - * @member {string} [accessToken] The access token. + * @member {string} [accessToken] A unique identifier for a stream. This can + * be specified at creation time but cannot be updated. If omitted, the + * service will generate a unique value. * @member {array} [endpoints] The input endpoints for the Live Event. */ constructor() { @@ -51,6 +55,14 @@ class LiveEventInput { allowedValues: [ 'FragmentedMP4', 'RTMP' ] } }, + accessControl: { + required: false, + serializedName: 'accessControl', + type: { + name: 'Composite', + className: 'LiveEventInputAccessControl' + } + }, keyFrameIntervalDuration: { required: false, serializedName: 'keyFrameIntervalDuration', diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js b/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js new file mode 100644 index 0000000000..a3d4514244 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/liveEventInputAccessControl.js @@ -0,0 +1,54 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The IP access control for Live Event Input. + * + */ +class LiveEventInputAccessControl { + /** + * Create a LiveEventInputAccessControl. + * @member {object} [ip] The IP access control properties. + * @member {array} [ip.allow] The IP allow list. + */ + constructor() { + } + + /** + * Defines the metadata of LiveEventInputAccessControl + * + * @returns {object} metadata of LiveEventInputAccessControl + * + */ + mapper() { + return { + required: false, + serializedName: 'LiveEventInputAccessControl', + type: { + name: 'Composite', + className: 'LiveEventInputAccessControl', + modelProperties: { + ip: { + required: false, + serializedName: 'ip', + type: { + name: 'Composite', + className: 'IPAccessControl' + } + } + } + } + }; + } +} + +module.exports = LiveEventInputAccessControl; diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js b/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js index c1fb7acf45..f58b58966e 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventPreview.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The Live Event preview. * @@ -23,13 +21,18 @@ class LiveEventPreview { * @member {object} [accessControl] The access control for LiveEvent preview. * @member {object} [accessControl.ip] The IP access control properties. * @member {array} [accessControl.ip.allow] The IP allow list. - * @member {string} [previewLocator] The preview locator Guid. + * @member {string} [previewLocator] The identifier of the preview locator in + * Guid format. Specifying this at creation time allows the caller to know + * the preview locator url before the event is created. If omitted, the + * service will generate a random identifier. This value cannot be updated + * once the live event is created. * @member {string} [streamingPolicyName] The name of streaming policy used - * for LiveEvent preview + * for the LiveEvent preview. This value is specified at creation time and + * cannot be updated. * @member {string} [alternativeMediaId] An Alternative Media Identifier - * associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization - * purposes in the CustomLicenseAcquisitionUrlTemplate or the + * associated with the StreamingLocator created for the preview. This value + * is specified at creation time and cannot be updated. The identifier can + * be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. */ diff --git a/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js b/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js index c24461ca27..8a8ff759da 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/liveEventPreviewAccessControl.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The IP access control for Live Event preview. * diff --git a/lib/services/mediaServicesManagement/lib/models/liveOutput.js b/lib/services/mediaServicesManagement/lib/models/liveOutput.js index 0c1451f50c..f030de889a 100644 --- a/lib/services/mediaServicesManagement/lib/models/liveOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/liveOutput.js @@ -25,7 +25,8 @@ class LiveOutput extends models['ProxyResource'] { * @member {moment.duration} archiveWindowLength ISO 8601 timespan duration * of the archive window length. This is duration that customer want to * retain the recorded content. - * @member {string} [manifestName] The manifest file name. + * @member {string} [manifestName] The manifest file name. If not provided, + * the service will generate one automatically. * @member {object} [hls] The HLS configuration. * @member {number} [hls.fragmentsPerTsSegment] The amount of fragments per * HTTP Live Streaming (HLS) segment. diff --git a/lib/services/mediaServicesManagement/lib/models/mediaService.js b/lib/services/mediaServicesManagement/lib/models/mediaService.js index 78680b818a..c8988d3532 100644 --- a/lib/services/mediaServicesManagement/lib/models/mediaService.js +++ b/lib/services/mediaServicesManagement/lib/models/mediaService.js @@ -88,6 +88,7 @@ class MediaService extends models['TrackedResource'] { }, mediaServiceId: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.mediaServiceId', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/metric.js b/lib/services/mediaServicesManagement/lib/models/metric.js new file mode 100644 index 0000000000..386eca2813 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/metric.js @@ -0,0 +1,112 @@ +/* + * 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. + */ + +'use strict'; + +/** + * A metric emitted by service. + * + */ +class Metric { + /** + * Create a Metric. + * @member {string} [name] The metric name. + * @member {string} [displayName] The metric display name. + * @member {string} [displayDescription] The metric display description. + * @member {string} [unit] The metric unit. Possible values include: 'Bytes', + * 'Count', 'Milliseconds' + * @member {string} [aggregationType] The metric aggregation type. Possible + * values include: 'Average', 'Count', 'Total' + * @member {array} [dimensions] The metric dimensions. + */ + constructor() { + } + + /** + * Defines the metadata of Metric + * + * @returns {object} metadata of Metric + * + */ + mapper() { + return { + required: false, + serializedName: 'Metric', + type: { + name: 'Composite', + className: 'Metric', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + displayName: { + required: false, + readOnly: true, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + displayDescription: { + required: false, + readOnly: true, + serializedName: 'displayDescription', + type: { + name: 'String' + } + }, + unit: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'unit', + type: { + name: 'Enum', + allowedValues: [ 'Bytes', 'Count', 'Milliseconds' ] + } + }, + aggregationType: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'aggregationType', + type: { + name: 'Enum', + allowedValues: [ 'Average', 'Count', 'Total' ] + } + }, + dimensions: { + required: false, + readOnly: true, + serializedName: 'dimensions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetricDimensionElementType', + type: { + name: 'Composite', + className: 'MetricDimension' + } + } + } + } + } + } + }; + } +} + +module.exports = Metric; diff --git a/lib/services/mediaServicesManagement/lib/models/metricDimension.js b/lib/services/mediaServicesManagement/lib/models/metricDimension.js new file mode 100644 index 0000000000..1071cd15d3 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/metricDimension.js @@ -0,0 +1,73 @@ +/* + * 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. + */ + +'use strict'; + +/** + * A metric dimension. + * + */ +class MetricDimension { + /** + * Create a MetricDimension. + * @member {string} [name] The metric dimension name. + * @member {string} [displayName] The display name for the dimension. + * @member {boolean} [toBeExportedForShoebox] Whether to export metric to + * shoebox. + */ + constructor() { + } + + /** + * Defines the metadata of MetricDimension + * + * @returns {object} metadata of MetricDimension + * + */ + mapper() { + return { + required: false, + serializedName: 'MetricDimension', + type: { + name: 'Composite', + className: 'MetricDimension', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + displayName: { + required: false, + readOnly: true, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + toBeExportedForShoebox: { + required: false, + nullable: false, + readOnly: true, + serializedName: 'toBeExportedForShoebox', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = MetricDimension; diff --git a/lib/services/mediaServicesManagement/lib/models/metricProperties.js b/lib/services/mediaServicesManagement/lib/models/metricProperties.js new file mode 100644 index 0000000000..27dc241252 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/metricProperties.js @@ -0,0 +1,56 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Metric properties. + * + */ +class MetricProperties { + /** + * Create a MetricProperties. + * @member {object} [serviceSpecification] The service specifications. + * @member {array} [serviceSpecification.metricSpecifications] List of metric + * specifications. + */ + constructor() { + } + + /** + * Defines the metadata of MetricProperties + * + * @returns {object} metadata of MetricProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'MetricProperties', + type: { + name: 'Composite', + className: 'MetricProperties', + modelProperties: { + serviceSpecification: { + required: false, + readOnly: true, + serializedName: 'serviceSpecification', + type: { + name: 'Composite', + className: 'ServiceSpecification' + } + } + } + } + }; + } +} + +module.exports = MetricProperties; diff --git a/lib/services/mediaServicesManagement/lib/models/noEncryption.js b/lib/services/mediaServicesManagement/lib/models/noEncryption.js index 4869916258..caccbec6d1 100644 --- a/lib/services/mediaServicesManagement/lib/models/noEncryption.js +++ b/lib/services/mediaServicesManagement/lib/models/noEncryption.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class for NoEncryption scheme * diff --git a/lib/services/mediaServicesManagement/lib/models/oDataError.js b/lib/services/mediaServicesManagement/lib/models/oDataError.js index 71709aaa37..0eff90e910 100644 --- a/lib/services/mediaServicesManagement/lib/models/oDataError.js +++ b/lib/services/mediaServicesManagement/lib/models/oDataError.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Information about an error. * diff --git a/lib/services/mediaServicesManagement/lib/models/operation.js b/lib/services/mediaServicesManagement/lib/models/operation.js index bcdd1b618e..b407d331ee 100644 --- a/lib/services/mediaServicesManagement/lib/models/operation.js +++ b/lib/services/mediaServicesManagement/lib/models/operation.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * An operation. * @@ -26,6 +24,12 @@ class Operation { * performed. * @member {string} [display.operation] The operation type. * @member {string} [display.description] The operation description. + * @member {string} [origin] Origin of the operation. + * @member {object} [properties] Operation properties format. + * @member {object} [properties.serviceSpecification] The service + * specifications. + * @member {array} [properties.serviceSpecification.metricSpecifications] + * List of metric specifications. */ constructor() { } @@ -58,6 +62,21 @@ class Operation { name: 'Composite', className: 'OperationDisplay' } + }, + origin: { + required: false, + serializedName: 'origin', + type: { + name: 'String' + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'MetricProperties' + } } } } diff --git a/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js b/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js new file mode 100644 index 0000000000..cd1039bf4f --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/presentationTimeRange.js @@ -0,0 +1,95 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The presentation time range, this is asset related and not recommended for + * Account Filter. + * + */ +class PresentationTimeRange { + /** + * Create a PresentationTimeRange. + * @member {number} startTimestamp The absolute start time boundary. + * @member {number} endTimestamp The absolute end time boundary. + * @member {number} presentationWindowDuration The relative to end sliding + * window. + * @member {number} liveBackoffDuration The relative to end right edge. + * @member {number} timescale The time scale of time stamps. + * @member {boolean} forceEndTimestamp The indicator of forcing exsiting of + * end time stamp. + */ + constructor() { + } + + /** + * Defines the metadata of PresentationTimeRange + * + * @returns {object} metadata of PresentationTimeRange + * + */ + mapper() { + return { + required: false, + serializedName: 'PresentationTimeRange', + type: { + name: 'Composite', + className: 'PresentationTimeRange', + modelProperties: { + startTimestamp: { + required: true, + serializedName: 'startTimestamp', + type: { + name: 'Number' + } + }, + endTimestamp: { + required: true, + serializedName: 'endTimestamp', + type: { + name: 'Number' + } + }, + presentationWindowDuration: { + required: true, + serializedName: 'presentationWindowDuration', + type: { + name: 'Number' + } + }, + liveBackoffDuration: { + required: true, + serializedName: 'liveBackoffDuration', + type: { + name: 'Number' + } + }, + timescale: { + required: true, + serializedName: 'timescale', + type: { + name: 'Number' + } + }, + forceEndTimestamp: { + required: true, + serializedName: 'forceEndTimestamp', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = PresentationTimeRange; diff --git a/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js b/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js new file mode 100644 index 0000000000..1c23d8c6b3 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/serviceSpecification.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The service metric specifications. + * + */ +class ServiceSpecification { + /** + * Create a ServiceSpecification. + * @member {array} [metricSpecifications] List of metric specifications. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceSpecification + * + * @returns {object} metadata of ServiceSpecification + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceSpecification', + type: { + name: 'Composite', + className: 'ServiceSpecification', + modelProperties: { + metricSpecifications: { + required: false, + readOnly: true, + serializedName: 'metricSpecifications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MetricElementType', + type: { + name: 'Composite', + className: 'Metric' + } + } + } + } + } + } + }; + } +} + +module.exports = ServiceSpecification; diff --git a/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js b/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js new file mode 100644 index 0000000000..83ef8bfe00 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/models/storageEncryptedAssetDecryptionData.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Data needed to decrypt asset files encrypted with legacy storage encryption. + * + */ +class StorageEncryptedAssetDecryptionData { + /** + * Create a StorageEncryptedAssetDecryptionData. + * @member {buffer} [key] The Asset File storage encryption key. + * @member {array} [assetFileEncryptionMetadata] Asset File encryption + * metadata. + */ + constructor() { + } + + /** + * Defines the metadata of StorageEncryptedAssetDecryptionData + * + * @returns {object} metadata of StorageEncryptedAssetDecryptionData + * + */ + mapper() { + return { + required: false, + serializedName: 'StorageEncryptedAssetDecryptionData', + type: { + name: 'Composite', + className: 'StorageEncryptedAssetDecryptionData', + modelProperties: { + key: { + required: false, + serializedName: 'key', + type: { + name: 'ByteArray' + } + }, + assetFileEncryptionMetadata: { + required: false, + serializedName: 'assetFileEncryptionMetadata', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AssetFileEncryptionMetadataElementType', + type: { + name: 'Composite', + className: 'AssetFileEncryptionMetadata' + } + } + } + } + } + } + }; + } +} + +module.exports = StorageEncryptedAssetDecryptionData; diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js b/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js index 69ada47e96..1ae859ff2a 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEndpoint.js @@ -21,8 +21,11 @@ class StreamingEndpoint extends models['TrackedResource'] { /** * Create a StreamingEndpoint. * @member {string} [description] The StreamingEndpoint description. - * @member {number} [scaleUnits] The number of scale units. - * @member {string} [availabilitySetName] AvailabilitySet name + * @member {number} scaleUnits The number of scale units. Use the Scale + * operation to adjust this value. + * @member {string} [availabilitySetName] The name of the AvailabilitySet + * used with this StreamingEndpoint for high availability streaming. This + * value can only be set at creation time. * @member {object} [accessControl] The access control definition of the * StreamingEndpoint. * @member {object} [accessControl.akamai] The access control of Akamai @@ -126,7 +129,7 @@ class StreamingEndpoint extends models['TrackedResource'] { } }, scaleUnits: { - required: false, + required: true, serializedName: 'properties.scaleUnits', type: { name: 'Number' diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js b/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js index 666cce39ec..a9bbe59b50 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEndpointAccessControl.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * StreamingEndpoint access control definition. * diff --git a/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js b/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js index b3bc8be5cd..55ae36f932 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingEntityScaleUnit.js @@ -17,7 +17,7 @@ class StreamingEntityScaleUnit { /** * Create a StreamingEntityScaleUnit. - * @member {number} [scaleUnit] ScaleUnit. The scale unit number of the + * @member {number} [scaleUnit] The scale unit number of the * StreamingEndpoint. */ constructor() { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingLocator.js b/lib/services/mediaServicesManagement/lib/models/streamingLocator.js index fb991b15b8..d569d320f0 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingLocator.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingLocator.js @@ -21,27 +21,24 @@ class StreamingLocator extends models['ProxyResource'] { /** * Create a StreamingLocator. * @member {string} assetName Asset Name - * @member {date} [created] Creation time of Streaming Locator - * @member {date} [startTime] StartTime of Streaming Locator - * @member {date} [endTime] EndTime of Streaming Locator - * @member {uuid} [streamingLocatorId] StreamingLocatorId of Streaming - * Locator - * @member {string} streamingPolicyName Streaming policy name used by this - * streaming locator. Either specify the name of streaming policy you created - * or use one of the predefined streaming polices. The predefined streaming - * policies available are: 'Predefined_DownloadOnly', + * @member {date} [created] The creation time of the Streaming Locator. + * @member {date} [startTime] The start time of the Streaming Locator. + * @member {date} [endTime] The end time of the Streaming Locator. + * @member {uuid} [streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. + * @member {string} streamingPolicyName Name of the Streaming Policy used by + * this Streaming Locator. Either specify the name of Streaming Policy you + * created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' - * @member {string} [defaultContentKeyPolicyName] Default ContentKeyPolicy - * used by this Streaming Locator - * @member {array} [contentKeys] ContentKeys used by this Streaming Locator - * @member {string} [alternativeMediaId] An Alternative Media Identifier - * associated with the StreamingLocator. This identifier can be used to - * distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. + * @member {array} [contentKeys] The ContentKeys used by this Streaming + * Locator. + * @member {string} [alternativeMediaId] Alternative Media ID of this + * Streaming Locator */ constructor() { super(); @@ -94,6 +91,7 @@ class StreamingLocator extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js b/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js index a3989c5b5b..7efbc44059 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingLocatorContentKey.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class for content key in Streaming Locator * @@ -23,7 +21,8 @@ class StreamingLocatorContentKey { * @member {string} [type] Encryption type of Content Key. Possible values * include: 'CommonEncryptionCenc', 'CommonEncryptionCbcs', * 'EnvelopeEncryption' - * @member {string} [label] Label of Content Key + * @member {string} [labelReferenceInStreamingPolicy] Label of Content Key as + * specified in the Streaming Policy * @member {string} [value] Value of of Content Key * @member {string} [policyName] ContentKeyPolicy used by Content Key * @member {array} [tracks] Tracks which use this Content Key @@ -54,6 +53,7 @@ class StreamingLocatorContentKey { }, type: { required: false, + nullable: false, readOnly: true, serializedName: 'type', type: { @@ -61,9 +61,9 @@ class StreamingLocatorContentKey { allowedValues: [ 'CommonEncryptionCenc', 'CommonEncryptionCbcs', 'EnvelopeEncryption' ] } }, - label: { + labelReferenceInStreamingPolicy: { required: false, - serializedName: 'label', + serializedName: 'labelReferenceInStreamingPolicy', type: { name: 'String' } @@ -85,6 +85,7 @@ class StreamingLocatorContentKey { }, tracks: { required: false, + readOnly: true, serializedName: 'tracks', type: { name: 'Sequence', diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js index a5b7e832fe..61e49465a7 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicy.js @@ -199,6 +199,7 @@ class StreamingPolicy extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js index 79c327be8e..d8b421f105 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKey.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class to specify properties of content key * diff --git a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js index 707c0305e3..abe6613eeb 100644 --- a/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js +++ b/lib/services/mediaServicesManagement/lib/models/streamingPolicyContentKeys.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class to specify properties of all content keys in Streaming Policy * diff --git a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js index 7db2ea8057..f2da82226f 100644 --- a/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js +++ b/lib/services/mediaServicesManagement/lib/models/subscriptionMediaService.js @@ -88,6 +88,7 @@ class SubscriptionMediaService extends models['TrackedResource'] { }, mediaServiceId: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.mediaServiceId', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/trackSelection.js b/lib/services/mediaServicesManagement/lib/models/trackSelection.js index ac17f3eb87..4b2642651f 100644 --- a/lib/services/mediaServicesManagement/lib/models/trackSelection.js +++ b/lib/services/mediaServicesManagement/lib/models/trackSelection.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class to select a track * diff --git a/lib/services/mediaServicesManagement/lib/models/transform.js b/lib/services/mediaServicesManagement/lib/models/transform.js index a14fd9a63e..2f88fc5ea6 100644 --- a/lib/services/mediaServicesManagement/lib/models/transform.js +++ b/lib/services/mediaServicesManagement/lib/models/transform.js @@ -76,6 +76,7 @@ class Transform extends models['ProxyResource'] { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.created', type: { @@ -91,6 +92,7 @@ class Transform extends models['ProxyResource'] { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'properties.lastModified', type: { diff --git a/lib/services/mediaServicesManagement/lib/models/transformOutput.js b/lib/services/mediaServicesManagement/lib/models/transformOutput.js index 418beb1f12..98293e6395 100644 --- a/lib/services/mediaServicesManagement/lib/models/transformOutput.js +++ b/lib/services/mediaServicesManagement/lib/models/transformOutput.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes the properties of a TransformOutput, which are the rules to be * applied while generating the desired output. @@ -23,8 +21,9 @@ class TransformOutput { * @member {string} [onError] 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 - * default is stop. Possible values include: 'StopProcessingJob', - * 'ContinueJob' + * overall Job state will not reflect failures of outputs that are specified + * with 'ContinueJob'. The default is 'StopProcessingJob'. Possible values + * include: 'StopProcessingJob', 'ContinueJob' * @member {string} [relativePriority] 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 diff --git a/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js b/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js index b2116cce2c..1b23021e94 100644 --- a/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js +++ b/lib/services/mediaServicesManagement/lib/models/videoAnalyzerPreset.js @@ -21,8 +21,11 @@ const models = require('./index'); class VideoAnalyzerPreset extends models['AudioAnalyzerPreset'] { /** * Create a VideoAnalyzerPreset. - * @member {boolean} [audioInsightsOnly] Whether to only extract audio - * insights when processing a video file. + * @member {string} [insightsToExtract] The type of insights to be extracted. + * If not set then based on the content the type will selected. If the + * content is audi only then only audio insights are extraced and if it is + * video only. Possible values include: 'AudioInsightsOnly', + * 'VideoInsightsOnly', 'AllInsights' */ constructor() { super(); @@ -62,11 +65,12 @@ class VideoAnalyzerPreset extends models['AudioAnalyzerPreset'] { name: 'String' } }, - audioInsightsOnly: { + insightsToExtract: { required: false, - serializedName: 'audioInsightsOnly', + serializedName: 'insightsToExtract', type: { - name: 'Boolean' + name: 'Enum', + allowedValues: [ 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' ] } } } diff --git a/lib/services/mediaServicesManagement/lib/operations/accountFilters.js b/lib/services/mediaServicesManagement/lib/operations/accountFilters.js new file mode 100644 index 0000000000..7a27fd98a8 --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/operations/accountFilters.js @@ -0,0 +1,1708 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, accountName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilterCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get an Account Filter. + * + * Get the details of an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, accountName, filterName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Create or update an Account Filter + * + * Creates or updates an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, accountName, filterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AccountFilter']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Delete an Account Filter. + * + * Deletes an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, accountName, filterName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Update an Account Filter + * + * Updates an existing Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(resourceGroupName, accountName, filterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AccountFilter']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AccountFilterCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a AccountFilters. */ +class AccountFilters { + /** + * Create a AccountFilters. + * @param {AzureMediaServices} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._listNext = _listNext; + } + + /** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, accountName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, accountName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AccountFilterCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, accountName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, accountName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, accountName, options, optionalCallback); + } + } + + /** + * @summary Get an Account Filter. + * + * Get the details of an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, accountName, filterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, accountName, filterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get an Account Filter. + * + * Get the details of an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AccountFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, accountName, filterName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, accountName, filterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, accountName, filterName, options, optionalCallback); + } + } + + /** + * @summary Create or update an Account Filter + * + * Creates or updates an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, filterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, accountName, filterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create or update an Account Filter + * + * Creates or updates an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AccountFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, accountName, filterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, accountName, filterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, accountName, filterName, parameters, options, optionalCallback); + } + } + + /** + * @summary Delete an Account Filter. + * + * Deletes an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, filterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, accountName, filterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete an Account Filter. + * + * Deletes an Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, accountName, filterName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, accountName, filterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, accountName, filterName, options, optionalCallback); + } + } + + /** + * @summary Update an Account Filter + * + * Updates an existing Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, accountName, filterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, filterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Update an Account Filter + * + * Updates an existing Account Filter in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AccountFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, accountName, filterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, filterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, accountName, filterName, parameters, options, optionalCallback); + } + } + + /** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Account Filters + * + * List Account Filters in the Media Services account. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AccountFilterCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = AccountFilters; diff --git a/lib/services/mediaServicesManagement/lib/operations/assetFilters.js b/lib/services/mediaServicesManagement/lib/operations/assetFilters.js new file mode 100644 index 0000000000..bda8f91c9d --- /dev/null +++ b/lib/services/mediaServicesManagement/lib/operations/assetFilters.js @@ -0,0 +1,1754 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, accountName, assetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilterCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get an Asset Filter. + * + * Get the details of an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, accountName, assetName, filterName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 404) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Create or update an Asset Filter + * + * Creates or updates an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, accountName, assetName, filterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AssetFilter']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Delete an Asset Filter. + * + * Deletes an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, accountName, assetName, filterName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Update an Asset Filter + * + * Updates an existing Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(resourceGroupName, accountName, assetName, filterName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (filterName === null || filterName === undefined || typeof filterName.valueOf() !== 'string') { + throw new Error('filterName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + requestUrl = requestUrl.replace('{filterName}', encodeURIComponent(filterName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['AssetFilter']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilter']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AssetFilterCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a AssetFilters. */ +class AssetFilters { + /** + * Create a AssetFilters. + * @param {AzureMediaServices} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._listNext = _listNext; + } + + /** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, accountName, assetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, accountName, assetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AssetFilterCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, accountName, assetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, accountName, assetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, accountName, assetName, options, optionalCallback); + } + } + + /** + * @summary Get an Asset Filter. + * + * Get the details of an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, accountName, assetName, filterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, accountName, assetName, filterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get an Asset Filter. + * + * Get the details of an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AssetFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, accountName, assetName, filterName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, accountName, assetName, filterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, accountName, assetName, filterName, options, optionalCallback); + } + } + + /** + * @summary Create or update an Asset Filter + * + * Creates or updates an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, accountName, assetName, filterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, accountName, assetName, filterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create or update an Asset Filter + * + * Creates or updates an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AssetFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, accountName, assetName, filterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, accountName, assetName, filterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, accountName, assetName, filterName, parameters, options, optionalCallback); + } + } + + /** + * @summary Delete an Asset Filter. + * + * Deletes an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, accountName, assetName, filterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, accountName, assetName, filterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete an Asset Filter. + * + * Deletes an Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, accountName, assetName, filterName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, accountName, assetName, filterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, accountName, assetName, filterName, options, optionalCallback); + } + } + + /** + * @summary Update an Asset Filter + * + * Updates an existing Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, accountName, assetName, filterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, assetName, filterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Update an Asset Filter + * + * Updates an existing Asset Filter associated with the specified Asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AssetFilter} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, accountName, assetName, filterName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, assetName, filterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, accountName, assetName, filterName, parameters, options, optionalCallback); + } + } + + /** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Asset Filters + * + * List Asset Filters associated with the specified Asset. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AssetFilterCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = AssetFilters; diff --git a/lib/services/mediaServicesManagement/lib/operations/assets.js b/lib/services/mediaServicesManagement/lib/operations/assets.js index ccfe8a1d40..1824289b85 100644 --- a/lib/services/mediaServicesManagement/lib/operations/assets.js +++ b/lib/services/mediaServicesManagement/lib/operations/assets.js @@ -1076,8 +1076,8 @@ function _listContainerSas(resourceGroupName, accountName, assetName, parameters * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AssetStorageEncryptionKey} for more - * information. + * See {@link StorageEncryptedAssetDecryptionData} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1193,7 +1193,163 @@ function _getEncryptionKey(resourceGroupName, accountName, assetName, options, c parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['AssetStorageEncryptionKey']().mapper(); + let resultMapper = new client.models['StorageEncryptedAssetDecryptionData']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List Streaming Locators + * + * Lists Streaming Locators which are associated with this asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListStreamingLocatorsResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listStreamingLocators(resourceGroupName, accountName, assetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (assetName === null || assetName === undefined || typeof assetName.valueOf() !== 'string') { + throw new Error('assetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listStreamingLocators'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{assetName}', encodeURIComponent(assetName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListStreamingLocatorsResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1354,6 +1510,7 @@ class Assets { this._update = _update; this._listContainerSas = _listContainerSas; this._getEncryptionKey = _getEncryptionKey; + this._listStreamingLocators = _listStreamingLocators; this._listNext = _listNext; } @@ -2032,7 +2189,7 @@ class Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2075,7 +2232,7 @@ class Assets { * * {Promise} A promise is returned * - * @resolve {AssetStorageEncryptionKey} - The deserialized result object. + * @resolve {StorageEncryptedAssetDecryptionData} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2084,8 +2241,8 @@ class Assets { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AssetStorageEncryptionKey} for more - * information. + * See {@link StorageEncryptedAssetDecryptionData} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2111,6 +2268,103 @@ class Assets { } } + /** + * @summary List Streaming Locators + * + * Lists Streaming Locators which are associated with this asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listStreamingLocatorsWithHttpOperationResponse(resourceGroupName, accountName, assetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listStreamingLocators(resourceGroupName, accountName, assetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Streaming Locators + * + * Lists Streaming Locators which are associated with this asset. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListStreamingLocatorsResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListStreamingLocatorsResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listStreamingLocators(resourceGroupName, accountName, assetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listStreamingLocators(resourceGroupName, accountName, assetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listStreamingLocators(resourceGroupName, accountName, assetName, options, optionalCallback); + } + } + /** * @summary List Assets * diff --git a/lib/services/mediaServicesManagement/lib/operations/index.d.ts b/lib/services/mediaServicesManagement/lib/operations/index.d.ts index 7f7ad07fa6..4ea57795a0 100644 --- a/lib/services/mediaServicesManagement/lib/operations/index.d.ts +++ b/lib/services/mediaServicesManagement/lib/operations/index.d.ts @@ -15,17 +15,22 @@ import * as models from '../models'; /** * @class - * Operations + * AccountFilters * __NOTE__: An instance of this class is automatically created for an * instance of the AzureMediaServices. */ -export interface Operations { +export interface AccountFilters { /** - * @summary List Operations + * @summary List Account Filters * - * Lists all the Media Services operations. + * List Account Filters in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. * * @param {object} [options] Optional Parameters. * @@ -34,16 +39,21 @@ export interface Operations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Operations + * @summary List Account Filters * - * Lists all the Media Services operations. + * List Account Filters in the Media Services account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. * * @param {object} [options] Optional Parameters. * @@ -57,7 +67,7 @@ export interface Operations { * * {Promise} A promise is returned. * - * @resolve {OperationCollection} - The deserialized result object. + * @resolve {AccountFilterCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -65,25 +75,30 @@ export interface Operations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationCollection} [result] - The deserialized result object if an error did not occur. - * See {@link OperationCollection} for more information. + * {AccountFilterCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Operations + * @summary Get an Account Filter. * - * Lists all the Media Services operations. + * Get the details of an Account Filter in the Media Services account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name * * @param {object} [options] Optional Parameters. * @@ -92,19 +107,23 @@ export interface Operations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Operations + * @summary Get an Account Filter. * - * Lists all the Media Services operations. + * Get the details of an Account Filter in the Media Services account. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name * * @param {object} [options] Optional Parameters. * @@ -118,7 +137,7 @@ export interface Operations { * * {Promise} A promise is returned. * - * @resolve {OperationCollection} - The deserialized result object. + * @resolve {AccountFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -126,35 +145,59 @@ export interface Operations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationCollection} [result] - The deserialized result object if an error did not occur. - * See {@link OperationCollection} for more information. + * {AccountFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Mediaservices - * __NOTE__: An instance of this class is automatically created for an - * instance of the AzureMediaServices. - */ -export interface Mediaservices { + get(resourceGroupName: string, accountName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, filterName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, filterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Media Services accounts + * @summary Create or update an Account Filter * - * List Media Services accounts in the resource group + * Creates or updates an Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -162,20 +205,53 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Media Services accounts + * @summary Create or update an Account Filter * - * List Media Services accounts in the resource group + * Creates or updates an Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * + * @param {string} accountName The Media Services account name. + * + * @param {string} filterName The Account Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -188,7 +264,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {MediaServiceCollection} - The deserialized result object. + * @resolve {AccountFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -196,29 +272,30 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {MediaServiceCollection} [result] - The deserialized result object if an error did not occur. - * See {@link MediaServiceCollection} for more - * information. + * {AccountFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get a Media Services account + * @summary Delete an Account Filter. * - * Get the details of a Media Services account + * Deletes an Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} filterName The Account Filter name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -226,22 +303,24 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a Media Services account + * @summary Delete an Account Filter. * - * Get the details of a Media Services account + * Deletes an Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} filterName The Account Filter name + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -254,7 +333,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {MediaService} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -262,36 +341,57 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {MediaService} [result] - The deserialized result object if an error did not occur. - * See {@link MediaService} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create or update a Media Services account + * @summary Update an Account Filter * - * Creates or updates a Media Services account + * Updates an existing Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} filterName The Account Filter name + * * @param {object} parameters The request parameters * - * @param {array} [parameters.storageAccounts] The storage accounts for this - * resource. + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. * - * @param {object} [parameters.tags] Resource tags. + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. * - * @param {string} [parameters.location] The Azure Region of the resource. + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. * * @param {object} [options] Optional Parameters. * @@ -300,30 +400,52 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create or update a Media Services account + * @summary Update an Account Filter * - * Creates or updates a Media Services account + * Updates an existing Account Filter in the Media Services account. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} filterName The Account Filter name + * * @param {object} parameters The request parameters * - * @param {array} [parameters.storageAccounts] The storage accounts for this - * resource. + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. * - * @param {object} [parameters.tags] Resource tags. + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. * - * @param {string} [parameters.location] The Azure Region of the resource. + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. * * @param {object} [options] Optional Parameters. * @@ -337,7 +459,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {MediaService} - The deserialized result object. + * @resolve {AccountFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -345,27 +467,25 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {MediaService} [result] - The deserialized result object if an error did not occur. - * See {@link MediaService} for more information. + * {AccountFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, filterName: string, parameters: models.AccountFilter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete a Media Services account. - * - * Deletes a Media Services account + * @summary List Account Filters * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. + * List Account Filters in the Media Services account. * - * @param {string} accountName The Media Services account name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -374,21 +494,19 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a Media Services account. - * - * Deletes a Media Services account + * @summary List Account Filters * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. + * List Account Filters in the Media Services account. * - * @param {string} accountName The Media Services account name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -402,7 +520,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {AccountFilterCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -410,35 +528,32 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {AccountFilterCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AccountFilterCollection} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Operations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AzureMediaServices. + */ +export interface Operations { /** - * @summary Update a Media Services account - * - * Updates an existing Media Services account - * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. - * - * @param {object} parameters The request parameters - * - * @param {array} [parameters.storageAccounts] The storage accounts for this - * resource. - * - * @param {object} [parameters.tags] Resource tags. + * @summary List Operations * - * @param {string} [parameters.location] The Azure Region of the resource. + * Lists all the Media Services operations. * * @param {object} [options] Optional Parameters. * @@ -447,30 +562,16 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a Media Services account - * - * Updates an existing Media Services account - * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. - * - * @param {object} parameters The request parameters - * - * @param {array} [parameters.storageAccounts] The storage accounts for this - * resource. - * - * @param {object} [parameters.tags] Resource tags. + * @summary List Operations * - * @param {string} [parameters.location] The Azure Region of the resource. + * Lists all the Media Services operations. * * @param {object} [options] Optional Parameters. * @@ -484,7 +585,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {MediaService} - The deserialized result object. + * @resolve {OperationCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -492,32 +593,459 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {MediaService} [result] - The deserialized result object if an error did not occur. - * See {@link MediaService} for more information. + * {OperationCollection} [result] - The deserialized result object if an error did not occur. + * See {@link OperationCollection} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, parameters: models.MediaService, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, parameters: models.MediaService, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Synchronizes Storage Account Keys - * - * Synchronizes storage account keys for a storage account associated with the - * Media Service account. - * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. + * @summary List Operations * - * @param {object} parameters The request parameters + * Lists all the Media Services operations. * - * @param {string} [parameters.id] The ID of the storage account resource. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Operations + * + * Lists all the Media Services operations. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {OperationCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationCollection} [result] - The deserialized result object if an error did not occur. + * See {@link OperationCollection} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Mediaservices + * __NOTE__: An instance of this class is automatically created for an + * instance of the AzureMediaServices. + */ +export interface Mediaservices { + + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {MediaServiceCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {MediaServiceCollection} [result] - The deserialized result object if an error did not occur. + * See {@link MediaServiceCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get a Media Services account + * + * Get the details of a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get a Media Services account + * + * Get the details of a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {MediaService} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {MediaService} [result] - The deserialized result object if an error did not occur. + * See {@link MediaService} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Create or update a Media Services account + * + * Creates or updates a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {array} [parameters.storageAccounts] The storage accounts for this + * resource. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} [parameters.location] The Azure Region of the resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Create or update a Media Services account + * + * Creates or updates a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {array} [parameters.storageAccounts] The storage accounts for this + * resource. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} [parameters.location] The Azure Region of the resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {MediaService} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {MediaService} [result] - The deserialized result object if an error did not occur. + * See {@link MediaService} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, parameters: models.MediaService, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Delete a Media Services account. + * + * Deletes a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Delete a Media Services account. + * + * Deletes a Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Update a Media Services account + * + * Updates an existing Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {array} [parameters.storageAccounts] The storage accounts for this + * resource. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} [parameters.location] The Azure Region of the resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Update a Media Services account + * + * Updates an existing Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {array} [parameters.storageAccounts] The storage accounts for this + * resource. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {string} [parameters.location] The Azure Region of the resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {MediaService} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {MediaService} [result] - The deserialized result object if an error did not occur. + * See {@link MediaService} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, accountName: string, parameters: models.MediaService, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, parameters: models.MediaService, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, parameters: models.MediaService, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Synchronizes Storage Account Keys + * + * Synchronizes storage account keys for a storage account associated with the + * Media Service account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.id] The ID of the storage account resource. * * @param {object} [options] Optional Parameters. * @@ -530,22 +1058,598 @@ export interface Mediaservices { * * @reject {Error|ServiceError} - The error object. */ - syncStorageKeysWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + syncStorageKeysWithHttpOperationResponse(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Synchronizes Storage Account Keys + * + * Synchronizes storage account keys for a storage account associated with the + * Media Service account. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.id] The ID of the storage account resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, callback: ServiceCallback): void; + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SubscriptionMediaServiceCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SubscriptionMediaServiceCollection} [result] - The deserialized result object if an error did not occur. + * See {@link SubscriptionMediaServiceCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get a Media Services account + * + * Get the details of a Media Services account + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBySubscriptionWithHttpOperationResponse(accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get a Media Services account + * + * Get the details of a Media Services account + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SubscriptionMediaService} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SubscriptionMediaService} [result] - The deserialized result object if an error did not occur. + * See {@link SubscriptionMediaService} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBySubscription(accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getBySubscription(accountName: string, callback: ServiceCallback): void; + getBySubscription(accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {MediaServiceCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {MediaServiceCollection} [result] - The deserialized result object if an error did not occur. + * See {@link MediaServiceCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Media Services accounts + * + * List Media Services accounts in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {SubscriptionMediaServiceCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {SubscriptionMediaServiceCollection} [result] - The deserialized result object if an error did not occur. + * See {@link SubscriptionMediaServiceCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Locations + * __NOTE__: An instance of this class is automatically created for an + * instance of the AzureMediaServices. + */ +export interface Locations { + + + /** + * @summary Check Name Availability + * + * Checks whether the Media Service resource name is available. + * + * @param {string} locationName The name of the location + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.name] The account name. + * + * @param {string} [parameters.type] The account type. For a Media Services + * account, this should be 'MediaServices'. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + checkNameAvailabilityWithHttpOperationResponse(locationName: string, parameters: models.CheckNameAvailabilityInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Check Name Availability + * + * Checks whether the Media Service resource name is available. + * + * @param {string} locationName The name of the location + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.name] The account name. + * + * @param {string} [parameters.type] The account type. For a Media Services + * account, this should be 'MediaServices'. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EntityNameAvailabilityCheckOutput} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EntityNameAvailabilityCheckOutput} [result] - The deserialized result object if an error did not occur. + * See {@link EntityNameAvailabilityCheckOutput} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, callback: ServiceCallback): void; + checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Assets + * __NOTE__: An instance of this class is automatically created for an + * instance of the AzureMediaServices. + */ +export interface Assets { + + + /** + * @summary List Assets + * + * List Assets in the Media Services account with optional filtering and + * ordering + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Restricts the set of items returned. + * + * @param {number} [options.top] Specifies a non-negative integer n that limits + * the number of items returned from a collection. The service returns the + * number of available items up to but not greater than the specified value n. + * + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Assets + * + * List Assets in the Media Services account with optional filtering and + * ordering + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Restricts the set of items returned. + * + * @param {number} [options.top] Specifies a non-negative integer n that limits + * the number of items returned from a collection. The service returns the + * number of available items up to but not greater than the specified value n. + * + * @param {string} [options.orderby] Specifies the the key by which the result + * collection should be ordered. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AssetCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AssetCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AssetCollection} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get an Asset + * + * Get the details of an Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Synchronizes Storage Account Keys + * @summary Get an Asset * - * Synchronizes storage account keys for a storage account associated with the - * Media Service account. + * Get the details of an Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Asset} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Asset} [result] - The deserialized result object if an error did not occur. + * See {@link Asset} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Create or update an Asset + * + * Creates or updates an Asset in the Media Services account * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} assetName The Asset name. + * * @param {object} parameters The request parameters * - * @param {string} [parameters.id] The ID of the storage account resource. + * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * + * @param {string} [parameters.description] The Asset description. + * + * @param {string} [parameters.container] The name of the asset blob container. + * + * @param {string} [parameters.storageAccountName] The name of the storage + * account. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Create or update an Asset + * + * Creates or updates an Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * + * @param {string} [parameters.description] The Asset description. + * + * @param {string} [parameters.container] The name of the asset blob container. + * + * @param {string} [parameters.storageAccountName] The name of the storage + * account. * * @param {object} [options] Optional Parameters. * @@ -559,7 +1663,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Asset} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -567,21 +1671,29 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Asset} [result] - The deserialized result object if an error did not occur. + * See {@link Asset} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, callback: ServiceCallback): void; - syncStorageKeys(resourceGroupName: string, accountName: string, parameters: models.SyncStorageKeysInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Media Services accounts + * @summary Delete an Asset. * - * List Media Services accounts in the subscription. + * Deletes an Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -590,16 +1702,23 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Media Services accounts + * @summary Delete an Asset. * - * List Media Services accounts in the subscription. + * Deletes an Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -613,7 +1732,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {SubscriptionMediaServiceCollection} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -621,26 +1740,40 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SubscriptionMediaServiceCollection} [result] - The deserialized result object if an error did not occur. - * See {@link SubscriptionMediaServiceCollection} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get a Media Services account + * @summary Update an Asset * - * Get the details of a Media Services account + * Updates an existing Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} assetName The Asset name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * + * @param {string} [parameters.description] The Asset description. + * + * @param {string} [parameters.container] The name of the asset blob container. + * + * @param {string} [parameters.storageAccountName] The name of the storage + * account. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -648,19 +1781,35 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getBySubscriptionWithHttpOperationResponse(accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a Media Services account + * @summary Update an Asset * - * Get the details of a Media Services account + * Updates an existing Asset in the Media Services account + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. * * @param {string} accountName The Media Services account name. * + * @param {string} assetName The Asset name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * + * @param {string} [parameters.description] The Asset description. + * + * @param {string} [parameters.container] The name of the asset blob container. + * + * @param {string} [parameters.storageAccountName] The name of the storage + * account. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -673,7 +1822,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {SubscriptionMediaService} - The deserialized result object. + * @resolve {Asset} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -681,26 +1830,39 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SubscriptionMediaService} [result] - The deserialized result object if an error did not occur. - * See {@link SubscriptionMediaService} for more - * information. + * {Asset} [result] - The deserialized result object if an error did not occur. + * See {@link Asset} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getBySubscription(accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getBySubscription(accountName: string, callback: ServiceCallback): void; - getBySubscription(accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Media Services accounts + * @summary List the Asset URLs * - * List Media Services accounts in the resource group + * Lists storage container URLs with shared access signatures (SAS) for + * uploading and downloading Asset content. The signatures are derived from the + * storage account keys. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.permissions] The permissions to set on the SAS + * URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' + * + * @param {date} [parameters.expiryTime] The SAS URL expiration time. This + * must be less than 24 hours from the current time. * * @param {object} [options] Optional Parameters. * @@ -709,19 +1871,33 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listContainerSasWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Media Services accounts + * @summary List the Asset URLs + * + * Lists storage container URLs with shared access signatures (SAS) for + * uploading and downloading Asset content. The signatures are derived from the + * storage account keys. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. * - * List Media Services accounts in the resource group + * @param {object} parameters The request parameters * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [parameters.permissions] The permissions to set on the SAS + * URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' + * + * @param {date} [parameters.expiryTime] The SAS URL expiration time. This + * must be less than 24 hours from the current time. * * @param {object} [options] Optional Parameters. * @@ -735,7 +1911,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {MediaServiceCollection} - The deserialized result object. + * @resolve {AssetContainerSas} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -743,26 +1919,30 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {MediaServiceCollection} [result] - The deserialized result object if an error did not occur. - * See {@link MediaServiceCollection} for more - * information. + * {AssetContainerSas} [result] - The deserialized result object if an error did not occur. + * See {@link AssetContainerSas} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, callback: ServiceCallback): void; + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Media Services accounts + * @summary Gets the Asset storage key * - * List Media Services accounts in the subscription. + * Gets the Asset storage encryption keys used to decrypt content created by + * version 2 of the Media Services API * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -771,19 +1951,24 @@ export interface Mediaservices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getEncryptionKeyWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Media Services accounts + * @summary Gets the Asset storage key * - * List Media Services accounts in the subscription. + * Gets the Asset storage encryption keys used to decrypt content created by + * version 2 of the Media Services API * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -797,7 +1982,7 @@ export interface Mediaservices { * * {Promise} A promise is returned. * - * @resolve {SubscriptionMediaServiceCollection} - The deserialized result object. + * @resolve {StorageEncryptedAssetDecryptionData} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -805,41 +1990,30 @@ export interface Mediaservices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SubscriptionMediaServiceCollection} [result] - The deserialized result object if an error did not occur. - * See {@link SubscriptionMediaServiceCollection} for more - * information. + * {StorageEncryptedAssetDecryptionData} [result] - The deserialized result object if an error did not occur. + * See {@link StorageEncryptedAssetDecryptionData} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Locations - * __NOTE__: An instance of this class is automatically created for an - * instance of the AzureMediaServices. - */ -export interface Locations { + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Check Name Availability - * - * Checks whether the Media Service resource name is available. + * @summary List Streaming Locators * - * @param {string} locationName + * Lists Streaming Locators which are associated with this asset. * - * @param {object} parameters The request parameters + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. * - * @param {string} [parameters.name] The account name. + * @param {string} accountName The Media Services account name. * - * @param {string} [parameters.type] The account type. For a Media Services - * account, this should be 'MediaServices'. + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -848,25 +2022,23 @@ export interface Locations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - checkNameAvailabilityWithHttpOperationResponse(locationName: string, parameters: models.CheckNameAvailabilityInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listStreamingLocatorsWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Check Name Availability - * - * Checks whether the Media Service resource name is available. + * @summary List Streaming Locators * - * @param {string} locationName + * Lists Streaming Locators which are associated with this asset. * - * @param {object} parameters The request parameters + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. * - * @param {string} [parameters.name] The account name. + * @param {string} accountName The Media Services account name. * - * @param {string} [parameters.type] The account type. For a Media Services - * account, this should be 'MediaServices'. + * @param {string} assetName The Asset name. * * @param {object} [options] Optional Parameters. * @@ -880,7 +2052,7 @@ export interface Locations { * * {Promise} A promise is returned. * - * @resolve {EntityNameAvailabilityCheckOutput} - The deserialized result object. + * @resolve {ListStreamingLocatorsResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -888,26 +2060,17 @@ export interface Locations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EntityNameAvailabilityCheckOutput} [result] - The deserialized result object if an error did not occur. - * See {@link EntityNameAvailabilityCheckOutput} for more + * {ListStreamingLocatorsResponse} [result] - The deserialized result object if an error did not occur. + * See {@link ListStreamingLocatorsResponse} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, callback: ServiceCallback): void; - checkNameAvailability(locationName: string, parameters: models.CheckNameAvailabilityInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Assets - * __NOTE__: An instance of this class is automatically created for an - * instance of the AzureMediaServices. - */ -export interface Assets { + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -916,22 +2079,11 @@ export interface Assets { * List Assets in the Media Services account with optional filtering and * ordering * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] Restricts the set of items returned. - * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {string} [options.orderby] Specifies the the key by which the result - * collection should be ordered. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -941,7 +2093,7 @@ export interface Assets { * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List Assets @@ -949,22 +2101,11 @@ export interface Assets { * List Assets in the Media Services account with optional filtering and * ordering * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] Restricts the set of items returned. - * - * @param {number} [options.top] Specifies a non-negative integer n that limits - * the number of items returned from a collection. The service returns the - * number of available items up to but not greater than the specified value n. - * - * @param {string} [options.orderby] Specifies the the key by which the result - * collection should be ordered. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -990,15 +2131,24 @@ export interface Assets { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, accountName: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, accountName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, accountName: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * AssetFilters + * __NOTE__: An instance of this class is automatically created for an + * instance of the AzureMediaServices. + */ +export interface AssetFilters { /** - * @summary Get an Asset + * @summary List Asset Filters * - * Get the details of an Asset in the Media Services account + * List Asset Filters associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1014,16 +2164,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get an Asset + * @summary List Asset Filters * - * Get the details of an Asset in the Media Services account + * List Asset Filters associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1044,7 +2194,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {Asset} - The deserialized result object. + * @resolve {AssetFilterCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1052,22 +2202,22 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Asset} [result] - The deserialized result object if an error did not occur. - * See {@link Asset} for more information. + * {AssetFilterCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create or update an Asset + * @summary Get an Asset Filter. * - * Creates or updates an Asset in the Media Services account + * Get the details of an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1076,16 +2226,7 @@ export interface Assets { * * @param {string} assetName The Asset name. * - * @param {object} parameters The request parameters - * - * @param {string} [parameters.alternateId] The alternate ID of the Asset. - * - * @param {string} [parameters.description] The Asset description. - * - * @param {string} [parameters.container] The name of the asset blob container. - * - * @param {string} [parameters.storageAccountName] The name of the storage - * account. + * @param {string} filterName The Asset Filter name * * @param {object} [options] Optional Parameters. * @@ -1094,16 +2235,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create or update an Asset + * @summary Get an Asset Filter. * - * Creates or updates an Asset in the Media Services account + * Get the details of an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1112,16 +2253,7 @@ export interface Assets { * * @param {string} assetName The Asset name. * - * @param {object} parameters The request parameters - * - * @param {string} [parameters.alternateId] The alternate ID of the Asset. - * - * @param {string} [parameters.description] The Asset description. - * - * @param {string} [parameters.container] The name of the asset blob container. - * - * @param {string} [parameters.storageAccountName] The name of the storage - * account. + * @param {string} filterName The Asset Filter name * * @param {object} [options] Optional Parameters. * @@ -1135,7 +2267,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {Asset} - The deserialized result object. + * @resolve {AssetFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1143,47 +2275,22 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Asset} [result] - The deserialized result object if an error did not occur. - * See {@link Asset} for more information. + * {AssetFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * @summary Delete an Asset. - * - * Deletes an Asset in the Media Services account - * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. - * - * @param {string} accountName The Media Services account name. - * - * @param {string} assetName The Asset name. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete an Asset. + * @summary Create or update an Asset Filter * - * Deletes an Asset in the Media Services account + * Creates or updates an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1192,59 +2299,36 @@ export interface Assets { * * @param {string} assetName The Asset name. * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} filterName The Asset Filter name * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} parameters The request parameters * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Update an Asset + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. * - * Updates an existing Asset in the Media Services account + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. * - * @param {string} resourceGroupName The name of the resource group within the - * Azure subscription. + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. * - * @param {string} accountName The Media Services account name. + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. * - * @param {string} assetName The Asset name. + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. * - * @param {object} parameters The request parameters + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. * - * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. * - * @param {string} [parameters.description] The Asset description. + * @param {object} [parameters.firstQuality] The first quality. * - * @param {string} [parameters.container] The name of the asset blob container. + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. * - * @param {string} [parameters.storageAccountName] The name of the storage - * account. + * @param {array} [parameters.tracks] The tracks selection conditions. * * @param {object} [options] Optional Parameters. * @@ -1253,16 +2337,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update an Asset + * @summary Create or update an Asset Filter * - * Updates an existing Asset in the Media Services account + * Creates or updates an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1271,16 +2355,36 @@ export interface Assets { * * @param {string} assetName The Asset name. * + * @param {string} filterName The Asset Filter name + * * @param {object} parameters The request parameters * - * @param {string} [parameters.alternateId] The alternate ID of the Asset. + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. * - * @param {string} [parameters.description] The Asset description. + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. * - * @param {string} [parameters.container] The name of the asset blob container. + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. * - * @param {string} [parameters.storageAccountName] The name of the storage - * account. + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. * * @param {object} [options] Optional Parameters. * @@ -1294,7 +2398,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {Asset} - The deserialized result object. + * @resolve {AssetFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1302,24 +2406,22 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Asset} [result] - The deserialized result object if an error did not occur. - * See {@link Asset} for more information. + * {AssetFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, callback: ServiceCallback): void; - update(resourceGroupName: string, accountName: string, assetName: string, parameters: models.Asset, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List the Asset URLs + * @summary Delete an Asset Filter. * - * Lists storage container URLs with shared access signatures (SAS) for - * uploading and downloading Asset content. The signatures are derived from the - * storage account keys. + * Deletes an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1328,13 +2430,7 @@ export interface Assets { * * @param {string} assetName The Asset name. * - * @param {object} parameters The request parameters - * - * @param {string} [parameters.permissions] The permissions to set on the SAS - * URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' - * - * @param {date} [parameters.expiryTime] The SAS URL expiration time. This - * must be less than 24 hours from the current time. + * @param {string} filterName The Asset Filter name * * @param {object} [options] Optional Parameters. * @@ -1343,18 +2439,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listContainerSasWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List the Asset URLs + * @summary Delete an Asset Filter. * - * Lists storage container URLs with shared access signatures (SAS) for - * uploading and downloading Asset content. The signatures are derived from the - * storage account keys. + * Deletes an Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1363,13 +2457,7 @@ export interface Assets { * * @param {string} assetName The Asset name. * - * @param {object} parameters The request parameters - * - * @param {string} [parameters.permissions] The permissions to set on the SAS - * URL. Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' - * - * @param {date} [parameters.expiryTime] The SAS URL expiration time. This - * must be less than 24 hours from the current time. + * @param {string} filterName The Asset Filter name * * @param {object} [options] Optional Parameters. * @@ -1383,7 +2471,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {AssetContainerSas} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1391,23 +2479,21 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AssetContainerSas} [result] - The deserialized result object if an error did not occur. - * See {@link AssetContainerSas} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, callback: ServiceCallback): void; - listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: models.ListContainerSasInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the Asset storage key + * @summary Update an Asset Filter * - * Gets the Asset storage encryption keys used to decrypt content created by - * version 2 of the Media Services API + * Updates an existing Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1416,6 +2502,37 @@ export interface Assets { * * @param {string} assetName The Asset name. * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1423,17 +2540,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getEncryptionKeyWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the Asset storage key + * @summary Update an Asset Filter * - * Gets the Asset storage encryption keys used to decrypt content created by - * version 2 of the Media Services API + * Updates an existing Asset Filter associated with the specified Asset. * * @param {string} resourceGroupName The name of the resource group within the * Azure subscription. @@ -1442,6 +2558,37 @@ export interface Assets { * * @param {string} assetName The Asset name. * + * @param {string} filterName The Asset Filter name + * + * @param {object} parameters The request parameters + * + * @param {object} [parameters.presentationTimeRange] The presentation time + * range. + * + * @param {number} parameters.presentationTimeRange.startTimestamp The absolute + * start time boundary. + * + * @param {number} parameters.presentationTimeRange.endTimestamp The absolute + * end time boundary. + * + * @param {number} parameters.presentationTimeRange.presentationWindowDuration + * The relative to end sliding window. + * + * @param {number} parameters.presentationTimeRange.liveBackoffDuration The + * relative to end right edge. + * + * @param {number} parameters.presentationTimeRange.timescale The time scale of + * time stamps. + * + * @param {boolean} parameters.presentationTimeRange.forceEndTimestamp The + * indicator of forcing exsiting of end time stamp. + * + * @param {object} [parameters.firstQuality] The first quality. + * + * @param {number} parameters.firstQuality.bitrate The first quality bitrate. + * + * @param {array} [parameters.tracks] The tracks selection conditions. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1454,7 +2601,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {AssetStorageEncryptionKey} - The deserialized result object. + * @resolve {AssetFilter} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1462,24 +2609,22 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AssetStorageEncryptionKey} [result] - The deserialized result object if an error did not occur. - * See {@link AssetStorageEncryptionKey} for more - * information. + * {AssetFilter} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilter} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, callback: ServiceCallback): void; - getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: models.AssetFilter, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List Assets + * @summary List Asset Filters * - * List Assets in the Media Services account with optional filtering and - * ordering + * List Asset Filters associated with the specified Asset. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1491,17 +2636,16 @@ export interface Assets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List Assets + * @summary List Asset Filters * - * List Assets in the Media Services account with optional filtering and - * ordering + * List Asset Filters associated with the specified Asset. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -1518,7 +2662,7 @@ export interface Assets { * * {Promise} A promise is returned. * - * @resolve {AssetCollection} - The deserialized result object. + * @resolve {AssetFilterCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1526,16 +2670,16 @@ export interface Assets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AssetCollection} [result] - The deserialized result object if an error did not occur. - * See {@link AssetCollection} for more information. + * {AssetFilterCollection} [result] - The deserialized result object if an error did not occur. + * See {@link AssetFilterCollection} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -2716,13 +3860,6 @@ export interface Jobs { * * @param {object} parameters.input The inputs for the Job. * - * @param {string} [parameters.input.label] A label that is assigned to a - * JobInput, 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'. - * * @param {string} parameters.input.odatatype Polymorphic Discriminator * * @param {array} parameters.outputs The outputs for the Job. @@ -2733,7 +3870,7 @@ export interface Jobs { * 'High' * * @param {object} [parameters.correlationData] Customer provided correlation - * data that will be returned in Job completed events. + * data that will be returned in Job and JobOutput state events. * * @param {object} [options] Optional Parameters. * @@ -2769,13 +3906,6 @@ export interface Jobs { * * @param {object} parameters.input The inputs for the Job. * - * @param {string} [parameters.input.label] A label that is assigned to a - * JobInput, 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'. - * * @param {string} parameters.input.odatatype Polymorphic Discriminator * * @param {array} parameters.outputs The outputs for the Job. @@ -2786,7 +3916,7 @@ export interface Jobs { * 'High' * * @param {object} [parameters.correlationData] Customer provided correlation - * data that will be returned in Job completed events. + * data that will be returned in Job and JobOutput state events. * * @param {object} [options] Optional Parameters. * @@ -2892,6 +4022,117 @@ export interface Jobs { deleteMethod(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Update Job + * + * Updates a Job. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} transformName The Transform name. + * + * @param {string} jobName The Job name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.description] Optional customer supplied + * description of the Job. + * + * @param {object} parameters.input The inputs for the Job. + * + * @param {string} parameters.input.odatatype Polymorphic Discriminator + * + * @param {array} parameters.outputs The outputs for the Job. + * + * @param {string} [parameters.priority] 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' + * + * @param {object} [parameters.correlationData] Customer provided correlation + * data that will be returned in Job and JobOutput state events. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Update Job + * + * Updates a Job. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} transformName The Transform name. + * + * @param {string} jobName The Job name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.description] Optional customer supplied + * description of the Job. + * + * @param {object} parameters.input The inputs for the Job. + * + * @param {string} parameters.input.odatatype Polymorphic Discriminator + * + * @param {array} parameters.outputs The outputs for the Job. + * + * @param {string} [parameters.priority] 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' + * + * @param {object} [parameters.correlationData] Customer provided correlation + * data that will be returned in Job and JobOutput state events. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Job} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Job} [result] - The deserialized result object if an error did not occur. + * See {@link Job} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: models.Job, callback: ServiceCallback): void; + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: models.Job, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Cancel Job * @@ -3814,33 +5055,30 @@ export interface StreamingLocators { * * @param {string} parameters.assetName Asset Name * - * @param {date} [parameters.startTime] StartTime of Streaming Locator + * @param {date} [parameters.startTime] The start time of the Streaming + * Locator. * - * @param {date} [parameters.endTime] EndTime of Streaming Locator + * @param {date} [parameters.endTime] The end time of the Streaming Locator. * - * @param {uuid} [parameters.streamingLocatorId] StreamingLocatorId of - * Streaming Locator + * @param {uuid} [parameters.streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. * - * @param {string} parameters.streamingPolicyName Streaming policy name used by - * this streaming locator. Either specify the name of streaming policy you - * created or use one of the predefined streaming polices. The predefined - * streaming policies available are: 'Predefined_DownloadOnly', + * @param {string} parameters.streamingPolicyName Name of the Streaming Policy + * used by this Streaming Locator. Either specify the name of Streaming Policy + * you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' * - * @param {string} [parameters.defaultContentKeyPolicyName] Default - * ContentKeyPolicy used by this Streaming Locator + * @param {string} [parameters.defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. * - * @param {array} [parameters.contentKeys] ContentKeys used by this Streaming - * Locator + * @param {array} [parameters.contentKeys] The ContentKeys used by this + * Streaming Locator. * - * @param {string} [parameters.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator. This identifier can be - * used to distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * @param {string} [parameters.alternativeMediaId] Alternative Media ID of this + * Streaming Locator * * @param {object} [options] Optional Parameters. * @@ -3871,33 +5109,30 @@ export interface StreamingLocators { * * @param {string} parameters.assetName Asset Name * - * @param {date} [parameters.startTime] StartTime of Streaming Locator + * @param {date} [parameters.startTime] The start time of the Streaming + * Locator. * - * @param {date} [parameters.endTime] EndTime of Streaming Locator + * @param {date} [parameters.endTime] The end time of the Streaming Locator. * - * @param {uuid} [parameters.streamingLocatorId] StreamingLocatorId of - * Streaming Locator + * @param {uuid} [parameters.streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. * - * @param {string} parameters.streamingPolicyName Streaming policy name used by - * this streaming locator. Either specify the name of streaming policy you - * created or use one of the predefined streaming polices. The predefined - * streaming policies available are: 'Predefined_DownloadOnly', + * @param {string} parameters.streamingPolicyName Name of the Streaming Policy + * used by this Streaming Locator. Either specify the name of Streaming Policy + * you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' * - * @param {string} [parameters.defaultContentKeyPolicyName] Default - * ContentKeyPolicy used by this Streaming Locator + * @param {string} [parameters.defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. * - * @param {array} [parameters.contentKeys] ContentKeys used by this Streaming - * Locator + * @param {array} [parameters.contentKeys] The ContentKeys used by this + * Streaming Locator. * - * @param {string} [parameters.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator. This identifier can be - * used to distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * @param {string} [parameters.alternativeMediaId] Alternative Media ID of this + * Streaming Locator * * @param {object} [options] Optional Parameters. * @@ -4362,12 +5597,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -4385,25 +5629,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -4414,9 +5664,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -4424,8 +5677,8 @@ export interface LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4457,12 +5710,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -4480,25 +5742,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -4509,9 +5777,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -4519,8 +5790,8 @@ export interface LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4569,12 +5840,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -4592,25 +5872,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -4621,9 +5907,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -4659,12 +5948,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -4682,25 +5980,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -4711,9 +6015,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -5052,12 +6359,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -5075,25 +6391,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -5104,9 +6426,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -5114,8 +6439,8 @@ export interface LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5147,12 +6472,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -5170,25 +6504,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -5199,9 +6539,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -5209,8 +6552,8 @@ export interface LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5259,12 +6602,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -5282,25 +6634,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -5311,9 +6669,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -5349,12 +6710,21 @@ export interface LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -5372,25 +6742,31 @@ export interface LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -5401,9 +6777,12 @@ export interface LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -5959,7 +7338,8 @@ export interface LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -6005,7 +7385,8 @@ export interface LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -6142,7 +7523,8 @@ export interface LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -6188,7 +7570,8 @@ export interface LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -6522,9 +7905,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -6567,8 +7953,8 @@ export interface StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6597,9 +7983,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -6642,8 +8031,8 @@ export interface StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6691,9 +8080,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -6763,9 +8155,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -7056,8 +8451,8 @@ export interface StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -7086,8 +8481,8 @@ export interface StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -7136,9 +8531,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -7181,8 +8579,8 @@ export interface StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7211,9 +8609,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -7256,8 +8657,8 @@ export interface StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7305,9 +8706,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -7377,9 +8781,12 @@ export interface StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -7670,8 +9077,8 @@ export interface StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -7700,8 +9107,8 @@ export interface StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/mediaServicesManagement/lib/operations/index.js b/lib/services/mediaServicesManagement/lib/operations/index.js index 15fc3b4985..9175bf91ae 100644 --- a/lib/services/mediaServicesManagement/lib/operations/index.js +++ b/lib/services/mediaServicesManagement/lib/operations/index.js @@ -14,10 +14,12 @@ 'use strict'; +exports.AccountFilters = require('./accountFilters'); exports.Operations = require('./operations'); exports.Mediaservices = require('./mediaservices'); exports.Locations = require('./locations'); exports.Assets = require('./assets'); +exports.AssetFilters = require('./assetFilters'); exports.ContentKeyPolicies = require('./contentKeyPolicies'); exports.Transforms = require('./transforms'); exports.Jobs = require('./jobs'); diff --git a/lib/services/mediaServicesManagement/lib/operations/jobs.js b/lib/services/mediaServicesManagement/lib/operations/jobs.js index 0c62f3d462..c1da33dcfe 100644 --- a/lib/services/mediaServicesManagement/lib/operations/jobs.js +++ b/lib/services/mediaServicesManagement/lib/operations/jobs.js @@ -382,13 +382,6 @@ function _get(resourceGroupName, accountName, transformName, jobName, options, c * * @param {object} parameters.input The inputs for the Job. * - * @param {string} [parameters.input.label] A label that is assigned to a - * JobInput, 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'. - * * @param {string} parameters.input.odatatype Polymorphic Discriminator * * @param {array} parameters.outputs The outputs for the Job. @@ -399,7 +392,7 @@ function _get(resourceGroupName, accountName, transformName, jobName, options, c * 'High' * * @param {object} [parameters.correlationData] Customer provided correlation - * data that will be returned in Job completed events. + * data that will be returned in Job and JobOutput state events. * * @param {object} [options] Optional Parameters. * @@ -708,6 +701,203 @@ function _deleteMethod(resourceGroupName, accountName, transformName, jobName, o }); } +/** + * @summary Update Job + * + * Updates a Job. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} transformName The Transform name. + * + * @param {string} jobName The Job name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.description] Optional customer supplied + * description of the Job. + * + * @param {object} parameters.input The inputs for the Job. + * + * @param {string} parameters.input.odatatype Polymorphic Discriminator + * + * @param {array} parameters.outputs The outputs for the Job. + * + * @param {string} [parameters.priority] 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' + * + * @param {object} [parameters.correlationData] Customer provided correlation + * data that will be returned in Job and JobOutput state events. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Job} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _update(resourceGroupName, accountName, transformName, jobName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (accountName === null || accountName === undefined || typeof accountName.valueOf() !== 'string') { + throw new Error('accountName cannot be null or undefined and it must be of type string.'); + } + if (transformName === null || transformName === undefined || typeof transformName.valueOf() !== 'string') { + throw new Error('transformName cannot be null or undefined and it must be of type string.'); + } + if (jobName === null || jobName === undefined || typeof jobName.valueOf() !== 'string') { + throw new Error('jobName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{accountName}', encodeURIComponent(accountName)); + requestUrl = requestUrl.replace('{transformName}', encodeURIComponent(transformName)); + requestUrl = requestUrl.replace('{jobName}', encodeURIComponent(jobName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['Job']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ApiError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Job']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * @summary Cancel Job * @@ -993,6 +1183,7 @@ class Jobs { this._get = _get; this._create = _create; this._deleteMethod = _deleteMethod; + this._update = _update; this._cancelJob = _cancelJob; this._listNext = _listNext; } @@ -1234,13 +1425,6 @@ class Jobs { * * @param {object} parameters.input The inputs for the Job. * - * @param {string} [parameters.input.label] A label that is assigned to a - * JobInput, 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'. - * * @param {string} parameters.input.odatatype Polymorphic Discriminator * * @param {array} parameters.outputs The outputs for the Job. @@ -1251,7 +1435,7 @@ class Jobs { * 'High' * * @param {object} [parameters.correlationData] Customer provided correlation - * data that will be returned in Job completed events. + * data that will be returned in Job and JobOutput state events. * * @param {object} [options] Optional Parameters. * @@ -1299,13 +1483,6 @@ class Jobs { * * @param {object} parameters.input The inputs for the Job. * - * @param {string} [parameters.input.label] A label that is assigned to a - * JobInput, 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'. - * * @param {string} parameters.input.odatatype Polymorphic Discriminator * * @param {array} parameters.outputs The outputs for the Job. @@ -1316,7 +1493,7 @@ class Jobs { * 'High' * * @param {object} [parameters.correlationData] Customer provided correlation - * data that will be returned in Job completed events. + * data that will be returned in Job and JobOutput state events. * * @param {object} [options] Optional Parameters. * @@ -1464,6 +1641,144 @@ class Jobs { } } + /** + * @summary Update Job + * + * Updates a Job. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} transformName The Transform name. + * + * @param {string} jobName The Job name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.description] Optional customer supplied + * description of the Job. + * + * @param {object} parameters.input The inputs for the Job. + * + * @param {string} parameters.input.odatatype Polymorphic Discriminator + * + * @param {array} parameters.outputs The outputs for the Job. + * + * @param {string} [parameters.priority] 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' + * + * @param {object} [parameters.correlationData] Customer provided correlation + * data that will be returned in Job and JobOutput state events. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, accountName, transformName, jobName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, transformName, jobName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Update Job + * + * Updates a Job. + * + * @param {string} resourceGroupName The name of the resource group within the + * Azure subscription. + * + * @param {string} accountName The Media Services account name. + * + * @param {string} transformName The Transform name. + * + * @param {string} jobName The Job name. + * + * @param {object} parameters The request parameters + * + * @param {string} [parameters.description] Optional customer supplied + * description of the Job. + * + * @param {object} parameters.input The inputs for the Job. + * + * @param {string} parameters.input.odatatype Polymorphic Discriminator + * + * @param {array} parameters.outputs The outputs for the Job. + * + * @param {string} [parameters.priority] 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' + * + * @param {object} [parameters.correlationData] Customer provided correlation + * data that will be returned in Job and JobOutput state events. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Job} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Job} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName, accountName, transformName, jobName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(resourceGroupName, accountName, transformName, jobName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, accountName, transformName, jobName, parameters, options, optionalCallback); + } + } + /** * @summary Cancel Job * diff --git a/lib/services/mediaServicesManagement/lib/operations/liveEvents.js b/lib/services/mediaServicesManagement/lib/operations/liveEvents.js index 1736729334..8d14f649a2 100644 --- a/lib/services/mediaServicesManagement/lib/operations/liveEvents.js +++ b/lib/services/mediaServicesManagement/lib/operations/liveEvents.js @@ -352,12 +352,21 @@ function _get(resourceGroupName, accountName, liveEventName, options, callback) * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -375,25 +384,31 @@ function _get(resourceGroupName, accountName, liveEventName, options, callback) * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -404,9 +419,12 @@ function _get(resourceGroupName, accountName, liveEventName, options, callback) * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -414,8 +432,8 @@ function _get(resourceGroupName, accountName, liveEventName, options, callback) * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -503,12 +521,21 @@ function _create(resourceGroupName, accountName, liveEventName, parameters, opti * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -526,25 +553,31 @@ function _create(resourceGroupName, accountName, liveEventName, parameters, opti * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -555,9 +588,12 @@ function _create(resourceGroupName, accountName, liveEventName, parameters, opti * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -929,12 +965,21 @@ function _reset(resourceGroupName, accountName, liveEventName, options, callback * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -952,25 +997,31 @@ function _reset(resourceGroupName, accountName, liveEventName, options, callback * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -981,9 +1032,12 @@ function _reset(resourceGroupName, accountName, liveEventName, options, callback * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -991,8 +1045,8 @@ function _reset(resourceGroupName, accountName, liveEventName, options, callback * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1207,12 +1261,21 @@ function _beginCreate(resourceGroupName, accountName, liveEventName, parameters, * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -1230,25 +1293,31 @@ function _beginCreate(resourceGroupName, accountName, liveEventName, parameters, * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -1259,9 +1328,12 @@ function _beginCreate(resourceGroupName, accountName, liveEventName, parameters, * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -2446,12 +2518,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -2469,25 +2550,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -2498,9 +2585,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -2508,8 +2598,8 @@ class LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2553,12 +2643,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -2576,25 +2675,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -2605,9 +2710,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -2615,8 +2723,8 @@ class LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2680,12 +2788,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -2703,25 +2820,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -2732,9 +2855,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -2782,12 +2908,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -2805,25 +2940,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -2834,9 +2975,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -3298,12 +3442,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -3321,25 +3474,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -3350,9 +3509,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -3360,8 +3522,8 @@ class LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3405,12 +3567,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -3428,25 +3599,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -3457,9 +3634,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -3467,8 +3647,8 @@ class LiveEvents { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3532,12 +3712,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -3555,25 +3744,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -3584,9 +3779,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * @@ -3634,12 +3832,21 @@ class LiveEvents { * @param {object} parameters.input The Live Event input. * * @param {string} parameters.input.streamingProtocol The streaming protocol - * for the Live Event. Possible values include: 'FragmentedMP4', 'RTMP' + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + * + * @param {object} [parameters.input.accessControl] The access control for + * LiveEvent Input. + * + * @param {object} [parameters.input.accessControl.ip] The IP access control + * properties. * * @param {string} [parameters.input.keyFrameIntervalDuration] ISO 8601 * timespan duration of the key frame interval duration. * - * @param {string} [parameters.input.accessToken] The access token. + * @param {string} [parameters.input.accessToken] A unique identifier for a + * stream. This can be specified at creation time but cannot be updated. If + * omitted, the service will generate a unique value. * * @param {array} [parameters.input.endpoints] The input endpoints for the Live * Event. @@ -3657,25 +3864,31 @@ class LiveEvents { * @param {array} [parameters.preview.accessControl.ip.allow] The IP allow * list. * - * @param {string} [parameters.preview.previewLocator] The preview locator - * Guid. + * @param {string} [parameters.preview.previewLocator] The identifier of the + * preview locator in Guid format. Specifying this at creation time allows the + * caller to know the preview locator url before the event is created. If + * omitted, the service will generate a random identifier. This value cannot + * be updated once the live event is created. * * @param {string} [parameters.preview.streamingPolicyName] The name of - * streaming policy used for LiveEvent preview + * streaming policy used for the LiveEvent preview. This value is specified at + * creation time and cannot be updated. * * @param {string} [parameters.preview.alternativeMediaId] An Alternative Media - * Identifier associated with the preview url. This identifier can be used to - * distinguish the preview of different live events for authorization purposes - * in the CustomLicenseAcquisitionUrlTemplate or the + * Identifier associated with the StreamingLocator created for the preview. + * This value is specified at creation time and cannot be updated. The + * identifier can be used in the CustomLicenseAcquisitionUrlTemplate or the * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the * StreamingPolicyName field. * * @param {object} [parameters.encoding] The Live Event encoding. * * @param {string} [parameters.encoding.encodingType] The encoding type for - * Live Event. Possible values include: 'None', 'Basic' + * Live Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic' * * @param {string} [parameters.encoding.presetName] The encoding preset name. + * This value is specified at creation time and cannot be updated. * * @param {object} [parameters.crossSiteAccessPolicies] The Live Event access * policies. @@ -3686,9 +3899,12 @@ class LiveEvents { * @param {string} [parameters.crossSiteAccessPolicies.crossDomainPolicy] The * content of crossdomain.xml used by Silverlight. * - * @param {boolean} [parameters.vanityUrl] The Live Event vanity URL flag. + * @param {boolean} [parameters.vanityUrl] Specifies whether to use a vanity + * url with the Live Event. This value is specified at creation time and + * cannot be updated. * - * @param {array} [parameters.streamOptions] The stream options. + * @param {array} [parameters.streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be updated. * * @param {object} [parameters.tags] Resource tags. * diff --git a/lib/services/mediaServicesManagement/lib/operations/liveOutputs.js b/lib/services/mediaServicesManagement/lib/operations/liveOutputs.js index 893c958a87..aaecac4dee 100644 --- a/lib/services/mediaServicesManagement/lib/operations/liveOutputs.js +++ b/lib/services/mediaServicesManagement/lib/operations/liveOutputs.js @@ -398,7 +398,8 @@ function _get(resourceGroupName, accountName, liveEventName, liveOutputName, opt * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -571,7 +572,8 @@ function _deleteMethod(resourceGroupName, accountName, liveEventName, liveOutput * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -1327,7 +1329,8 @@ class LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -1385,7 +1388,8 @@ class LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -1564,7 +1568,8 @@ class LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * @@ -1622,7 +1627,8 @@ class LiveOutputs { * duration of the archive window length. This is duration that customer want * to retain the recorded content. * - * @param {string} [parameters.manifestName] The manifest file name. + * @param {string} [parameters.manifestName] The manifest file name. If not + * provided, the service will generate one automatically. * * @param {object} [parameters.hls] The HLS configuration. * diff --git a/lib/services/mediaServicesManagement/lib/operations/locations.js b/lib/services/mediaServicesManagement/lib/operations/locations.js index d0d9e2f25d..18c3a43b3b 100644 --- a/lib/services/mediaServicesManagement/lib/operations/locations.js +++ b/lib/services/mediaServicesManagement/lib/operations/locations.js @@ -19,7 +19,7 @@ const WebResource = msRest.WebResource; * * Checks whether the Media Service resource name is available. * - * @param {string} locationName + * @param {string} locationName The name of the location * * @param {object} parameters The request parameters * @@ -197,7 +197,7 @@ class Locations { * * Checks whether the Media Service resource name is available. * - * @param {string} locationName + * @param {string} locationName The name of the location * * @param {object} parameters The request parameters * @@ -236,7 +236,7 @@ class Locations { * * Checks whether the Media Service resource name is available. * - * @param {string} locationName + * @param {string} locationName The name of the location * * @param {object} parameters The request parameters * diff --git a/lib/services/mediaServicesManagement/lib/operations/streamingEndpoints.js b/lib/services/mediaServicesManagement/lib/operations/streamingEndpoints.js index 0eb0ce9ffe..c888697f57 100644 --- a/lib/services/mediaServicesManagement/lib/operations/streamingEndpoints.js +++ b/lib/services/mediaServicesManagement/lib/operations/streamingEndpoints.js @@ -350,9 +350,12 @@ function _get(resourceGroupName, accountName, streamingEndpointName, options, ca * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -395,8 +398,8 @@ function _get(resourceGroupName, accountName, streamingEndpointName, options, ca * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -483,9 +486,12 @@ function _create(resourceGroupName, accountName, streamingEndpointName, paramete * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -815,8 +821,8 @@ function _stop(resourceGroupName, accountName, streamingEndpointName, options, c * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -889,9 +895,12 @@ function _scale(resourceGroupName, accountName, streamingEndpointName, parameter * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -934,8 +943,8 @@ function _scale(resourceGroupName, accountName, streamingEndpointName, parameter * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1149,9 +1158,12 @@ function _beginCreate(resourceGroupName, accountName, streamingEndpointName, par * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -1850,8 +1862,8 @@ function _beginStop(resourceGroupName, accountName, streamingEndpointName, optio * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -2370,9 +2382,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -2415,8 +2430,8 @@ class StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2457,9 +2472,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -2502,8 +2520,8 @@ class StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2566,9 +2584,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -2650,9 +2671,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -3039,8 +3063,8 @@ class StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -3081,8 +3105,8 @@ class StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -3146,9 +3170,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -3191,8 +3218,8 @@ class StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3233,9 +3260,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -3278,8 +3308,8 @@ class StreamingEndpoints { * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.autoStart] The flag indicates if auto start the - * Live Event. + * @param {boolean} [options.autoStart] The flag indicates if the resource + * should be automatically started on creation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3342,9 +3372,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -3426,9 +3459,12 @@ class StreamingEndpoints { * * @param {string} [parameters.description] The StreamingEndpoint description. * - * @param {number} [parameters.scaleUnits] The number of scale units. + * @param {number} parameters.scaleUnits The number of scale units. Use the + * Scale operation to adjust this value. * - * @param {string} [parameters.availabilitySetName] AvailabilitySet name + * @param {string} [parameters.availabilitySetName] The name of the + * AvailabilitySet used with this StreamingEndpoint for high availability + * streaming. This value can only be set at creation time. * * @param {object} [parameters.accessControl] The access control definition of * the StreamingEndpoint. @@ -3815,8 +3851,8 @@ class StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * @@ -3857,8 +3893,8 @@ class StreamingEndpoints { * * @param {object} parameters StreamingEndpoint scale parameters * - * @param {number} [parameters.scaleUnit] ScaleUnit The scale unit number of - * the StreamingEndpoint. + * @param {number} [parameters.scaleUnit] The scale unit number of the + * StreamingEndpoint. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js b/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js index e9f0facb6d..59ff071a5f 100644 --- a/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js +++ b/lib/services/mediaServicesManagement/lib/operations/streamingLocators.js @@ -365,33 +365,30 @@ function _get(resourceGroupName, accountName, streamingLocatorName, options, cal * * @param {string} parameters.assetName Asset Name * - * @param {date} [parameters.startTime] StartTime of Streaming Locator + * @param {date} [parameters.startTime] The start time of the Streaming + * Locator. * - * @param {date} [parameters.endTime] EndTime of Streaming Locator + * @param {date} [parameters.endTime] The end time of the Streaming Locator. * - * @param {uuid} [parameters.streamingLocatorId] StreamingLocatorId of - * Streaming Locator + * @param {uuid} [parameters.streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. * - * @param {string} parameters.streamingPolicyName Streaming policy name used by - * this streaming locator. Either specify the name of streaming policy you - * created or use one of the predefined streaming polices. The predefined - * streaming policies available are: 'Predefined_DownloadOnly', + * @param {string} parameters.streamingPolicyName Name of the Streaming Policy + * used by this Streaming Locator. Either specify the name of Streaming Policy + * you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' * - * @param {string} [parameters.defaultContentKeyPolicyName] Default - * ContentKeyPolicy used by this Streaming Locator + * @param {string} [parameters.defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. * - * @param {array} [parameters.contentKeys] ContentKeys used by this Streaming - * Locator + * @param {array} [parameters.contentKeys] The ContentKeys used by this + * Streaming Locator. * - * @param {string} [parameters.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator. This identifier can be - * used to distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * @param {string} [parameters.alternativeMediaId] Alternative Media ID of this + * Streaming Locator * * @param {object} [options] Optional Parameters. * @@ -1372,33 +1369,30 @@ class StreamingLocators { * * @param {string} parameters.assetName Asset Name * - * @param {date} [parameters.startTime] StartTime of Streaming Locator + * @param {date} [parameters.startTime] The start time of the Streaming + * Locator. * - * @param {date} [parameters.endTime] EndTime of Streaming Locator + * @param {date} [parameters.endTime] The end time of the Streaming Locator. * - * @param {uuid} [parameters.streamingLocatorId] StreamingLocatorId of - * Streaming Locator + * @param {uuid} [parameters.streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. * - * @param {string} parameters.streamingPolicyName Streaming policy name used by - * this streaming locator. Either specify the name of streaming policy you - * created or use one of the predefined streaming polices. The predefined - * streaming policies available are: 'Predefined_DownloadOnly', + * @param {string} parameters.streamingPolicyName Name of the Streaming Policy + * used by this Streaming Locator. Either specify the name of Streaming Policy + * you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' * - * @param {string} [parameters.defaultContentKeyPolicyName] Default - * ContentKeyPolicy used by this Streaming Locator + * @param {string} [parameters.defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. * - * @param {array} [parameters.contentKeys] ContentKeys used by this Streaming - * Locator + * @param {array} [parameters.contentKeys] The ContentKeys used by this + * Streaming Locator. * - * @param {string} [parameters.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator. This identifier can be - * used to distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * @param {string} [parameters.alternativeMediaId] Alternative Media ID of this + * Streaming Locator * * @param {object} [options] Optional Parameters. * @@ -1441,33 +1435,30 @@ class StreamingLocators { * * @param {string} parameters.assetName Asset Name * - * @param {date} [parameters.startTime] StartTime of Streaming Locator + * @param {date} [parameters.startTime] The start time of the Streaming + * Locator. * - * @param {date} [parameters.endTime] EndTime of Streaming Locator + * @param {date} [parameters.endTime] The end time of the Streaming Locator. * - * @param {uuid} [parameters.streamingLocatorId] StreamingLocatorId of - * Streaming Locator + * @param {uuid} [parameters.streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. * - * @param {string} parameters.streamingPolicyName Streaming policy name used by - * this streaming locator. Either specify the name of streaming policy you - * created or use one of the predefined streaming polices. The predefined - * streaming policies available are: 'Predefined_DownloadOnly', + * @param {string} parameters.streamingPolicyName Name of the Streaming Policy + * used by this Streaming Locator. Either specify the name of Streaming Policy + * you created or use one of the predefined Streaming Policies. The predefined + * Streaming Policies available are: 'Predefined_DownloadOnly', * 'Predefined_ClearStreamingOnly', 'Predefined_DownloadAndClearStreaming', - * 'Predefined_ClearKey', 'Predefined_SecureStreaming' and - * 'Predefined_SecureStreamingWithFairPlay' + * 'Predefined_ClearKey', 'Predefined_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' * - * @param {string} [parameters.defaultContentKeyPolicyName] Default - * ContentKeyPolicy used by this Streaming Locator + * @param {string} [parameters.defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. * - * @param {array} [parameters.contentKeys] ContentKeys used by this Streaming - * Locator + * @param {array} [parameters.contentKeys] The ContentKeys used by this + * Streaming Locator. * - * @param {string} [parameters.alternativeMediaId] An Alternative Media - * Identifier associated with the StreamingLocator. This identifier can be - * used to distinguish different StreamingLocators for the same Asset for - * authorization purposes in the CustomLicenseAcquisitionUrlTemplate or the - * CustomKeyAcquisitionUrlTemplate of the StreamingPolicy specified in the - * StreamingPolicyName field. + * @param {string} [parameters.alternativeMediaId] Alternative Media ID of this + * Streaming Locator * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/mediaServicesManagement/package.json b/lib/services/mediaServicesManagement/package.json index 5a30a7a4ae..c451fbc16d 100644 --- a/lib/services/mediaServicesManagement/package.json +++ b/lib/services/mediaServicesManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-mediaservices", "author": "Microsoft Corporation", "description": "AzureMediaServices Library with typescript type definitions for node", - "version": "3.0.0-preview", + "version": "1.2.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -14,12 +14,12 @@ "license": "MIT", "main": "./lib/azureMediaServices.js", "types": "./lib/azureMediaServices.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } }