diff --git a/sdk/mediaservices/arm-mediaservices/lib/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/lib/azureMediaServices.ts new file mode 100644 index 000000000000..1a00cc2674c8 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/azureMediaServices.ts @@ -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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { AzureMediaServicesContext } from "./azureMediaServicesContext"; + + +class AzureMediaServices extends AzureMediaServicesContext { + // 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; + streamingPolicies: operations.StreamingPolicies; + streamingLocators: operations.StreamingLocators; + liveEvents: operations.LiveEvents; + liveOutputs: operations.LiveOutputs; + streamingEndpoints: operations.StreamingEndpoints; + + /** + * Initializes a new instance of the AzureMediaServices class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The unique identifier for a Microsoft Azure subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { + super(credentials, subscriptionId, options); + 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); + this.streamingPolicies = new operations.StreamingPolicies(this); + this.streamingLocators = new operations.StreamingLocators(this); + this.liveEvents = new operations.LiveEvents(this); + this.liveOutputs = new operations.LiveOutputs(this); + this.streamingEndpoints = new operations.StreamingEndpoints(this); + } +} + +// Operation Specifications + +export { + AzureMediaServices, + AzureMediaServicesContext, + Models as AzureMediaServicesModels, + Mappers as AzureMediaServicesMappers +}; +export * from "./operations"; diff --git a/sdk/mediaservices/arm-mediaservices/lib/azureMediaServicesContext.ts b/sdk/mediaservices/arm-mediaservices/lib/azureMediaServicesContext.ts new file mode 100644 index 000000000000..2d0bb27a766d --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/azureMediaServicesContext.ts @@ -0,0 +1,62 @@ +/* + * 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. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-mediaservices"; +const packageVersion = "6.0.0"; + +export class AzureMediaServicesContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the AzureMediaServices class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The unique identifier for a Microsoft Azure subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureMediaServicesOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2018-07-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/accountFiltersMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/accountFiltersMappers.ts new file mode 100644 index 000000000000..049fa4919ded --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/accountFiltersMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + AccountFilterCollection, + AccountFilter, + ProxyResource, + Resource, + BaseResource, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + ApiError, + ODataError, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/assetFiltersMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/assetFiltersMappers.ts new file mode 100644 index 000000000000..cec863912143 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/assetFiltersMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + AssetFilterCollection, + AssetFilter, + ProxyResource, + Resource, + BaseResource, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + ApiError, + ODataError, + AccountFilter, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/assetsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/assetsMappers.ts new file mode 100644 index 000000000000..0f5737a56813 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/assetsMappers.ts @@ -0,0 +1,143 @@ +/* + * 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. + */ + +export { + discriminators, + AssetCollection, + Asset, + ProxyResource, + Resource, + BaseResource, + ApiError, + ODataError, + ListContainerSasInput, + AssetContainerSas, + StorageEncryptedAssetDecryptionData, + AssetFileEncryptionMetadata, + ListStreamingLocatorsResponse, + AssetStreamingLocator, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/contentKeyPoliciesMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/contentKeyPoliciesMappers.ts new file mode 100644 index 000000000000..ce6084ca78a0 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/contentKeyPoliciesMappers.ts @@ -0,0 +1,138 @@ +/* + * 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. + */ + +export { + discriminators, + ContentKeyPolicyCollection, + ContentKeyPolicy, + ProxyResource, + Resource, + BaseResource, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + ApiError, + ODataError, + ContentKeyPolicyProperties, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/index.ts b/sdk/mediaservices/arm-mediaservices/lib/models/index.ts new file mode 100644 index 000000000000..99fd1a619eca --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/index.ts @@ -0,0 +1,6502 @@ +/* + * 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. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing PresentationTimeRange. + * The presentation time range, this is asset related and not recommended for + * Account Filter. + * + */ +export interface PresentationTimeRange { + /** + * @member {number} [startTimestamp] The absolute start time boundary. + */ + startTimestamp?: number; + /** + * @member {number} [endTimestamp] The absolute end time boundary. + */ + endTimestamp?: number; + /** + * @member {number} [presentationWindowDuration] The relative to end sliding + * window. + */ + presentationWindowDuration?: number; + /** + * @member {number} [liveBackoffDuration] The relative to end right edge. + */ + liveBackoffDuration?: number; + /** + * @member {number} [timescale] The time scale of time stamps. + */ + timescale?: number; + /** + * @member {boolean} [forceEndTimestamp] The indicator of forcing exsiting of + * end time stamp. + */ + forceEndTimestamp?: boolean; +} + +/** + * @interface + * An interface representing FilterTrackPropertyCondition. + * The class to specify one track property condition. + * + */ +export interface FilterTrackPropertyCondition { + /** + * @member {FilterTrackPropertyType} property The track property type. + * Possible values include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', + * 'Bitrate' + */ + property: FilterTrackPropertyType; + /** + * @member {string} value The track proprty value. + */ + value: string; + /** + * @member {FilterTrackPropertyCompareOperation} operation The track property + * condition operation. Possible values include: 'Equal', 'NotEqual' + */ + operation: FilterTrackPropertyCompareOperation; +} + +/** + * @interface + * An interface representing FirstQuality. + * Filter First Quality + * + */ +export interface FirstQuality { + /** + * @member {number} bitrate The first quality bitrate. + */ + bitrate: number; +} + +/** + * @interface + * An interface representing FilterTrackSelection. + * Representing a list of FilterTrackPropertyConditions to select a track. The + * filters are combined using a logical AND operation. + * + */ +export interface FilterTrackSelection { + /** + * @member {FilterTrackPropertyCondition[]} trackSelections The track + * selections. + */ + trackSelections: FilterTrackPropertyCondition[]; +} + +/** + * @interface + * An interface representing Resource. + * The core properties of ARM resources. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] Fully qualified resource ID for the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing ProxyResource. + * The resource model definition for a ARM proxy resource. + * + * @extends Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * @interface + * An interface representing AccountFilter. + * An Account Filter. + * + * @extends ProxyResource + */ +export interface AccountFilter extends ProxyResource { + /** + * @member {PresentationTimeRange} [presentationTimeRange] The presentation + * time range. + */ + presentationTimeRange?: PresentationTimeRange; + /** + * @member {FirstQuality} [firstQuality] The first quality. + */ + firstQuality?: FirstQuality; + /** + * @member {FilterTrackSelection[]} [tracks] The tracks selection conditions. + */ + tracks?: FilterTrackSelection[]; +} + +/** + * @interface + * An interface representing ODataError. + * Information about an error. + * + */ +export interface ODataError { + /** + * @member {string} [code] A language-independent error name. + */ + code?: string; + /** + * @member {string} [message] The error message. + */ + message?: string; + /** + * @member {string} [target] The target of the error (for example, the name + * of the property in error). + */ + target?: string; + /** + * @member {ODataError[]} [details] The error details. + */ + details?: ODataError[]; +} + +/** + * @interface + * An interface representing ApiError. + * The API error. + * + */ +export interface ApiError { + /** + * @member {ODataError} [error] ApiError. The error properties. + */ + error?: ODataError; +} + +/** + * @interface + * An interface representing TrackedResource. + * The resource model definition for a ARM tracked resource. + * + * @extends Resource + */ +export interface TrackedResource extends Resource { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} [location] The Azure Region of the resource. + */ + location?: string; +} + +/** + * @interface + * An interface representing Provider. + * A resource provider. + * + */ +export interface Provider { + /** + * @member {string} providerName The provider name. + */ + providerName: string; +} + +/** + * @interface + * An interface representing OperationDisplay. + * Operation details. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] The service provider. + */ + provider?: string; + /** + * @member {string} [resource] Resource on which the operation is performed. + */ + resource?: string; + /** + * @member {string} [operation] The operation type. + */ + operation?: string; + /** + * @member {string} [description] The operation description. + */ + description?: string; +} + +/** + * @interface + * An interface representing MetricDimension. + * A metric dimension. + * + */ +export interface MetricDimension { + /** + * @member {string} [name] The metric dimension name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [displayName] The display name for the dimension. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {boolean} [toBeExportedForShoebox] Whether to export metric to + * shoebox. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly toBeExportedForShoebox?: boolean; +} + +/** + * @interface + * An interface representing Metric. + * A metric emitted by service. + * + */ +export interface Metric { + /** + * @member {string} [name] The metric name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [displayName] The metric display name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayName?: string; + /** + * @member {string} [displayDescription] The metric display description. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly displayDescription?: string; + /** + * @member {MetricUnit} [unit] The metric unit. Possible values include: + * 'Bytes', 'Count', 'Milliseconds' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly unit?: MetricUnit; + /** + * @member {MetricAggregationType} [aggregationType] The metric aggregation + * type. Possible values include: 'Average', 'Count', 'Total' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly aggregationType?: MetricAggregationType; + /** + * @member {MetricDimension[]} [dimensions] The metric dimensions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dimensions?: MetricDimension[]; +} + +/** + * @interface + * An interface representing ServiceSpecification. + * The service metric specifications. + * + */ +export interface ServiceSpecification { + /** + * @member {Metric[]} [metricSpecifications] List of metric specifications. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly metricSpecifications?: Metric[]; +} + +/** + * @interface + * An interface representing MetricProperties. + * Metric properties. + * + */ +export interface MetricProperties { + /** + * @member {ServiceSpecification} [serviceSpecification] The service + * specifications. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serviceSpecification?: ServiceSpecification; +} + +/** + * @interface + * An interface representing Operation. + * An operation. + * + */ +export interface Operation { + /** + * @member {string} name The operation name. + */ + name: string; + /** + * @member {OperationDisplay} [display] The operation display name. + */ + display?: OperationDisplay; + /** + * @member {string} [origin] Origin of the operation. + */ + origin?: string; + /** + * @member {MetricProperties} [properties] Operation properties format. + */ + properties?: MetricProperties; +} + +/** + * @interface + * An interface representing Location. + */ +export interface Location { + /** + * @member {string} name + */ + name: string; +} + +/** + * @interface + * An interface representing EntityNameAvailabilityCheckOutput. + * The response from the check name availability request. + * + */ +export interface EntityNameAvailabilityCheckOutput { + /** + * @member {boolean} nameAvailable Specifies if the name is available. + */ + nameAvailable: boolean; + /** + * @member {string} [reason] Specifies the reason if the name is not + * available. + */ + reason?: string; + /** + * @member {string} [message] Specifies the detailed reason if the name is + * not available. + */ + message?: string; +} + +/** + * @interface + * An interface representing StorageAccount. + * The storage account details. + * + */ +export interface StorageAccount { + /** + * @member {string} [id] The ID of the storage account resource. Media + * Services relies on tables and queues as well as blobs, so the primary + * storage account must be a Standard Storage account (either + * Microsoft.ClassicStorage or Microsoft.Storage). Blob only storage accounts + * can be added as secondary storage accounts. + */ + id?: string; + /** + * @member {StorageAccountType} type The type of the storage account. + * Possible values include: 'Primary', 'Secondary' + */ + type: StorageAccountType; +} + +/** + * @interface + * An interface representing SyncStorageKeysInput. + * The input to the sync storage keys request. + * + */ +export interface SyncStorageKeysInput { + /** + * @member {string} [id] The ID of the storage account resource. + */ + id?: string; +} + +/** + * @interface + * An interface representing MediaService. + * A Media Services account. + * + * @extends TrackedResource + */ +export interface MediaService extends TrackedResource { + /** + * @member {string} [mediaServiceId] The Media Services account ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly mediaServiceId?: string; + /** + * @member {StorageAccount[]} [storageAccounts] The storage accounts for this + * resource. + */ + storageAccounts?: StorageAccount[]; +} + +/** + * @interface + * An interface representing SubscriptionMediaService. + * A Media Services account. + * + * @extends TrackedResource + */ +export interface SubscriptionMediaService extends TrackedResource { + /** + * @member {string} [mediaServiceId] The Media Services account ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly mediaServiceId?: string; + /** + * @member {StorageAccount[]} [storageAccounts] The storage accounts for this + * resource. + */ + storageAccounts?: StorageAccount[]; +} + +/** + * @interface + * An interface representing CheckNameAvailabilityInput. + * The input to the check name availability request. + * + */ +export interface CheckNameAvailabilityInput { + /** + * @member {string} [name] The account name. + */ + name?: string; + /** + * @member {string} [type] The account type. For a Media Services account, + * this should be 'MediaServices'. + */ + type?: string; +} + +/** + * @interface + * An interface representing AssetContainerSas. + * The Asset Storage container SAS URLs. + * + */ +export interface AssetContainerSas { + /** + * @member {string[]} [assetContainerSasUrls] The list of Asset container SAS + * URLs. + */ + assetContainerSasUrls?: string[]; +} + +/** + * @interface + * An interface representing AssetFileEncryptionMetadata. + * The Asset File Storage encryption metadata. + * + */ +export interface AssetFileEncryptionMetadata { + /** + * @member {string} [initializationVector] The Asset File initialization + * vector. + */ + initializationVector?: string; + /** + * @member {string} [assetFileName] The Asset File name. + */ + assetFileName?: string; + /** + * @member {string} assetFileId The Asset File Id. + */ + assetFileId: string; +} + +/** + * @interface + * An interface representing StorageEncryptedAssetDecryptionData. + * Data needed to decrypt asset files encrypted with legacy storage encryption. + * + */ +export interface StorageEncryptedAssetDecryptionData { + /** + * @member {Uint8Array} [key] The Asset File storage encryption key. + */ + key?: Uint8Array; + /** + * @member {AssetFileEncryptionMetadata[]} [assetFileEncryptionMetadata] + * Asset File encryption metadata. + */ + assetFileEncryptionMetadata?: AssetFileEncryptionMetadata[]; +} + +/** + * @interface + * An interface representing AssetStreamingLocator. + * Properties of the Streaming Locator. + * + */ +export interface AssetStreamingLocator { + /** + * @member {string} [name] Streaming Locator name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [assetName] Asset Name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assetName?: string; + /** + * @member {Date} [created] The creation time of the Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [startTime] The start time of the Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {Date} [endTime] The end time of the Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {string} [streamingLocatorId] StreamingLocatorId of the Streaming + * Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly streamingLocatorId?: string; + /** + * @member {string} [streamingPolicyName] Name of the Streaming Policy used + * by this Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly streamingPolicyName?: string; + /** + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly defaultContentKeyPolicyName?: string; +} + +/** + * @interface + * An interface representing ListStreamingLocatorsResponse. + * The Streaming Locators associated with this Asset. + * + */ +export interface ListStreamingLocatorsResponse { + /** + * @member {AssetStreamingLocator[]} [streamingLocators] The list of + * Streaming Locators. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly streamingLocators?: AssetStreamingLocator[]; +} + +/** + * @interface + * An interface representing Asset. + * An Asset. + * + * @extends ProxyResource + */ +export interface Asset extends ProxyResource { + /** + * @member {string} [assetId] The Asset ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly assetId?: string; + /** + * @member {Date} [created] The creation date of the Asset. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The last modified date of the Asset. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {string} [alternateId] The alternate ID of the Asset. + */ + alternateId?: string; + /** + * @member {string} [description] The Asset description. + */ + description?: string; + /** + * @member {string} [container] The name of the asset blob container. + */ + container?: string; + /** + * @member {string} [storageAccountName] The name of the storage account. + */ + storageAccountName?: string; + /** + * @member {AssetStorageEncryptionFormat} [storageEncryptionFormat] The Asset + * encryption format. One of None or MediaStorageEncryption. Possible values + * include: 'None', 'MediaStorageClientEncryption' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly storageEncryptionFormat?: AssetStorageEncryptionFormat; +} + +/** + * @interface + * An interface representing AssetFilter. + * An Asset Filter. + * + * @extends ProxyResource + */ +export interface AssetFilter extends ProxyResource { + /** + * @member {PresentationTimeRange} [presentationTimeRange] The presentation + * time range. + */ + presentationTimeRange?: PresentationTimeRange; + /** + * @member {FirstQuality} [firstQuality] The first quality. + */ + firstQuality?: FirstQuality; + /** + * @member {FilterTrackSelection[]} [tracks] The tracks selection conditions. + */ + tracks?: FilterTrackSelection[]; +} + +/** + * @interface + * An interface representing ListContainerSasInput. + * The parameters to the list SAS request. + * + */ +export interface ListContainerSasInput { + /** + * @member {AssetContainerPermission} [permissions] The permissions to set on + * the SAS URL. Possible values include: 'Read', 'ReadWrite', + * 'ReadWriteDelete' + */ + permissions?: AssetContainerPermission; + /** + * @member {Date} [expiryTime] The SAS URL expiration time. This must be + * less than 24 hours from the current time. + */ + expiryTime?: Date; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction. + * Configures the Explicit Analog Television Output Restriction control bits. + * For further details see the PlayReady Compliance Rules. + * + */ +export interface ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction { + /** + * @member {boolean} bestEffort Indicates whether this restriction is + * enforced on a Best Effort basis. + */ + bestEffort: boolean; + /** + * @member {number} configurationData Configures the restriction control + * bits. Must be between 0 and 3 inclusive. + */ + configurationData: number; +} + +/** + * Contains the possible cases for ContentKeyPolicyPlayReadyContentKeyLocation. + */ +export type ContentKeyPolicyPlayReadyContentKeyLocationUnion = ContentKeyPolicyPlayReadyContentKeyLocation | ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader | ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier; + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyContentKeyLocation. + * Base class for content key ID location. A derived class must be used to + * represent the location. + * + */ +export interface ContentKeyPolicyPlayReadyContentKeyLocation { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "ContentKeyPolicyPlayReadyContentKeyLocation"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader. + * Specifies that the content key ID is in the PlayReady header. + * + */ +export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier. + * Specifies that the content key ID is specified in the PlayReady + * configuration. + * + */ +export interface ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier"; + /** + * @member {string} keyId The content key ID. + */ + keyId: string; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyPlayRight. + * Configures the Play Right in the PlayReady license. + * + */ +export interface ContentKeyPolicyPlayReadyPlayRight { + /** + * @member {string} [firstPlayExpiration] The amount of time that the license + * is valid after the license is first used to play content. + */ + firstPlayExpiration?: string; + /** + * @member {number} [scmsRestriction] Configures the Serial Copy Management + * System (SCMS) in the license. Must be between 0 and 3 inclusive. + */ + scmsRestriction?: number; + /** + * @member {number} [agcAndColorStripeRestriction] Configures Automatic Gain + * Control (AGC) and Color Stripe in the license. Must be between 0 and 3 + * inclusive. + */ + agcAndColorStripeRestriction?: number; + /** + * @member {ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction} + * [explicitAnalogTelevisionOutputRestriction] Configures the Explicit Analog + * Television Output Restriction in the license. Configuration data must be + * between 0 and 3 inclusive. + */ + explicitAnalogTelevisionOutputRestriction?: ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction; + /** + * @member {boolean} digitalVideoOnlyContentRestriction Enables the Image + * Constraint For Analog Component Video Restriction in the license. + */ + digitalVideoOnlyContentRestriction: boolean; + /** + * @member {boolean} imageConstraintForAnalogComponentVideoRestriction + * Enables the Image Constraint For Analog Component Video Restriction in the + * license. + */ + imageConstraintForAnalogComponentVideoRestriction: boolean; + /** + * @member {boolean} imageConstraintForAnalogComputerMonitorRestriction + * Enables the Image Constraint For Analog Component Video Restriction in the + * license. + */ + imageConstraintForAnalogComputerMonitorRestriction: boolean; + /** + * @member {ContentKeyPolicyPlayReadyUnknownOutputPassingOption} + * allowPassingVideoContentToUnknownOutput Configures Unknown output handling + * settings of the license. Possible values include: 'Unknown', 'NotAllowed', + * 'Allowed', 'AllowedWithVideoConstriction' + */ + allowPassingVideoContentToUnknownOutput: ContentKeyPolicyPlayReadyUnknownOutputPassingOption; + /** + * @member {number} [uncompressedDigitalVideoOpl] Specifies the output + * protection level for uncompressed digital video. + */ + uncompressedDigitalVideoOpl?: number; + /** + * @member {number} [compressedDigitalVideoOpl] Specifies the output + * protection level for compressed digital video. + */ + compressedDigitalVideoOpl?: number; + /** + * @member {number} [analogVideoOpl] Specifies the output protection level + * for compressed digital audio. + */ + analogVideoOpl?: number; + /** + * @member {number} [compressedDigitalAudioOpl] Specifies the output + * protection level for compressed digital audio. + */ + compressedDigitalAudioOpl?: number; + /** + * @member {number} [uncompressedDigitalAudioOpl] Specifies the output + * protection level for uncompressed digital audio. + */ + uncompressedDigitalAudioOpl?: number; +} + +/** + * @interface + * An interface representing ContentKeyPolicyTokenClaim. + * Represents a token claim. + * + */ +export interface ContentKeyPolicyTokenClaim { + /** + * @member {string} [claimType] Token claim type. + */ + claimType?: string; + /** + * @member {string} [claimValue] Token claim value. + */ + claimValue?: string; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyLicense. + * The PlayReady license + * + */ +export interface ContentKeyPolicyPlayReadyLicense { + /** + * @member {boolean} allowTestDevices A flag indicating whether test devices + * can use the license. + */ + allowTestDevices: boolean; + /** + * @member {Date} [beginDate] The begin date of license + */ + beginDate?: Date; + /** + * @member {Date} [expirationDate] The expiration date of license. + */ + expirationDate?: Date; + /** + * @member {string} [relativeBeginDate] The relative begin date of license. + */ + relativeBeginDate?: string; + /** + * @member {string} [relativeExpirationDate] The relative expiration date of + * license. + */ + relativeExpirationDate?: string; + /** + * @member {string} [gracePeriod] The grace period of license. + */ + gracePeriod?: string; + /** + * @member {ContentKeyPolicyPlayReadyPlayRight} [playRight] The license + * PlayRight + */ + playRight?: ContentKeyPolicyPlayReadyPlayRight; + /** + * @member {ContentKeyPolicyPlayReadyLicenseType} licenseType The license + * type. Possible values include: 'Unknown', 'NonPersistent', 'Persistent' + */ + licenseType: ContentKeyPolicyPlayReadyLicenseType; + /** + * @member {ContentKeyPolicyPlayReadyContentKeyLocationUnion} + * contentKeyLocation The content key location. + */ + contentKeyLocation: ContentKeyPolicyPlayReadyContentKeyLocationUnion; + /** + * @member {ContentKeyPolicyPlayReadyContentType} contentType The PlayReady + * content type. Possible values include: 'Unknown', 'Unspecified', + * 'UltraVioletDownload', 'UltraVioletStreaming' + */ + contentType: ContentKeyPolicyPlayReadyContentType; +} + +/** + * Contains the possible cases for ContentKeyPolicyRestriction. + */ +export type ContentKeyPolicyRestrictionUnion = ContentKeyPolicyRestriction | ContentKeyPolicyOpenRestriction | ContentKeyPolicyUnknownRestriction | ContentKeyPolicyTokenRestriction; + +/** + * @interface + * An interface representing ContentKeyPolicyRestriction. + * Base class for Content Key Policy restrictions. A derived class must be used + * to create a restriction. + * + */ +export interface ContentKeyPolicyRestriction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "ContentKeyPolicyRestriction"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyOpenRestriction. + * Represents an open restriction. License or key will be delivered on every + * request. + * + */ +export interface ContentKeyPolicyOpenRestriction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyOpenRestriction"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyUnknownRestriction. + * Represents a ContentKeyPolicyRestriction that is unavailable in the current + * API version. + * + */ +export interface ContentKeyPolicyUnknownRestriction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyUnknownRestriction"; +} + +/** + * Contains the possible cases for ContentKeyPolicyConfiguration. + */ +export type ContentKeyPolicyConfigurationUnion = ContentKeyPolicyConfiguration | ContentKeyPolicyClearKeyConfiguration | ContentKeyPolicyUnknownConfiguration | ContentKeyPolicyWidevineConfiguration | ContentKeyPolicyPlayReadyConfiguration | ContentKeyPolicyFairPlayConfiguration; + +/** + * @interface + * An interface representing ContentKeyPolicyConfiguration. + * Base class for Content Key Policy configuration. A derived class must be + * used to create a configuration. + * + */ +export interface ContentKeyPolicyConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "ContentKeyPolicyConfiguration"; +} + +/** + * Contains the possible cases for ContentKeyPolicyRestrictionTokenKey. + */ +export type ContentKeyPolicyRestrictionTokenKeyUnion = ContentKeyPolicyRestrictionTokenKey | ContentKeyPolicySymmetricTokenKey | ContentKeyPolicyRsaTokenKey | ContentKeyPolicyX509CertificateTokenKey; + +/** + * @interface + * An interface representing ContentKeyPolicyRestrictionTokenKey. + * Base class for Content Key Policy key for token validation. A derived class + * must be used to create a token key. + * + */ +export interface ContentKeyPolicyRestrictionTokenKey { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "ContentKeyPolicyRestrictionTokenKey"; +} + +/** + * @interface + * An interface representing ContentKeyPolicySymmetricTokenKey. + * Specifies a symmetric key for token validation. + * + */ +export interface ContentKeyPolicySymmetricTokenKey { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey"; + /** + * @member {Uint8Array} keyValue The key value of the key + */ + keyValue: Uint8Array; +} + +/** + * @interface + * An interface representing ContentKeyPolicyRsaTokenKey. + * Specifies a RSA key for token validation + * + */ +export interface ContentKeyPolicyRsaTokenKey { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyRsaTokenKey"; + /** + * @member {Uint8Array} exponent The RSA Parameter exponent + */ + exponent: Uint8Array; + /** + * @member {Uint8Array} modulus The RSA Parameter modulus + */ + modulus: Uint8Array; +} + +/** + * @interface + * An interface representing ContentKeyPolicyX509CertificateTokenKey. + * Specifies a certificate for token validation. + * + */ +export interface ContentKeyPolicyX509CertificateTokenKey { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey"; + /** + * @member {Uint8Array} rawBody The raw data field of a certificate in PKCS + * 12 format (X509Certificate2 in .NET) + */ + rawBody: Uint8Array; +} + +/** + * @interface + * An interface representing ContentKeyPolicyTokenRestriction. + * Represents a token restriction. Provided token must match these requirements + * for successful license or key delivery. + * + */ +export interface ContentKeyPolicyTokenRestriction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyTokenRestriction"; + /** + * @member {string} issuer The token issuer. + */ + issuer: string; + /** + * @member {string} audience The audience for the token. + */ + audience: string; + /** + * @member {ContentKeyPolicyRestrictionTokenKeyUnion} primaryVerificationKey + * The primary verification key. + */ + primaryVerificationKey: ContentKeyPolicyRestrictionTokenKeyUnion; + /** + * @member {ContentKeyPolicyRestrictionTokenKeyUnion[]} + * [alternateVerificationKeys] A list of alternative verification keys. + */ + alternateVerificationKeys?: ContentKeyPolicyRestrictionTokenKeyUnion[]; + /** + * @member {ContentKeyPolicyTokenClaim[]} [requiredClaims] A list of required + * token claims. + */ + requiredClaims?: ContentKeyPolicyTokenClaim[]; + /** + * @member {ContentKeyPolicyRestrictionTokenType} restrictionTokenType The + * type of token. Possible values include: 'Unknown', 'Swt', 'Jwt' + */ + restrictionTokenType: ContentKeyPolicyRestrictionTokenType; + /** + * @member {string} [openIdConnectDiscoveryDocument] The OpenID connect + * discovery document. + */ + openIdConnectDiscoveryDocument?: string; +} + +/** + * @interface + * An interface representing ContentKeyPolicyClearKeyConfiguration. + * Represents a configuration for non-DRM keys. + * + */ +export interface ContentKeyPolicyClearKeyConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyUnknownConfiguration. + * Represents a ContentKeyPolicyConfiguration that is unavailable in the + * current API version. + * + */ +export interface ContentKeyPolicyUnknownConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration"; +} + +/** + * @interface + * An interface representing ContentKeyPolicyWidevineConfiguration. + * Specifies a configuration for Widevine licenses. + * + */ +export interface ContentKeyPolicyWidevineConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration"; + /** + * @member {string} widevineTemplate The Widevine template. + */ + widevineTemplate: string; +} + +/** + * @interface + * An interface representing ContentKeyPolicyPlayReadyConfiguration. + * Specifies a configuration for PlayReady licenses. + * + */ +export interface ContentKeyPolicyPlayReadyConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration"; + /** + * @member {ContentKeyPolicyPlayReadyLicense[]} licenses The PlayReady + * licenses. + */ + licenses: ContentKeyPolicyPlayReadyLicense[]; + /** + * @member {string} [responseCustomData] The custom response data. + */ + responseCustomData?: string; +} + +/** + * @interface + * An interface representing ContentKeyPolicyFairPlayConfiguration. + * Specifies a configuration for FairPlay licenses. + * + */ +export interface ContentKeyPolicyFairPlayConfiguration { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration"; + /** + * @member {Uint8Array} ask The key that must be used as FairPlay Application + * Secret key. + */ + ask: Uint8Array; + /** + * @member {string} fairPlayPfxPassword The password encrypting FairPlay + * certificate in PKCS 12 (pfx) format. + */ + fairPlayPfxPassword: string; + /** + * @member {string} fairPlayPfx The Base64 representation of FairPlay + * certificate in PKCS 12 (pfx) format (including private key). + */ + fairPlayPfx: string; + /** + * @member {ContentKeyPolicyFairPlayRentalAndLeaseKeyType} + * rentalAndLeaseKeyType The rental and lease key type. Possible values + * include: 'Unknown', 'Undefined', 'PersistentUnlimited', + * 'PersistentLimited' + */ + rentalAndLeaseKeyType: ContentKeyPolicyFairPlayRentalAndLeaseKeyType; + /** + * @member {number} rentalDuration The rental duration. Must be greater than + * or equal to 0. + */ + rentalDuration: number; +} + +/** + * @interface + * An interface representing ContentKeyPolicyOption. + * Represents a policy option. + * + */ +export interface ContentKeyPolicyOption { + /** + * @member {string} [policyOptionId] The legacy Policy Option ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly policyOptionId?: string; + /** + * @member {string} [name] The Policy Option description. + */ + name?: string; + /** + * @member {ContentKeyPolicyConfigurationUnion} configuration The key + * delivery configuration. + */ + configuration: ContentKeyPolicyConfigurationUnion; + /** + * @member {ContentKeyPolicyRestrictionUnion} restriction The requirements + * that must be met to deliver keys with this configuration + */ + restriction: ContentKeyPolicyRestrictionUnion; +} + +/** + * @interface + * An interface representing ContentKeyPolicyProperties. + * The properties of the Content Key Policy. + * + */ +export interface ContentKeyPolicyProperties { + /** + * @member {string} [policyId] The legacy Policy ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly policyId?: string; + /** + * @member {Date} [created] The creation date of the Policy + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The last modified date of the Policy + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {string} [description] A description for the Policy. + */ + description?: string; + /** + * @member {ContentKeyPolicyOption[]} options The Key Policy options. + */ + options: ContentKeyPolicyOption[]; +} + +/** + * @interface + * An interface representing ContentKeyPolicy. + * A Content Key Policy resource. + * + * @extends ProxyResource + */ +export interface ContentKeyPolicy extends ProxyResource { + /** + * @member {string} [policyId] The legacy Policy ID. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly policyId?: string; + /** + * @member {Date} [created] The creation date of the Policy + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The last modified date of the Policy + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {string} [description] A description for the Policy. + */ + description?: string; + /** + * @member {ContentKeyPolicyOption[]} options The Key Policy options. + */ + options: ContentKeyPolicyOption[]; +} + +/** + * Contains the possible cases for Preset. + */ +export type PresetUnion = Preset | FaceDetectorPreset | AudioAnalyzerPresetUnion | BuiltInStandardEncoderPreset | StandardEncoderPreset; + +/** + * @interface + * An interface representing Preset. + * Base type for all Presets, which define the recipe or instructions on how + * the input media files should be processed. + * + */ +export interface Preset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Preset"; +} + +/** + * Contains the possible cases for Codec. + */ +export type CodecUnion = Codec | AudioUnion | CopyVideo | VideoUnion | CopyAudio; + +/** + * @interface + * An interface representing Codec. + * Describes the basic properties of all codecs. + * + */ +export interface Codec { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Codec"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; +} + +/** + * Contains the possible cases for Audio. + */ +export type AudioUnion = Audio | AacAudio; + +/** + * @interface + * An interface representing Audio. + * Defines the common properties for all audio codecs. + * + */ +export interface Audio { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.Audio"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {number} [channels] The number of channels in the audio. + */ + channels?: number; + /** + * @member {number} [samplingRate] The sampling rate to use for encoding in + * hertz. + */ + samplingRate?: number; + /** + * @member {number} [bitrate] The bitrate, in bits per second, of the output + * encoded audio. + */ + bitrate?: number; +} + +/** + * @interface + * An interface representing AacAudio. + * Describes Advanced Audio Codec (AAC) audio encoding settings. + * + */ +export interface AacAudio { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.AacAudio"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {number} [channels] The number of channels in the audio. + */ + channels?: number; + /** + * @member {number} [samplingRate] The sampling rate to use for encoding in + * hertz. + */ + samplingRate?: number; + /** + * @member {number} [bitrate] The bitrate, in bits per second, of the output + * encoded audio. + */ + bitrate?: number; + /** + * @member {AacAudioProfile} [profile] The encoding profile to be used when + * encoding audio with AAC. Possible values include: 'AacLc', 'HeAacV1', + * 'HeAacV2' + */ + profile?: AacAudioProfile; +} + +/** + * @interface + * An interface representing FaceDetectorPreset. + * Describes all the settings to be used when analyzing a video in order to + * detect all the faces present. + * + */ +export interface FaceDetectorPreset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.FaceDetectorPreset"; + /** + * @member {AnalysisResolution} [resolution] Specifies the maximum resolution + * at which your video is analyzed. The default behavior is + * "SourceResolution," which will keep the input video at its original + * resolution when analyzed. Using "StandardDefinition" will resize input + * videos to standard definition while preserving the appropriate aspect + * ratio. It will only resize if the video is of higher resolution. For + * example, a 1920x1080 input would be scaled to 640x360 before processing. + * Switching to "StandardDefinition" will reduce the time it takes to process + * high resolution video. It may also reduce the cost of using this component + * (see + * https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics + * for details). However, faces that end up being too small in the resized + * video may not be detected. Possible values include: 'SourceResolution', + * 'StandardDefinition' + */ + resolution?: AnalysisResolution; +} + +/** + * Contains the possible cases for AudioAnalyzerPreset. + */ +export type AudioAnalyzerPresetUnion = AudioAnalyzerPreset | VideoAnalyzerPreset; + +/** + * @interface + * An interface representing AudioAnalyzerPreset. + * The Audio Analyzer preset applies a pre-defined set of AI-based analysis + * operations, including speech transcription. Currently, the preset supports + * processing of content with a single audio track. + * + */ +export interface AudioAnalyzerPreset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.AudioAnalyzerPreset"; + /** + * @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 English ('en-US' and 'en-GB'), Spanish + * ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese + * ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), + * Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and + * Korean ('ko-KR'). If you know the language of your content, it is + * recommended that you specify it. If the language isn't specified or set to + * null, automatic language detection will choose the first language detected + * and process with the selected language for the duration of the file. This + * language detection feature currently supports English, Chinese, French, + * German, Italian, Japanese, Spanish, Russian, and Portuguese. It does not + * currently support dynamically switching between languages after the first + * language is detected. The automatic detection works best with audio + * recordings with clearly discernable speech. If automatic detection fails + * to find the language, transcription would fallback to 'en-US'." + */ + audioLanguage?: string; +} + +/** + * Contains the possible cases for Overlay. + */ +export type OverlayUnion = Overlay | AudioOverlay | VideoOverlay; + +/** + * @interface + * An interface representing Overlay. + * Base type for all overlays - image, audio or video. + * + */ +export interface Overlay { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Overlay"; + /** + * @member {string} inputLabel The label of the job input which is to be used + * as an overlay. The Input must specify exactly one file. You can specify an + * image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, + * WMA or M4A file), or a video file. See https://aka.ms/mesformats for the + * complete list of supported audio and video file formats. + */ + inputLabel: string; + /** + * @member {string} [start] The start position, with reference to the input + * video, at which the overlay starts. The value should be in ISO 8601 + * format. For example, PT05S to start the overlay at 5 seconds in to the + * input video. If not specified the overlay starts from the beginning of the + * input video. + */ + start?: string; + /** + * @member {string} [end] The position in the input video at which the + * overlay ends. The value should be in ISO 8601 duration format. For + * example, PT30S to end the overlay at 30 seconds in to the input video. If + * not specified the overlay will be applied until the end of the input video + * if inputLoop is true. Else, if inputLoop is false, then overlay will last + * as long as the duration of the overlay media. + */ + end?: string; + /** + * @member {string} [fadeInDuration] The duration over which the overlay + * fades in onto the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade in (same + * as PT0S). + */ + fadeInDuration?: string; + /** + * @member {string} [fadeOutDuration] The duration over which the overlay + * fades out of the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade out (same + * as PT0S). + */ + fadeOutDuration?: string; + /** + * @member {number} [audioGainLevel] The gain level of audio in the overlay. + * The value should be in the range [0, 1.0]. The default is 1.0. + */ + audioGainLevel?: number; +} + +/** + * @interface + * An interface representing AudioOverlay. + * Describes the properties of an audio overlay. + * + */ +export interface AudioOverlay { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.AudioOverlay"; + /** + * @member {string} inputLabel The label of the job input which is to be used + * as an overlay. The Input must specify exactly one file. You can specify an + * image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, + * WMA or M4A file), or a video file. See https://aka.ms/mesformats for the + * complete list of supported audio and video file formats. + */ + inputLabel: string; + /** + * @member {string} [start] The start position, with reference to the input + * video, at which the overlay starts. The value should be in ISO 8601 + * format. For example, PT05S to start the overlay at 5 seconds in to the + * input video. If not specified the overlay starts from the beginning of the + * input video. + */ + start?: string; + /** + * @member {string} [end] The position in the input video at which the + * overlay ends. The value should be in ISO 8601 duration format. For + * example, PT30S to end the overlay at 30 seconds in to the input video. If + * not specified the overlay will be applied until the end of the input video + * if inputLoop is true. Else, if inputLoop is false, then overlay will last + * as long as the duration of the overlay media. + */ + end?: string; + /** + * @member {string} [fadeInDuration] The duration over which the overlay + * fades in onto the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade in (same + * as PT0S). + */ + fadeInDuration?: string; + /** + * @member {string} [fadeOutDuration] The duration over which the overlay + * fades out of the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade out (same + * as PT0S). + */ + fadeOutDuration?: string; + /** + * @member {number} [audioGainLevel] The gain level of audio in the overlay. + * The value should be in the range [0, 1.0]. The default is 1.0. + */ + audioGainLevel?: number; +} + +/** + * @interface + * An interface representing CopyVideo. + * A codec flag, which tells the encoder to copy the input video bitstream + * without re-encoding. + * + */ +export interface CopyVideo { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.CopyVideo"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; +} + +/** + * Contains the possible cases for Video. + */ +export type VideoUnion = Video | ImageUnion | H264Video; + +/** + * @interface + * An interface representing Video. + * Describes the basic properties for encoding the input video. + * + */ +export interface Video { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.Video"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {string} [keyFrameInterval] The distance between two key frames, + * thereby defining a group of pictures (GOP). The value should be a non-zero + * integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ + keyFrameInterval?: string; + /** + * @member {StretchMode} [stretchMode] The resizing mode - how the input + * video will be resized to fit the desired output resolution(s). Default is + * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ + stretchMode?: StretchMode; +} + +/** + * Contains the possible cases for Image. + */ +export type ImageUnion = Image | JpgImage | PngImage; + +/** + * @interface + * An interface representing Image. + * Describes the basic properties for generating thumbnails from the input + * video + * + */ +export interface Image { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.Image"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {string} [keyFrameInterval] The distance between two key frames, + * thereby defining a group of pictures (GOP). The value should be a non-zero + * integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ + keyFrameInterval?: string; + /** + * @member {StretchMode} [stretchMode] The resizing mode - how the input + * video will be resized to fit the desired output resolution(s). Default is + * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ + stretchMode?: StretchMode; + /** + * @member {string} start The position in the input video from where to start + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a + * relative value (For example, 1%). Also supports a macro {Best}, which + * tells the encoder to select the best thumbnail from the first few seconds + * of the video. + */ + start: string; + /** + * @member {string} [step] The intervals at which thumbnails are generated. + * The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image + * every 5 seconds), or a frame count (For example, 30 for every 30 frames), + * or a relative value (For example, 1%). + */ + step?: string; + /** + * @member {string} [range] The position in the input video at which to stop + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For + * example, 300 to stop at the 300th frame), or a relative value (For + * example, 100%). + */ + range?: string; +} + +/** + * Contains the possible cases for Format. + */ +export type FormatUnion = Format | ImageFormatUnion | MultiBitrateFormatUnion; + +/** + * @interface + * An interface representing Format. + * Base class for output. + * + */ +export interface Format { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Format"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; +} + +/** + * Contains the possible cases for ImageFormat. + */ +export type ImageFormatUnion = ImageFormat | JpgFormat | PngFormat; + +/** + * @interface + * An interface representing ImageFormat. + * Describes the properties for an output image file. + * + */ +export interface ImageFormat { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.ImageFormat"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; +} + +/** + * @interface + * An interface representing JpgFormat. + * Describes the settings for producing JPEG thumbnails. + * + */ +export interface JpgFormat { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JpgFormat"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; +} + +/** + * @interface + * An interface representing PngFormat. + * Describes the settings for producing PNG thumbnails. + * + */ +export interface PngFormat { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.PngFormat"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; +} + +/** + * @interface + * An interface representing CopyAudio. + * A codec flag, which tells the encoder to copy the input audio bitstream. + * + */ +export interface CopyAudio { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.CopyAudio"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; +} + +/** + * @interface + * An interface representing Deinterlace. + * Describes the de-interlacing settings. + * + */ +export interface Deinterlace { + /** + * @member {DeinterlaceParity} [parity] The field parity for de-interlacing, + * defaults to Auto. Possible values include: 'Auto', 'TopFieldFirst', + * 'BottomFieldFirst' + */ + parity?: DeinterlaceParity; + /** + * @member {DeinterlaceMode} [mode] The deinterlacing mode. Defaults to + * AutoPixelAdaptive. Possible values include: 'Off', 'AutoPixelAdaptive' + */ + mode?: DeinterlaceMode; +} + +/** + * @interface + * An interface representing Rectangle. + * Describes the properties of a rectangular window applied to the input media + * before processing it. + * + */ +export interface Rectangle { + /** + * @member {string} [left] The number of pixels from the left-margin. This + * can be absolute pixel value (e.g 100), or relative to the size of the + * video (For example, 50%). + */ + left?: string; + /** + * @member {string} [top] The number of pixels from the top-margin. This can + * be absolute pixel value (e.g 100), or relative to the size of the video + * (For example, 50%). + */ + top?: string; + /** + * @member {string} [width] The width of the rectangular region in pixels. + * This can be absolute pixel value (e.g 100), or relative to the size of the + * video (For example, 50%). + */ + width?: string; + /** + * @member {string} [height] The height of the rectangular region in pixels. + * This can be absolute pixel value (e.g 100), or relative to the size of the + * video (For example, 50%). + */ + height?: string; +} + +/** + * @interface + * An interface representing Filters. + * Describes all the filtering operations, such as de-interlacing, rotation + * etc. that are to be applied to the input media before encoding. + * + */ +export interface Filters { + /** + * @member {Deinterlace} [deinterlace] The de-interlacing settings. + */ + deinterlace?: Deinterlace; + /** + * @member {Rotation} [rotation] The rotation, if any, to be applied to the + * input video, before it is encoded. Default is Auto. Possible values + * include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' + */ + rotation?: Rotation; + /** + * @member {Rectangle} [crop] The parameters for the rectangular window with + * which to crop the input video. + */ + crop?: Rectangle; + /** + * @member {OverlayUnion[]} [overlays] The properties of overlays to be + * applied to the input video. These could be audio, image or video overlays. + */ + overlays?: OverlayUnion[]; +} + +/** + * Contains the possible cases for Layer. + */ +export type LayerUnion = Layer | VideoLayerUnion | JpgLayer | PngLayer; + +/** + * @interface + * An interface representing Layer. + * The encoder can be configured to produce video and/or images (thumbnails) at + * different resolutions, by specifying a layer for each desired resolution. A + * layer represents the properties for the video or image at a resolution. + * + */ +export interface Layer { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Layer"; + /** + * @member {string} [width] The width of the output video for this layer. The + * value can be absolute (in pixels) or relative (in percentage). For example + * 50% means the output video has half as many pixels in width as the input. + */ + width?: string; + /** + * @member {string} [height] The height of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in height as + * the input. + */ + height?: string; + /** + * @member {string} [label] The alphanumeric label for this layer, which can + * be used in multiplexing different video and audio layers, or in naming the + * output file. + */ + label?: string; +} + +/** + * Contains the possible cases for VideoLayer. + */ +export type VideoLayerUnion = VideoLayer | H264Layer; + +/** + * @interface + * An interface representing VideoLayer. + * Describes the settings to be used when encoding the input video into a + * desired output bitrate layer. + * + */ +export interface VideoLayer { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.VideoLayer"; + /** + * @member {string} [width] The width of the output video for this layer. The + * value can be absolute (in pixels) or relative (in percentage). For example + * 50% means the output video has half as many pixels in width as the input. + */ + width?: string; + /** + * @member {string} [height] The height of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in height as + * the input. + */ + height?: string; + /** + * @member {string} [label] The alphanumeric label for this layer, which can + * be used in multiplexing different video and audio layers, or in naming the + * output file. + */ + label?: string; + /** + * @member {number} bitrate The average bitrate in bits per second at which + * to encode the input video when generating this layer. This is a required + * field. + */ + bitrate: number; + /** + * @member {number} [maxBitrate] The maximum bitrate (in bits per second), at + * which the VBV buffer should be assumed to refill. If not specified, + * defaults to the same value as bitrate. + */ + maxBitrate?: number; + /** + * @member {number} [bFrames] The number of B-frames to be used when encoding + * this layer. If not specified, the encoder chooses an appropriate number + * based on the video profile and level. + */ + bFrames?: number; + /** + * @member {string} [frameRate] The frame rate (in frames per second) at + * which to encode this layer. The value can be in the form of M/N where M + * and N are integers (For example, 30000/1001), or in the form of a number + * (For example, 30, or 29.97). The encoder enforces constraints on allowed + * frame rates based on the profile and level. If it is not specified, the + * encoder will use the same frame rate as the input video. + */ + frameRate?: string; + /** + * @member {number} [slices] The number of slices to be used when encoding + * this layer. If not specified, default is zero, which means that encoder + * will use a single slice for each frame. + */ + slices?: number; + /** + * @member {boolean} [adaptiveBFrame] Whether or not adaptive B-frames are to + * be used when encoding this layer. If not specified, the encoder will turn + * it on whenever the video profile permits its use. + */ + adaptiveBFrame?: boolean; +} + +/** + * @interface + * An interface representing H264Layer. + * Describes the settings to be used when encoding the input video into a + * desired output bitrate layer with the H.264 video codec. + * + */ +export interface H264Layer { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.H264Layer"; + /** + * @member {string} [width] The width of the output video for this layer. The + * value can be absolute (in pixels) or relative (in percentage). For example + * 50% means the output video has half as many pixels in width as the input. + */ + width?: string; + /** + * @member {string} [height] The height of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in height as + * the input. + */ + height?: string; + /** + * @member {string} [label] The alphanumeric label for this layer, which can + * be used in multiplexing different video and audio layers, or in naming the + * output file. + */ + label?: string; + /** + * @member {number} bitrate The average bitrate in bits per second at which + * to encode the input video when generating this layer. This is a required + * field. + */ + bitrate: number; + /** + * @member {number} [maxBitrate] The maximum bitrate (in bits per second), at + * which the VBV buffer should be assumed to refill. If not specified, + * defaults to the same value as bitrate. + */ + maxBitrate?: number; + /** + * @member {number} [bFrames] The number of B-frames to be used when encoding + * this layer. If not specified, the encoder chooses an appropriate number + * based on the video profile and level. + */ + bFrames?: number; + /** + * @member {string} [frameRate] The frame rate (in frames per second) at + * which to encode this layer. The value can be in the form of M/N where M + * and N are integers (For example, 30000/1001), or in the form of a number + * (For example, 30, or 29.97). The encoder enforces constraints on allowed + * frame rates based on the profile and level. If it is not specified, the + * encoder will use the same frame rate as the input video. + */ + frameRate?: string; + /** + * @member {number} [slices] The number of slices to be used when encoding + * this layer. If not specified, default is zero, which means that encoder + * will use a single slice for each frame. + */ + slices?: number; + /** + * @member {boolean} [adaptiveBFrame] Whether or not adaptive B-frames are to + * be used when encoding this layer. If not specified, the encoder will turn + * it on whenever the video profile permits its use. + */ + adaptiveBFrame?: boolean; + /** + * @member {H264VideoProfile} [profile] We currently support Baseline, Main, + * High, High422, High444. Default is Auto. Possible values include: 'Auto', + * 'Baseline', 'Main', 'High', 'High422', 'High444' + */ + profile?: H264VideoProfile; + /** + * @member {string} [level] We currently support Level up to 6.2. The value + * can be Auto, or a number that matches the H.264 profile. If not specified, + * the default is Auto, which lets the encoder choose the Level that is + * appropriate for this layer. + */ + level?: string; + /** + * @member {string} [bufferWindow] The VBV buffer window length. The value + * should be in ISO 8601 format. The value should be in the range [0.1-100] + * seconds. The default is 5 seconds (for example, PT5S). + */ + bufferWindow?: string; + /** + * @member {number} [referenceFrames] The number of reference frames to be + * used when encoding this layer. If not specified, the encoder determines an + * appropriate number based on the encoder complexity setting. + */ + referenceFrames?: number; + /** + * @member {EntropyMode} [entropyMode] The entropy mode to be used for this + * layer. If not specified, the encoder chooses the mode that is appropriate + * for the profile and level. Possible values include: 'Cabac', 'Cavlc' + */ + entropyMode?: EntropyMode; +} + +/** + * @interface + * An interface representing H264Video. + * Describes all the properties for encoding a video with the H.264 codec. + * + */ +export interface H264Video { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.H264Video"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {string} [keyFrameInterval] The distance between two key frames, + * thereby defining a group of pictures (GOP). The value should be a non-zero + * integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ + keyFrameInterval?: string; + /** + * @member {StretchMode} [stretchMode] The resizing mode - how the input + * video will be resized to fit the desired output resolution(s). Default is + * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ + stretchMode?: StretchMode; + /** + * @member {boolean} [sceneChangeDetection] Whether or not the encoder should + * insert key frames at scene changes. If not specified, the default is + * false. This flag should be set to true only when the encoder is being + * configured to produce a single output video. + */ + sceneChangeDetection?: boolean; + /** + * @member {H264Complexity} [complexity] Tells the encoder how to choose its + * encoding settings. The default value is Balanced. Possible values include: + * 'Speed', 'Balanced', 'Quality' + */ + complexity?: H264Complexity; + /** + * @member {H264Layer[]} [layers] The collection of output H.264 layers to be + * produced by the encoder. + */ + layers?: H264Layer[]; +} + +/** + * @interface + * An interface representing JpgLayer. + * Describes the settings to produce a JPEG image from the input video. + * + */ +export interface JpgLayer { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JpgLayer"; + /** + * @member {string} [width] The width of the output video for this layer. The + * value can be absolute (in pixels) or relative (in percentage). For example + * 50% means the output video has half as many pixels in width as the input. + */ + width?: string; + /** + * @member {string} [height] The height of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in height as + * the input. + */ + height?: string; + /** + * @member {string} [label] The alphanumeric label for this layer, which can + * be used in multiplexing different video and audio layers, or in naming the + * output file. + */ + label?: string; + /** + * @member {number} [quality] The compression quality of the JPEG output. + * Range is from 0-100 and the default is 70. + */ + quality?: number; +} + +/** + * @interface + * An interface representing JpgImage. + * Describes the properties for producing a series of JPEG images from the + * input video. + * + */ +export interface JpgImage { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JpgImage"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {string} [keyFrameInterval] The distance between two key frames, + * thereby defining a group of pictures (GOP). The value should be a non-zero + * integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ + keyFrameInterval?: string; + /** + * @member {StretchMode} [stretchMode] The resizing mode - how the input + * video will be resized to fit the desired output resolution(s). Default is + * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ + stretchMode?: StretchMode; + /** + * @member {string} start The position in the input video from where to start + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a + * relative value (For example, 1%). Also supports a macro {Best}, which + * tells the encoder to select the best thumbnail from the first few seconds + * of the video. + */ + start: string; + /** + * @member {string} [step] The intervals at which thumbnails are generated. + * The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image + * every 5 seconds), or a frame count (For example, 30 for every 30 frames), + * or a relative value (For example, 1%). + */ + step?: string; + /** + * @member {string} [range] The position in the input video at which to stop + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For + * example, 300 to stop at the 300th frame), or a relative value (For + * example, 100%). + */ + range?: string; + /** + * @member {JpgLayer[]} [layers] A collection of output JPEG image layers to + * be produced by the encoder. + */ + layers?: JpgLayer[]; +} + +/** + * @interface + * An interface representing OutputFile. + * Represents an output file produced. + * + */ +export interface OutputFile { + /** + * @member {string[]} labels The list of labels that describe how the encoder + * should multiplex video and audio into an output file. For example, if the + * encoder is producing two video layers with labels v1 and v2, and one audio + * layer with label a1, then an array like '[v1, a1]' tells the encoder to + * produce an output file with the video track represented by v1 and the + * audio track represented by a1. + */ + labels: string[]; +} + +/** + * Contains the possible cases for MultiBitrateFormat. + */ +export type MultiBitrateFormatUnion = MultiBitrateFormat | Mp4Format | TransportStreamFormat; + +/** + * @interface + * An interface representing MultiBitrateFormat. + * Describes the properties for producing a collection of GOP aligned + * multi-bitrate files. The default behavior is to produce one output file for + * each video layer which is muxed together with all the audios. The exact + * output files produced can be controlled by specifying the outputFiles + * collection. + * + */ +export interface MultiBitrateFormat { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.MultiBitrateFormat"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; + /** + * @member {OutputFile[]} [outputFiles] The list of output files to produce. + * Each entry in the list is a set of audio and video layer labels to be + * muxed together . + */ + outputFiles?: OutputFile[]; +} + +/** + * @interface + * An interface representing Mp4Format. + * Describes the properties for an output ISO MP4 file. + * + */ +export interface Mp4Format { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.Mp4Format"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; + /** + * @member {OutputFile[]} [outputFiles] The list of output files to produce. + * Each entry in the list is a set of audio and video layer labels to be + * muxed together . + */ + outputFiles?: OutputFile[]; +} + +/** + * @interface + * An interface representing PngLayer. + * Describes the settings to produce a PNG image from the input video. + * + */ +export interface PngLayer { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.PngLayer"; + /** + * @member {string} [width] The width of the output video for this layer. The + * value can be absolute (in pixels) or relative (in percentage). For example + * 50% means the output video has half as many pixels in width as the input. + */ + width?: string; + /** + * @member {string} [height] The height of the output video for this layer. + * The value can be absolute (in pixels) or relative (in percentage). For + * example 50% means the output video has half as many pixels in height as + * the input. + */ + height?: string; + /** + * @member {string} [label] The alphanumeric label for this layer, which can + * be used in multiplexing different video and audio layers, or in naming the + * output file. + */ + label?: string; +} + +/** + * @interface + * An interface representing PngImage. + * Describes the properties for producing a series of PNG images from the input + * video. + * + */ +export interface PngImage { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.PngImage"; + /** + * @member {string} [label] An optional label for the codec. The label can be + * used to control muxing behavior. + */ + label?: string; + /** + * @member {string} [keyFrameInterval] The distance between two key frames, + * thereby defining a group of pictures (GOP). The value should be a non-zero + * integer in the range [1, 30] seconds, specified in ISO 8601 format. The + * default is 2 seconds (PT2S). + */ + keyFrameInterval?: string; + /** + * @member {StretchMode} [stretchMode] The resizing mode - how the input + * video will be resized to fit the desired output resolution(s). Default is + * AutoSize. Possible values include: 'None', 'AutoSize', 'AutoFit' + */ + stretchMode?: StretchMode; + /** + * @member {string} start The position in the input video from where to start + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a + * relative value (For example, 1%). Also supports a macro {Best}, which + * tells the encoder to select the best thumbnail from the first few seconds + * of the video. + */ + start: string; + /** + * @member {string} [step] The intervals at which thumbnails are generated. + * The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image + * every 5 seconds), or a frame count (For example, 30 for every 30 frames), + * or a relative value (For example, 1%). + */ + step?: string; + /** + * @member {string} [range] The position in the input video at which to stop + * generating thumbnails. The value can be in absolute timestamp (ISO 8601, + * e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For + * example, 300 to stop at the 300th frame), or a relative value (For + * example, 100%). + */ + range?: string; + /** + * @member {PngLayer[]} [layers] A collection of output PNG image layers to + * be produced by the encoder. + */ + layers?: PngLayer[]; +} + +/** + * @interface + * An interface representing BuiltInStandardEncoderPreset. + * Describes a built-in preset for encoding the input video with the Standard + * Encoder. + * + */ +export interface BuiltInStandardEncoderPreset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.BuiltInStandardEncoderPreset"; + /** + * @member {EncoderNamedPreset} presetName The built-in preset to be used for + * encoding videos. Possible values include: 'H264SingleBitrateSD', + * 'H264SingleBitrate720p', 'H264SingleBitrate1080p', 'AdaptiveStreaming', + * 'AACGoodQualityAudio', 'ContentAwareEncodingExperimental', + * 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', + * 'H264MultipleBitrateSD' + */ + presetName: EncoderNamedPreset; +} + +/** + * @interface + * An interface representing StandardEncoderPreset. + * Describes all the settings to be used when encoding the input video with the + * Standard Encoder. + * + */ +export interface StandardEncoderPreset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.StandardEncoderPreset"; + /** + * @member {Filters} [filters] One or more filtering operations that are + * applied to the input media before encoding. + */ + filters?: Filters; + /** + * @member {CodecUnion[]} codecs The list of codecs to be used when encoding + * the input video. + */ + codecs: CodecUnion[]; + /** + * @member {FormatUnion[]} formats The list of outputs to be produced by the + * encoder. + */ + formats: FormatUnion[]; +} + +/** + * @interface + * An interface representing VideoAnalyzerPreset. + * A video analyzer preset that extracts insights (rich metadata) from both + * audio and video, and outputs a JSON format file. + * + */ +export interface VideoAnalyzerPreset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.VideoAnalyzerPreset"; + /** + * @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 English ('en-US' and 'en-GB'), Spanish + * ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese + * ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), + * Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and + * Korean ('ko-KR'). If you know the language of your content, it is + * recommended that you specify it. If the language isn't specified or set to + * null, automatic language detection will choose the first language detected + * and process with the selected language for the duration of the file. This + * language detection feature currently supports English, Chinese, French, + * German, Italian, Japanese, Spanish, Russian, and Portuguese. It does not + * currently support dynamically switching between languages after the first + * language is detected. The automatic detection works best with audio + * recordings with clearly discernable speech. If automatic detection fails + * to find the language, transcription would fallback to 'en-US'." + */ + audioLanguage?: string; + /** + * @member {InsightsType} [insightsToExtract] Defines the type of insights + * that you want the service to generate. The allowed values are + * 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default + * is AllInsights. If you set this to AllInsights and the input is audio + * only, then only audio insights are generated. Similarly if the input is + * video only, then only video insights are generated. It is recommended that + * you not use AudioInsightsOnly if you expect some of your inputs to be + * video only; or use VideoInsightsOnly if you expect some of your inputs to + * be audio only. Your Jobs in such conditions would error out. Possible + * values include: 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' + */ + insightsToExtract?: InsightsType; +} + +/** + * @interface + * An interface representing TransportStreamFormat. + * Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC + * 13818-1) output video file(s). + * + */ +export interface TransportStreamFormat { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.TransportStreamFormat"; + /** + * @member {string} filenamePattern The pattern of the file names for the + * generated output files. The following macros are supported in the file + * name: {Basename} - The base name of the input video {Extension} - The + * appropriate extension for this format. {Label} - The label assigned to the + * codec/layer. {Index} - A unique index for thumbnails. Only applicable to + * thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to + * thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted + * macros will be collapsed and removed from the filename. + */ + filenamePattern: string; + /** + * @member {OutputFile[]} [outputFiles] The list of output files to produce. + * Each entry in the list is a set of audio and video layer labels to be + * muxed together . + */ + outputFiles?: OutputFile[]; +} + +/** + * @interface + * An interface representing VideoOverlay. + * Describes the properties of a video overlay. + * + */ +export interface VideoOverlay { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.VideoOverlay"; + /** + * @member {string} inputLabel The label of the job input which is to be used + * as an overlay. The Input must specify exactly one file. You can specify an + * image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, + * WMA or M4A file), or a video file. See https://aka.ms/mesformats for the + * complete list of supported audio and video file formats. + */ + inputLabel: string; + /** + * @member {string} [start] The start position, with reference to the input + * video, at which the overlay starts. The value should be in ISO 8601 + * format. For example, PT05S to start the overlay at 5 seconds in to the + * input video. If not specified the overlay starts from the beginning of the + * input video. + */ + start?: string; + /** + * @member {string} [end] The position in the input video at which the + * overlay ends. The value should be in ISO 8601 duration format. For + * example, PT30S to end the overlay at 30 seconds in to the input video. If + * not specified the overlay will be applied until the end of the input video + * if inputLoop is true. Else, if inputLoop is false, then overlay will last + * as long as the duration of the overlay media. + */ + end?: string; + /** + * @member {string} [fadeInDuration] The duration over which the overlay + * fades in onto the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade in (same + * as PT0S). + */ + fadeInDuration?: string; + /** + * @member {string} [fadeOutDuration] The duration over which the overlay + * fades out of the input video. The value should be in ISO 8601 duration + * format. If not specified the default behavior is to have no fade out (same + * as PT0S). + */ + fadeOutDuration?: string; + /** + * @member {number} [audioGainLevel] The gain level of audio in the overlay. + * The value should be in the range [0, 1.0]. The default is 1.0. + */ + audioGainLevel?: number; + /** + * @member {Rectangle} [position] The location in the input video where the + * overlay is applied. + */ + position?: Rectangle; + /** + * @member {number} [opacity] The opacity of the overlay. This is a value in + * the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. + */ + opacity?: number; + /** + * @member {Rectangle} [cropRectangle] An optional rectangular window used to + * crop the overlay image or video. + */ + cropRectangle?: Rectangle; +} + +/** + * @interface + * An interface representing TransformOutput. + * Describes the properties of a TransformOutput, which are the rules to be + * applied while generating the desired output. + * + */ +export interface TransformOutput { + /** + * @member {OnErrorType} [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 overall Job state will not reflect failures of outputs that + * are specified with 'ContinueJob'. The default is 'StopProcessingJob'. + * Possible values include: 'StopProcessingJob', 'ContinueJob' + */ + onError?: OnErrorType; + /** + * @member {Priority} [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. Possible values include: 'Low', 'Normal', 'High' + */ + relativePriority?: Priority; + /** + * @member {PresetUnion} preset Preset that describes the operations that + * will be used to modify, transcode, or extract insights from the source + * file to generate the output. + */ + preset: PresetUnion; +} + +/** + * @interface + * An interface representing Transform. + * A Transform encapsulates the rules or instructions for generating desired + * outputs from input media, such as by transcoding or by extracting insights. + * After the Transform is created, it can be applied to input media by creating + * Jobs. + * + * @extends ProxyResource + */ +export interface Transform extends ProxyResource { + /** + * @member {Date} [created] The UTC date and time when the Transform was + * created, in 'YYYY-MM-DDThh:mm:ssZ' format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {string} [description] An optional verbose description of the + * Transform. + */ + description?: string; + /** + * @member {Date} [lastModified] The UTC date and time when the Transform was + * last updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {TransformOutput[]} outputs An array of one or more + * TransformOutputs that the Transform should generate. + */ + outputs: TransformOutput[]; +} + +/** + * Contains the possible cases for JobInput. + */ +export type JobInputUnion = JobInput | JobInputClipUnion | JobInputs; + +/** + * @interface + * An interface representing JobInput. + * Base class for inputs to a Job. + * + */ +export interface JobInput { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "JobInput"; +} + +/** + * Contains the possible cases for ClipTime. + */ +export type ClipTimeUnion = ClipTime | AbsoluteClipTime; + +/** + * @interface + * An interface representing ClipTime. + * Base class for specifying a clip time. Use sub classes of this class to + * specify the time position in the media. + * + */ +export interface ClipTime { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "ClipTime"; +} + +/** + * Contains the possible cases for JobInputClip. + */ +export type JobInputClipUnion = JobInputClip | JobInputAsset | JobInputHttp; + +/** + * @interface + * An interface representing JobInputClip. + * Represents input files for a Job. + * + */ +export interface JobInputClip { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobInputClip"; + /** + * @member {string[]} [files] List of files. Required for JobInputHttp. + * Maximum of 4000 characters each. + */ + files?: string[]; + /** + * @member {ClipTimeUnion} [start] Defines a point on the timeline of the + * input media at which processing will start. Defaults to the beginning of + * the input media. + */ + start?: ClipTimeUnion; + /** + * @member {ClipTimeUnion} [end] Defines a point on the timeline of the input + * media at which processing will end. Defaults to the end of the input + * media. + */ + end?: ClipTimeUnion; + /** + * @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'. + */ + label?: string; +} + +/** + * @interface + * An interface representing AbsoluteClipTime. + * Specifies the clip time as an absolute time position in the media file. The + * absolute time can point to a different position depending on whether the + * media file starts from a timestamp of zero or not. + * + */ +export interface AbsoluteClipTime { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.AbsoluteClipTime"; + /** + * @member {string} time The time position on the timeline of the input + * media. It is usually speicified as an ISO8601 period. e.g PT30S for 30 + * seconds. + */ + time: string; +} + +/** + * @interface + * An interface representing JobInputs. + * Describes a list of inputs to a Job. + * + */ +export interface JobInputs { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobInputs"; + /** + * @member {JobInputUnion[]} [inputs] List of inputs to a Job. + */ + inputs?: JobInputUnion[]; +} + +/** + * @interface + * An interface representing JobInputAsset. + * Represents an Asset for input into a Job. + * + */ +export interface JobInputAsset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobInputAsset"; + /** + * @member {string[]} [files] List of files. Required for JobInputHttp. + * Maximum of 4000 characters each. + */ + files?: string[]; + /** + * @member {ClipTimeUnion} [start] Defines a point on the timeline of the + * input media at which processing will start. Defaults to the beginning of + * the input media. + */ + start?: ClipTimeUnion; + /** + * @member {ClipTimeUnion} [end] Defines a point on the timeline of the input + * media at which processing will end. Defaults to the end of the input + * media. + */ + end?: ClipTimeUnion; + /** + * @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'. + */ + label?: string; + /** + * @member {string} assetName The name of the input Asset. + */ + assetName: string; +} + +/** + * @interface + * An interface representing JobInputHttp. + * Represents HTTPS job input. + * + */ +export interface JobInputHttp { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobInputHttp"; + /** + * @member {string[]} [files] List of files. Required for JobInputHttp. + * Maximum of 4000 characters each. + */ + files?: string[]; + /** + * @member {ClipTimeUnion} [start] Defines a point on the timeline of the + * input media at which processing will start. Defaults to the beginning of + * the input media. + */ + start?: ClipTimeUnion; + /** + * @member {ClipTimeUnion} [end] Defines a point on the timeline of the input + * media at which processing will end. Defaults to the end of the input + * media. + */ + end?: ClipTimeUnion; + /** + * @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'. + */ + label?: string; + /** + * @member {string} [baseUri] Base URI for HTTPS job input. It will be + * concatenated with provided file names. If no base uri is given, then the + * provided file list is assumed to be fully qualified uris. Maximum length + * of 4000 characters. + */ + baseUri?: string; +} + +/** + * @interface + * An interface representing JobErrorDetail. + * Details of JobOutput errors. + * + */ +export interface JobErrorDetail { + /** + * @member {string} [code] Code describing the error detail. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: string; + /** + * @member {string} [message] A human-readable representation of the error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; +} + +/** + * @interface + * An interface representing JobError. + * Details of JobOutput errors. + * + */ +export interface JobError { + /** + * @member {JobErrorCode} [code] Error code describing the error. Possible + * values include: 'ServiceError', 'ServiceTransientError', + * 'DownloadNotAccessible', 'DownloadTransientError', 'UploadNotAccessible', + * 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', + * 'ContentUnsupported' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: JobErrorCode; + /** + * @member {string} [message] A human-readable language-dependent + * representation of the error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; + /** + * @member {JobErrorCategory} [category] Helps with categorization of errors. + * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', + * 'Content' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly category?: JobErrorCategory; + /** + * @member {JobRetry} [retry] Indicates that it may be possible to retry the + * Job. If retry is unsuccessful, please contact Azure support via Azure + * Portal. Possible values include: 'DoNotRetry', 'MayRetry' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly retry?: JobRetry; + /** + * @member {JobErrorDetail[]} [details] An array of details about specific + * errors that led to this reported error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly details?: JobErrorDetail[]; +} + +/** + * Contains the possible cases for JobOutput. + */ +export type JobOutputUnion = JobOutput | JobOutputAsset; + +/** + * @interface + * An interface representing JobOutput. + * Describes all the properties of a JobOutput. + * + */ +export interface JobOutput { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "JobOutput"; + /** + * @member {JobError} [error] If the JobOutput is in the Error state, it + * contains the details of the error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: JobError; + /** + * @member {JobState} [state] Describes the state of the JobOutput. Possible + * values include: 'Canceled', 'Canceling', 'Error', 'Finished', + * 'Processing', 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: JobState; + /** + * @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 JobOutput is complete, use the State property. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly progress?: number; + /** + * @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. + */ + label?: string; +} + +/** + * @interface + * An interface representing JobOutputAsset. + * Represents an Asset used as a JobOutput. + * + */ +export interface JobOutputAsset { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobOutputAsset"; + /** + * @member {JobError} [error] If the JobOutput is in the Error state, it + * contains the details of the error. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: JobError; + /** + * @member {JobState} [state] Describes the state of the JobOutput. Possible + * values include: 'Canceled', 'Canceling', 'Error', 'Finished', + * 'Processing', 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: JobState; + /** + * @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 JobOutput is complete, use the State property. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly progress?: number; + /** + * @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. + */ + label?: string; + /** + * @member {string} assetName The name of the output Asset. + */ + assetName: string; +} + +/** + * @interface + * An interface representing Job. + * A Job resource type. The progress and state can be obtained by polling a Job + * or subscribing to events using EventGrid. + * + * @extends ProxyResource + */ +export interface Job extends ProxyResource { + /** + * @member {Date} [created] The UTC date and time when the Job was created, + * in 'YYYY-MM-DDThh:mm:ssZ' format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {JobState} [state] The current state of the job. Possible values + * include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + * 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly state?: JobState; + /** + * @member {string} [description] Optional customer supplied description of + * the Job. + */ + description?: string; + /** + * @member {JobInputUnion} input The inputs for the Job. + */ + input: JobInputUnion; + /** + * @member {Date} [lastModified] The UTC date and time when the Job was last + * updated, in 'YYYY-MM-DDThh:mm:ssZ' format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {JobOutputUnion[]} outputs The outputs for the Job. + */ + outputs: JobOutputUnion[]; + /** + * @member {Priority} [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' + */ + priority?: Priority; + /** + * @member {{ [propertyName: string]: string }} [correlationData] Customer + * provided key, value pairs that will be returned in Job and JobOutput state + * events. + */ + correlationData?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing TrackPropertyCondition. + * Class to specify one track property condition + * + */ +export interface TrackPropertyCondition { + /** + * @member {TrackPropertyType} property Track property type. Possible values + * include: 'Unknown', 'FourCC' + */ + property: TrackPropertyType; + /** + * @member {TrackPropertyCompareOperation} operation Track property condition + * operation. Possible values include: 'Unknown', 'Equal' + */ + operation: TrackPropertyCompareOperation; + /** + * @member {string} [value] Track property value + */ + value?: string; +} + +/** + * @interface + * An interface representing TrackSelection. + * Class to select a track + * + */ +export interface TrackSelection { + /** + * @member {TrackPropertyCondition[]} [trackSelections] TrackSelections is a + * track property condition list which can specify track(s) + */ + trackSelections?: TrackPropertyCondition[]; +} + +/** + * @interface + * An interface representing DefaultKey. + * Class to specify properties of default content key for each encryption + * scheme + * + */ +export interface DefaultKey { + /** + * @member {string} [label] Label can be used to specify Content Key when + * creating a Streaming Locator + */ + label?: string; + /** + * @member {string} [policyName] Policy used by Default Key + */ + policyName?: string; +} + +/** + * @interface + * An interface representing StreamingPolicyContentKey. + * Class to specify properties of content key + * + */ +export interface StreamingPolicyContentKey { + /** + * @member {string} [label] Label can be used to specify Content Key when + * creating a Streaming Locator + */ + label?: string; + /** + * @member {string} [policyName] Policy used by Content Key + */ + policyName?: string; + /** + * @member {TrackSelection[]} [tracks] Tracks which use this content key + */ + tracks?: TrackSelection[]; +} + +/** + * @interface + * An interface representing StreamingPolicyContentKeys. + * Class to specify properties of all content keys in Streaming Policy + * + */ +export interface StreamingPolicyContentKeys { + /** + * @member {DefaultKey} [defaultKey] Default content key for an encryption + * scheme + */ + defaultKey?: DefaultKey; + /** + * @member {StreamingPolicyContentKey[]} [keyToTrackMappings] Representing + * tracks needs separate content key + */ + keyToTrackMappings?: StreamingPolicyContentKey[]; +} + +/** + * @interface + * An interface representing StreamingPolicyPlayReadyConfiguration. + * Class to specify configurations of PlayReady in Streaming Policy + * + */ +export interface StreamingPolicyPlayReadyConfiguration { + /** + * @member {string} [customLicenseAcquisitionUrlTemplate] Template for the + * URL of the custom service delivering licenses to end user players. Not + * required when using Azure Media Services for issuing licenses. The + * template supports replaceable tokens that the service will update at + * runtime with the value specific to the request. The currently supported + * token values are {AlternativeMediaId}, which is replaced with the value of + * StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + * replaced with the value of identifier of the key being requested. + */ + customLicenseAcquisitionUrlTemplate?: string; + /** + * @member {string} [playReadyCustomAttributes] Custom attributes for + * PlayReady + */ + playReadyCustomAttributes?: string; +} + +/** + * @interface + * An interface representing StreamingPolicyWidevineConfiguration. + * Class to specify configurations of Widevine in Streaming Policy + * + */ +export interface StreamingPolicyWidevineConfiguration { + /** + * @member {string} [customLicenseAcquisitionUrlTemplate] Template for the + * URL of the custom service delivering licenses to end user players. Not + * required when using Azure Media Services for issuing licenses. The + * template supports replaceable tokens that the service will update at + * runtime with the value specific to the request. The currently supported + * token values are {AlternativeMediaId}, which is replaced with the value of + * StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + * replaced with the value of identifier of the key being requested. + */ + customLicenseAcquisitionUrlTemplate?: string; +} + +/** + * @interface + * An interface representing StreamingPolicyFairPlayConfiguration. + * Class to specify configurations of FairPlay in Streaming Policy + * + */ +export interface StreamingPolicyFairPlayConfiguration { + /** + * @member {string} [customLicenseAcquisitionUrlTemplate] Template for the + * URL of the custom service delivering licenses to end user players. Not + * required when using Azure Media Services for issuing licenses. The + * template supports replaceable tokens that the service will update at + * runtime with the value specific to the request. The currently supported + * token values are {AlternativeMediaId}, which is replaced with the value of + * StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + * replaced with the value of identifier of the key being requested. + */ + customLicenseAcquisitionUrlTemplate?: string; + /** + * @member {boolean} allowPersistentLicense All license to be persistent or + * not + */ + allowPersistentLicense: boolean; +} + +/** + * @interface + * An interface representing CbcsDrmConfiguration. + * Class to specify DRM configurations of CommonEncryptionCbcs scheme in + * Streaming Policy + * + */ +export interface CbcsDrmConfiguration { + /** + * @member {StreamingPolicyFairPlayConfiguration} [fairPlay] FairPlay + * configurations + */ + fairPlay?: StreamingPolicyFairPlayConfiguration; + /** + * @member {StreamingPolicyPlayReadyConfiguration} [playReady] PlayReady + * configurations + */ + playReady?: StreamingPolicyPlayReadyConfiguration; + /** + * @member {StreamingPolicyWidevineConfiguration} [widevine] Widevine + * configurations + */ + widevine?: StreamingPolicyWidevineConfiguration; +} + +/** + * @interface + * An interface representing CencDrmConfiguration. + * Class to specify DRM configurations of CommonEncryptionCenc scheme in + * Streaming Policy + * + */ +export interface CencDrmConfiguration { + /** + * @member {StreamingPolicyPlayReadyConfiguration} [playReady] PlayReady + * configurations + */ + playReady?: StreamingPolicyPlayReadyConfiguration; + /** + * @member {StreamingPolicyWidevineConfiguration} [widevine] Widevine + * configurations + */ + widevine?: StreamingPolicyWidevineConfiguration; +} + +/** + * @interface + * An interface representing EnabledProtocols. + * Class to specify which protocols are enabled + * + */ +export interface EnabledProtocols { + /** + * @member {boolean} download Enable Download protocol or not + */ + download: boolean; + /** + * @member {boolean} dash Enable DASH protocol or not + */ + dash: boolean; + /** + * @member {boolean} hls Enable HLS protocol or not + */ + hls: boolean; + /** + * @member {boolean} smoothStreaming Enable SmoothStreaming protocol or not + */ + smoothStreaming: boolean; +} + +/** + * @interface + * An interface representing NoEncryption. + * Class for NoEncryption scheme + * + */ +export interface NoEncryption { + /** + * @member {EnabledProtocols} [enabledProtocols] Representing supported + * protocols + */ + enabledProtocols?: EnabledProtocols; +} + +/** + * @interface + * An interface representing EnvelopeEncryption. + * Class for EnvelopeEncryption encryption scheme + * + */ +export interface EnvelopeEncryption { + /** + * @member {EnabledProtocols} [enabledProtocols] Representing supported + * protocols + */ + enabledProtocols?: EnabledProtocols; + /** + * @member {TrackSelection[]} [clearTracks] Representing which tracks should + * not be encrypted + */ + clearTracks?: TrackSelection[]; + /** + * @member {StreamingPolicyContentKeys} [contentKeys] Representing default + * content key for each encryption scheme and separate content keys for + * specific tracks + */ + contentKeys?: StreamingPolicyContentKeys; + /** + * @member {string} [customKeyAcquisitionUrlTemplate] Template for the URL of + * the custom service delivering keys to end user players. Not required when + * using Azure Media Services for issuing keys. The template supports + * replaceable tokens that the service will update at runtime with the value + * specific to the request. The currently supported token values are + * {AlternativeMediaId}, which is replaced with the value of + * StreamingLocatorId.AlternativeMediaId, and {ContentKeyId}, which is + * replaced with the value of identifier of the key being requested. + */ + customKeyAcquisitionUrlTemplate?: string; +} + +/** + * @interface + * An interface representing CommonEncryptionCenc. + * Class for envelope encryption scheme + * + */ +export interface CommonEncryptionCenc { + /** + * @member {EnabledProtocols} [enabledProtocols] Representing supported + * protocols + */ + enabledProtocols?: EnabledProtocols; + /** + * @member {TrackSelection[]} [clearTracks] Representing which tracks should + * not be encrypted + */ + clearTracks?: TrackSelection[]; + /** + * @member {StreamingPolicyContentKeys} [contentKeys] Representing default + * content key for each encryption scheme and separate content keys for + * specific tracks + */ + contentKeys?: StreamingPolicyContentKeys; + /** + * @member {CencDrmConfiguration} [drm] Configuration of DRMs for + * CommonEncryptionCenc encryption scheme + */ + drm?: CencDrmConfiguration; +} + +/** + * @interface + * An interface representing CommonEncryptionCbcs. + * Class for CommonEncryptionCbcs encryption scheme + * + */ +export interface CommonEncryptionCbcs { + /** + * @member {EnabledProtocols} [enabledProtocols] Representing supported + * protocols + */ + enabledProtocols?: EnabledProtocols; + /** + * @member {TrackSelection[]} [clearTracks] Representing which tracks should + * not be encrypted + */ + clearTracks?: TrackSelection[]; + /** + * @member {StreamingPolicyContentKeys} [contentKeys] Representing default + * content key for each encryption scheme and separate content keys for + * specific tracks + */ + contentKeys?: StreamingPolicyContentKeys; + /** + * @member {CbcsDrmConfiguration} [drm] Configuration of DRMs for current + * encryption scheme + */ + drm?: CbcsDrmConfiguration; +} + +/** + * @interface + * An interface representing StreamingPolicy. + * A Streaming Policy resource + * + * @extends ProxyResource + */ +export interface StreamingPolicy extends ProxyResource { + /** + * @member {Date} [created] Creation time of Streaming Policy + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {string} [defaultContentKeyPolicyName] Default ContentKey used by + * current Streaming Policy + */ + defaultContentKeyPolicyName?: string; + /** + * @member {EnvelopeEncryption} [envelopeEncryption] Configuration of + * EnvelopeEncryption + */ + envelopeEncryption?: EnvelopeEncryption; + /** + * @member {CommonEncryptionCenc} [commonEncryptionCenc] Configuration of + * CommonEncryptionCenc + */ + commonEncryptionCenc?: CommonEncryptionCenc; + /** + * @member {CommonEncryptionCbcs} [commonEncryptionCbcs] Configuration of + * CommonEncryptionCbcs + */ + commonEncryptionCbcs?: CommonEncryptionCbcs; + /** + * @member {NoEncryption} [noEncryption] Configurations of NoEncryption + */ + noEncryption?: NoEncryption; +} + +/** + * @interface + * An interface representing StreamingLocatorContentKey. + * Class for content key in Streaming Locator + * + */ +export interface StreamingLocatorContentKey { + /** + * @member {string} id ID of Content Key + */ + id: string; + /** + * @member {StreamingLocatorContentKeyType} [type] Encryption type of Content + * Key. Possible values include: 'CommonEncryptionCenc', + * 'CommonEncryptionCbcs', 'EnvelopeEncryption' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: StreamingLocatorContentKeyType; + /** + * @member {string} [labelReferenceInStreamingPolicy] Label of Content Key as + * specified in the Streaming Policy + */ + labelReferenceInStreamingPolicy?: string; + /** + * @member {string} [value] Value of Content Key + */ + value?: string; + /** + * @member {string} [policyName] ContentKeyPolicy used by Content Key + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly policyName?: string; + /** + * @member {TrackSelection[]} [tracks] Tracks which use this Content Key + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tracks?: TrackSelection[]; +} + +/** + * @interface + * An interface representing StreamingPath. + * Class of paths for streaming + * + */ +export interface StreamingPath { + /** + * @member {StreamingPolicyStreamingProtocol} streamingProtocol Streaming + * protocol. Possible values include: 'Hls', 'Dash', 'SmoothStreaming', + * 'Download' + */ + streamingProtocol: StreamingPolicyStreamingProtocol; + /** + * @member {EncryptionScheme} encryptionScheme Encryption scheme. Possible + * values include: 'NoEncryption', 'EnvelopeEncryption', + * 'CommonEncryptionCenc', 'CommonEncryptionCbcs' + */ + encryptionScheme: EncryptionScheme; + /** + * @member {string[]} [paths] Streaming paths for each protocol and + * encryptionScheme pair + */ + paths?: string[]; +} + +/** + * @interface + * An interface representing ListContentKeysResponse. + * Class of response for listContentKeys action + * + */ +export interface ListContentKeysResponse { + /** + * @member {StreamingLocatorContentKey[]} [contentKeys] ContentKeys used by + * current Streaming Locator + */ + contentKeys?: StreamingLocatorContentKey[]; +} + +/** + * @interface + * An interface representing ListPathsResponse. + * Class of response for listPaths action + * + */ +export interface ListPathsResponse { + /** + * @member {StreamingPath[]} [streamingPaths] Streaming Paths supported by + * current Streaming Locator + */ + streamingPaths?: StreamingPath[]; + /** + * @member {string[]} [downloadPaths] Download Paths supported by current + * Streaming Locator + */ + downloadPaths?: string[]; +} + +/** + * @interface + * An interface representing StreamingLocator. + * A Streaming Locator resource + * + * @extends ProxyResource + */ +export interface StreamingLocator extends ProxyResource { + /** + * @member {string} assetName Asset Name + */ + assetName: string; + /** + * @member {Date} [created] The creation time of the Streaming Locator. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [startTime] The start time of the Streaming Locator. + */ + startTime?: Date; + /** + * @member {Date} [endTime] The end time of the Streaming Locator. + */ + endTime?: Date; + /** + * @member {string} [streamingLocatorId] The StreamingLocatorId of the + * Streaming Locator. + */ + streamingLocatorId?: string; + /** + * @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_MultiDrmCencStreaming' and + * 'Predefined_MultiDrmStreaming' + */ + streamingPolicyName: string; + /** + * @member {string} [defaultContentKeyPolicyName] Name of the default + * ContentKeyPolicy used by this Streaming Locator. + */ + defaultContentKeyPolicyName?: string; + /** + * @member {StreamingLocatorContentKey[]} [contentKeys] The ContentKeys used + * by this Streaming Locator. + */ + contentKeys?: StreamingLocatorContentKey[]; + /** + * @member {string} [alternativeMediaId] Alternative Media ID of this + * Streaming Locator + */ + alternativeMediaId?: string; + /** + * @member {string[]} [filters] A list of asset or account filters which + * apply to this streaming locator + */ + filters?: string[]; +} + +/** + * @interface + * An interface representing Hls. + * The HLS configuration. + * + */ +export interface Hls { + /** + * @member {number} [fragmentsPerTsSegment] The amount of fragments per HTTP + * Live Streaming (HLS) segment. + */ + fragmentsPerTsSegment?: number; +} + +/** + * @interface + * An interface representing LiveOutput. + * The Live Output. + * + * @extends ProxyResource + */ +export interface LiveOutput extends ProxyResource { + /** + * @member {string} [description] The description of the Live Output. + */ + description?: string; + /** + * @member {string} assetName The asset name. + */ + assetName: string; + /** + * @member {string} archiveWindowLength ISO 8601 timespan duration of the + * archive window length. This is duration that customer want to retain the + * recorded content. + */ + archiveWindowLength: string; + /** + * @member {string} [manifestName] The manifest file name. If not provided, + * the service will generate one automatically. + */ + manifestName?: string; + /** + * @member {Hls} [hls] The HLS configuration. + */ + hls?: Hls; + /** + * @member {number} [outputSnapTime] The output snapshot time. + */ + outputSnapTime?: number; + /** + * @member {Date} [created] The exact time the Live Output was created. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The exact time the Live Output was last + * modified. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; + /** + * @member {string} [provisioningState] The provisioning state of the Live + * Output. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {LiveOutputResourceState} [resourceState] The resource state of + * the Live Output. Possible values include: 'Creating', 'Running', + * 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceState?: LiveOutputResourceState; +} + +/** + * @interface + * An interface representing LiveEventEndpoint. + * The Live Event endpoint. + * + */ +export interface LiveEventEndpoint { + /** + * @member {string} [protocol] The endpoint protocol. + */ + protocol?: string; + /** + * @member {string} [url] The endpoint URL. + */ + url?: string; +} + +/** + * @interface + * An interface representing IPRange. + * The IP address range in the CIDR scheme. + * + */ +export interface IPRange { + /** + * @member {string} [name] The friendly name for the IP address range. + */ + name?: string; + /** + * @member {string} [address] The IP address. + */ + address?: string; + /** + * @member {number} [subnetPrefixLength] The subnet mask prefix length (see + * CIDR notation). + */ + subnetPrefixLength?: number; +} + +/** + * @interface + * An interface representing IPAccessControl. + * The IP access control. + * + */ +export interface IPAccessControl { + /** + * @member {IPRange[]} [allow] The IP allow list. + */ + allow?: IPRange[]; +} + +/** + * @interface + * An interface representing LiveEventInputAccessControl. + * The IP access control for Live Event Input. + * + */ +export interface LiveEventInputAccessControl { + /** + * @member {IPAccessControl} [ip] The IP access control properties. + */ + ip?: IPAccessControl; +} + +/** + * @interface + * An interface representing LiveEventInput. + * The Live Event input. + * + */ +export interface LiveEventInput { + /** + * @member {LiveEventInputProtocol} streamingProtocol The streaming protocol + * for the Live Event. This is specified at creation time and cannot be + * updated. Possible values include: 'FragmentedMP4', 'RTMP' + */ + streamingProtocol: LiveEventInputProtocol; + /** + * @member {LiveEventInputAccessControl} [accessControl] The access control + * for LiveEvent Input. + */ + accessControl?: LiveEventInputAccessControl; + /** + * @member {string} [keyFrameIntervalDuration] ISO 8601 timespan duration of + * the key frame interval duration. + */ + keyFrameIntervalDuration?: string; + /** + * @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. + */ + accessToken?: string; + /** + * @member {LiveEventEndpoint[]} [endpoints] The input endpoints for the Live + * Event. + */ + endpoints?: LiveEventEndpoint[]; +} + +/** + * @interface + * An interface representing LiveEventPreviewAccessControl. + * The IP access control for Live Event preview. + * + */ +export interface LiveEventPreviewAccessControl { + /** + * @member {IPAccessControl} [ip] The IP access control properties. + */ + ip?: IPAccessControl; +} + +/** + * @interface + * An interface representing LiveEventPreview. + * The Live Event preview. + * + */ +export interface LiveEventPreview { + /** + * @member {LiveEventEndpoint[]} [endpoints] The endpoints for preview. + */ + endpoints?: LiveEventEndpoint[]; + /** + * @member {LiveEventPreviewAccessControl} [accessControl] The access control + * for LiveEvent preview. + */ + accessControl?: LiveEventPreviewAccessControl; + /** + * @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. + */ + previewLocator?: string; + /** + * @member {string} [streamingPolicyName] The name of streaming policy used + * for the LiveEvent preview. This value is specified at creation time and + * cannot be updated. + */ + streamingPolicyName?: string; + /** + * @member {string} [alternativeMediaId] An Alternative Media 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. + */ + alternativeMediaId?: string; +} + +/** + * @interface + * An interface representing LiveEventEncoding. + * The Live Event encoding. + * + */ +export interface LiveEventEncoding { + /** + * @member {LiveEventEncodingType} [encodingType] The encoding type for Live + * Event. This value is specified at creation time and cannot be updated. + * Possible values include: 'None', 'Basic', 'Standard' + */ + encodingType?: LiveEventEncodingType; + /** + * @member {string} [presetName] The encoding preset name. This value is + * specified at creation time and cannot be updated. + */ + presetName?: string; +} + +/** + * @interface + * An interface representing CrossSiteAccessPolicies. + * The client access policy. + * + */ +export interface CrossSiteAccessPolicies { + /** + * @member {string} [clientAccessPolicy] The content of + * clientaccesspolicy.xml used by Silverlight. + */ + clientAccessPolicy?: string; + /** + * @member {string} [crossDomainPolicy] The content of crossdomain.xml used + * by Silverlight. + */ + crossDomainPolicy?: string; +} + +/** + * @interface + * An interface representing LiveEventActionInput. + * The LiveEvent action input parameter definition. + * + */ +export interface LiveEventActionInput { + /** + * @member {boolean} [removeOutputsOnStop] The flag indicates if remove + * LiveOutputs on Stop. + */ + removeOutputsOnStop?: boolean; +} + +/** + * @interface + * An interface representing LiveEvent. + * The Live Event. + * + * @extends TrackedResource + */ +export interface LiveEvent extends TrackedResource { + /** + * @member {string} [description] The Live Event description. + */ + description?: string; + /** + * @member {LiveEventInput} input The Live Event input. + */ + input: LiveEventInput; + /** + * @member {LiveEventPreview} [preview] The Live Event preview. + */ + preview?: LiveEventPreview; + /** + * @member {LiveEventEncoding} [encoding] The Live Event encoding. + */ + encoding?: LiveEventEncoding; + /** + * @member {string} [provisioningState] The provisioning state of the Live + * Event. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {LiveEventResourceState} [resourceState] The resource state of the + * Live Event. Possible values include: 'Stopped', 'Starting', 'Running', + * 'Stopping', 'Deleting' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceState?: LiveEventResourceState; + /** + * @member {CrossSiteAccessPolicies} [crossSiteAccessPolicies] The Live Event + * access policies. + */ + crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** + * @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. + */ + vanityUrl?: boolean; + /** + * @member {StreamOptionsFlag[]} [streamOptions] The options to use for the + * LiveEvent. This value is specified at creation time and cannot be + * updated. + */ + streamOptions?: StreamOptionsFlag[]; + /** + * @member {Date} [created] The exact time the Live Event was created. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The exact time the Live Event was last + * modified. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; +} + +/** + * @interface + * An interface representing AkamaiSignatureHeaderAuthenticationKey. + * Akamai Signature Header authentication key. + * + */ +export interface AkamaiSignatureHeaderAuthenticationKey { + /** + * @member {string} [identifier] identifier of the key + */ + identifier?: string; + /** + * @member {string} [base64Key] authentication key + */ + base64Key?: string; + /** + * @member {Date} [expiration] The expiration time of the authentication key. + */ + expiration?: Date; +} + +/** + * @interface + * An interface representing AkamaiAccessControl. + * Akamai access control + * + */ +export interface AkamaiAccessControl { + /** + * @member {AkamaiSignatureHeaderAuthenticationKey[]} + * [akamaiSignatureHeaderAuthenticationKeyList] authentication key list + */ + akamaiSignatureHeaderAuthenticationKeyList?: AkamaiSignatureHeaderAuthenticationKey[]; +} + +/** + * @interface + * An interface representing StreamingEndpointAccessControl. + * StreamingEndpoint access control definition. + * + */ +export interface StreamingEndpointAccessControl { + /** + * @member {AkamaiAccessControl} [akamai] The access control of Akamai + */ + akamai?: AkamaiAccessControl; + /** + * @member {IPAccessControl} [ip] The IP access control of the + * StreamingEndpoint. + */ + ip?: IPAccessControl; +} + +/** + * @interface + * An interface representing StreamingEntityScaleUnit. + * scale units definition + * + */ +export interface StreamingEntityScaleUnit { + /** + * @member {number} [scaleUnit] The scale unit number of the + * StreamingEndpoint. + */ + scaleUnit?: number; +} + +/** + * @interface + * An interface representing StreamingEndpoint. + * The StreamingEndpoint. + * + * @extends TrackedResource + */ +export interface StreamingEndpoint extends TrackedResource { + /** + * @member {string} [description] The StreamingEndpoint description. + */ + description?: string; + /** + * @member {number} scaleUnits The number of scale units. Use the Scale + * operation to adjust this value. + */ + scaleUnits: number; + /** + * @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. + */ + availabilitySetName?: string; + /** + * @member {StreamingEndpointAccessControl} [accessControl] The access + * control definition of the StreamingEndpoint. + */ + accessControl?: StreamingEndpointAccessControl; + /** + * @member {number} [maxCacheAge] Max cache age + */ + maxCacheAge?: number; + /** + * @member {string[]} [customHostNames] The custom host names of the + * StreamingEndpoint + */ + customHostNames?: string[]; + /** + * @member {string} [hostName] The StreamingEndpoint host name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly hostName?: string; + /** + * @member {boolean} [cdnEnabled] The CDN enabled flag. + */ + cdnEnabled?: boolean; + /** + * @member {string} [cdnProvider] The CDN provider name. + */ + cdnProvider?: string; + /** + * @member {string} [cdnProfile] The CDN profile name. + */ + cdnProfile?: string; + /** + * @member {string} [provisioningState] The provisioning state of the + * StreamingEndpoint. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {StreamingEndpointResourceState} [resourceState] The resource + * state of the StreamingEndpoint. Possible values include: 'Stopped', + * 'Starting', 'Running', 'Stopping', 'Deleting', 'Scaling' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceState?: StreamingEndpointResourceState; + /** + * @member {CrossSiteAccessPolicies} [crossSiteAccessPolicies] The + * StreamingEndpoint access policies. + */ + crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** + * @member {Date} [freeTrialEndTime] The free trial expiration time. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly freeTrialEndTime?: Date; + /** + * @member {Date} [created] The exact time the StreamingEndpoint was created. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly created?: Date; + /** + * @member {Date} [lastModified] The exact time the StreamingEndpoint was + * last modified. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastModified?: Date; +} + +/** + * @interface + * An interface representing AssetsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface AssetsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {number} [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. + */ + top?: number; + /** + * @member {string} [orderby] Specifies the the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing ContentKeyPoliciesListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ContentKeyPoliciesListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {number} [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. + */ + top?: number; + /** + * @member {string} [orderby] Specifies the the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing TransformsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TransformsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {string} [orderby] Specifies the the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing JobsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface JobsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {string} [orderby] Specifies the the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing StreamingPoliciesListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface StreamingPoliciesListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {number} [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. + */ + top?: number; + /** + * @member {string} [orderby] Specifies the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing StreamingLocatorsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface StreamingLocatorsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Restricts the set of items returned. + */ + filter?: string; + /** + * @member {number} [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. + */ + top?: number; + /** + * @member {string} [orderby] Specifies the key by which the result + * collection should be ordered. + */ + orderby?: string; +} + +/** + * @interface + * An interface representing LiveEventsCreateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface LiveEventsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [autoStart] The flag indicates if the resource should be + * automatically started on creation. + */ + autoStart?: boolean; +} + +/** + * @interface + * An interface representing LiveEventsBeginCreateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface LiveEventsBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [autoStart] The flag indicates if the resource should be + * automatically started on creation. + */ + autoStart?: boolean; +} + +/** + * @interface + * An interface representing StreamingEndpointsCreateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface StreamingEndpointsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [autoStart] The flag indicates if the resource should be + * automatically started on creation. + */ + autoStart?: boolean; +} + +/** + * @interface + * An interface representing StreamingEndpointsBeginCreateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface StreamingEndpointsBeginCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {boolean} [autoStart] The flag indicates if the resource should be + * automatically started on creation. + */ + autoStart?: boolean; +} + +/** + * @interface + * An interface representing AzureMediaServicesOptions. + * @extends AzureServiceClientOptions + */ +export interface AzureMediaServicesOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the AccountFilterCollection. + * A collection of AccountFilter items. + * + * @extends Array + */ +export interface AccountFilterCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the OperationCollection. + * A collection of Operation items. + * + * @extends Array + */ +export interface OperationCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the MediaServiceCollection. + * A collection of MediaService items. + * + * @extends Array + */ +export interface MediaServiceCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the SubscriptionMediaServiceCollection. + * A collection of SubscriptionMediaService items. + * + * @extends Array + */ +export interface SubscriptionMediaServiceCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the AssetCollection. + * A collection of Asset items. + * + * @extends Array + */ +export interface AssetCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the AssetFilterCollection. + * A collection of AssetFilter items. + * + * @extends Array + */ +export interface AssetFilterCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the ContentKeyPolicyCollection. + * A collection of ContentKeyPolicy items. + * + * @extends Array + */ +export interface ContentKeyPolicyCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the TransformCollection. + * A collection of Transform items. + * + * @extends Array + */ +export interface TransformCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the JobCollection. + * A collection of Job items. + * + * @extends Array + */ +export interface JobCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the StreamingPolicyCollection. + * A collection of StreamingPolicy items. + * + * @extends Array + */ +export interface StreamingPolicyCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the StreamingLocatorCollection. + * A collection of StreamingLocator items. + * + * @extends Array + */ +export interface StreamingLocatorCollection extends Array { + /** + * @member {string} [odatanextLink] A link to the next page of the collection + * (when the collection contains too many results to return in one response). + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the LiveEventListResult. + * @summary LiveEventListResult + * + * The LiveEvent list result. + * + * @extends Array + */ +export interface LiveEventListResult extends Array { + /** + * @member {number} [odatacount] The number of result. + */ + odatacount?: number; + /** + * @member {string} [odatanextLink] Th link to the next set of results. Not + * empty if value contains incomplete list of Live Outputs. + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the LiveOutputListResult. + * @summary LiveOutputListResult + * + * The LiveOutput list result. + * + * @extends Array + */ +export interface LiveOutputListResult extends Array { + /** + * @member {number} [odatacount] The number of result. + */ + odatacount?: number; + /** + * @member {string} [odatanextLink] Th link to the next set of results. Not + * empty if value contains incomplete list of Live Outputs. + */ + odatanextLink?: string; +} + +/** + * @interface + * An interface representing the StreamingEndpointListResult. + * @summary StreamingEndpointListResult + * + * The StreamingEndpoint list result. + * + * @extends Array + */ +export interface StreamingEndpointListResult extends Array { + /** + * @member {number} [odatacount] The number of result. + */ + odatacount?: number; + /** + * @member {string} [odatanextLink] Th link to the next set of results. Not + * empty if value contains incomplete list of StreamingEndpoints. + */ + odatanextLink?: string; +} + +/** + * Defines values for FilterTrackPropertyType. + * Possible values include: 'Unknown', 'Type', 'Name', 'Language', 'FourCC', 'Bitrate' + * @readonly + * @enum {string} + */ +export type FilterTrackPropertyType = 'Unknown' | 'Type' | 'Name' | 'Language' | 'FourCC' | 'Bitrate'; + +/** + * Defines values for FilterTrackPropertyCompareOperation. + * Possible values include: 'Equal', 'NotEqual' + * @readonly + * @enum {string} + */ +export type FilterTrackPropertyCompareOperation = 'Equal' | 'NotEqual'; + +/** + * Defines values for MetricUnit. + * Possible values include: 'Bytes', 'Count', 'Milliseconds' + * @readonly + * @enum {string} + */ +export type MetricUnit = 'Bytes' | 'Count' | 'Milliseconds'; + +/** + * Defines values for MetricAggregationType. + * Possible values include: 'Average', 'Count', 'Total' + * @readonly + * @enum {string} + */ +export type MetricAggregationType = 'Average' | 'Count' | 'Total'; + +/** + * Defines values for StorageAccountType. + * Possible values include: 'Primary', 'Secondary' + * @readonly + * @enum {string} + */ +export type StorageAccountType = 'Primary' | 'Secondary'; + +/** + * Defines values for AssetStorageEncryptionFormat. + * Possible values include: 'None', 'MediaStorageClientEncryption' + * @readonly + * @enum {string} + */ +export type AssetStorageEncryptionFormat = 'None' | 'MediaStorageClientEncryption'; + +/** + * Defines values for AssetContainerPermission. + * Possible values include: 'Read', 'ReadWrite', 'ReadWriteDelete' + * @readonly + * @enum {string} + */ +export type AssetContainerPermission = 'Read' | 'ReadWrite' | 'ReadWriteDelete'; + +/** + * Defines values for ContentKeyPolicyPlayReadyUnknownOutputPassingOption. + * Possible values include: 'Unknown', 'NotAllowed', 'Allowed', 'AllowedWithVideoConstriction' + * @readonly + * @enum {string} + */ +export type ContentKeyPolicyPlayReadyUnknownOutputPassingOption = 'Unknown' | 'NotAllowed' | 'Allowed' | 'AllowedWithVideoConstriction'; + +/** + * Defines values for ContentKeyPolicyPlayReadyLicenseType. + * Possible values include: 'Unknown', 'NonPersistent', 'Persistent' + * @readonly + * @enum {string} + */ +export type ContentKeyPolicyPlayReadyLicenseType = 'Unknown' | 'NonPersistent' | 'Persistent'; + +/** + * Defines values for ContentKeyPolicyPlayReadyContentType. + * Possible values include: 'Unknown', 'Unspecified', 'UltraVioletDownload', 'UltraVioletStreaming' + * @readonly + * @enum {string} + */ +export type ContentKeyPolicyPlayReadyContentType = 'Unknown' | 'Unspecified' | 'UltraVioletDownload' | 'UltraVioletStreaming'; + +/** + * Defines values for ContentKeyPolicyRestrictionTokenType. + * Possible values include: 'Unknown', 'Swt', 'Jwt' + * @readonly + * @enum {string} + */ +export type ContentKeyPolicyRestrictionTokenType = 'Unknown' | 'Swt' | 'Jwt'; + +/** + * Defines values for ContentKeyPolicyFairPlayRentalAndLeaseKeyType. + * Possible values include: 'Unknown', 'Undefined', 'PersistentUnlimited', 'PersistentLimited' + * @readonly + * @enum {string} + */ +export type ContentKeyPolicyFairPlayRentalAndLeaseKeyType = 'Unknown' | 'Undefined' | 'PersistentUnlimited' | 'PersistentLimited'; + +/** + * Defines values for AacAudioProfile. + * Possible values include: 'AacLc', 'HeAacV1', 'HeAacV2' + * @readonly + * @enum {string} + */ +export type AacAudioProfile = 'AacLc' | 'HeAacV1' | 'HeAacV2'; + +/** + * Defines values for AnalysisResolution. + * Possible values include: 'SourceResolution', 'StandardDefinition' + * @readonly + * @enum {string} + */ +export type AnalysisResolution = 'SourceResolution' | 'StandardDefinition'; + +/** + * Defines values for StretchMode. + * Possible values include: 'None', 'AutoSize', 'AutoFit' + * @readonly + * @enum {string} + */ +export type StretchMode = 'None' | 'AutoSize' | 'AutoFit'; + +/** + * Defines values for DeinterlaceParity. + * Possible values include: 'Auto', 'TopFieldFirst', 'BottomFieldFirst' + * @readonly + * @enum {string} + */ +export type DeinterlaceParity = 'Auto' | 'TopFieldFirst' | 'BottomFieldFirst'; + +/** + * Defines values for DeinterlaceMode. + * Possible values include: 'Off', 'AutoPixelAdaptive' + * @readonly + * @enum {string} + */ +export type DeinterlaceMode = 'Off' | 'AutoPixelAdaptive'; + +/** + * Defines values for Rotation. + * Possible values include: 'Auto', 'None', 'Rotate0', 'Rotate90', 'Rotate180', 'Rotate270' + * @readonly + * @enum {string} + */ +export type Rotation = 'Auto' | 'None' | 'Rotate0' | 'Rotate90' | 'Rotate180' | 'Rotate270'; + +/** + * Defines values for H264VideoProfile. + * Possible values include: 'Auto', 'Baseline', 'Main', 'High', 'High422', 'High444' + * @readonly + * @enum {string} + */ +export type H264VideoProfile = 'Auto' | 'Baseline' | 'Main' | 'High' | 'High422' | 'High444'; + +/** + * Defines values for EntropyMode. + * Possible values include: 'Cabac', 'Cavlc' + * @readonly + * @enum {string} + */ +export type EntropyMode = 'Cabac' | 'Cavlc'; + +/** + * Defines values for H264Complexity. + * Possible values include: 'Speed', 'Balanced', 'Quality' + * @readonly + * @enum {string} + */ +export type H264Complexity = 'Speed' | 'Balanced' | 'Quality'; + +/** + * Defines values for EncoderNamedPreset. + * Possible values include: 'H264SingleBitrateSD', 'H264SingleBitrate720p', + * 'H264SingleBitrate1080p', 'AdaptiveStreaming', 'AACGoodQualityAudio', + * 'ContentAwareEncodingExperimental', 'H264MultipleBitrate1080p', 'H264MultipleBitrate720p', + * 'H264MultipleBitrateSD' + * @readonly + * @enum {string} + */ +export type EncoderNamedPreset = 'H264SingleBitrateSD' | 'H264SingleBitrate720p' | 'H264SingleBitrate1080p' | 'AdaptiveStreaming' | 'AACGoodQualityAudio' | 'ContentAwareEncodingExperimental' | 'H264MultipleBitrate1080p' | 'H264MultipleBitrate720p' | 'H264MultipleBitrateSD'; + +/** + * Defines values for InsightsType. + * Possible values include: 'AudioInsightsOnly', 'VideoInsightsOnly', 'AllInsights' + * @readonly + * @enum {string} + */ +export type InsightsType = 'AudioInsightsOnly' | 'VideoInsightsOnly' | 'AllInsights'; + +/** + * Defines values for OnErrorType. + * Possible values include: 'StopProcessingJob', 'ContinueJob' + * @readonly + * @enum {string} + */ +export type OnErrorType = 'StopProcessingJob' | 'ContinueJob'; + +/** + * Defines values for Priority. + * Possible values include: 'Low', 'Normal', 'High' + * @readonly + * @enum {string} + */ +export type Priority = 'Low' | 'Normal' | 'High'; + +/** + * Defines values for JobErrorCode. + * Possible values include: 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', + * 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', + * 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' + * @readonly + * @enum {string} + */ +export type JobErrorCode = 'ServiceError' | 'ServiceTransientError' | 'DownloadNotAccessible' | 'DownloadTransientError' | 'UploadNotAccessible' | 'UploadTransientError' | 'ConfigurationUnsupported' | 'ContentMalformed' | 'ContentUnsupported'; + +/** + * Defines values for JobErrorCategory. + * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' + * @readonly + * @enum {string} + */ +export type JobErrorCategory = 'Service' | 'Download' | 'Upload' | 'Configuration' | 'Content'; + +/** + * Defines values for JobRetry. + * Possible values include: 'DoNotRetry', 'MayRetry' + * @readonly + * @enum {string} + */ +export type JobRetry = 'DoNotRetry' | 'MayRetry'; + +/** + * Defines values for JobState. + * Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + * 'Scheduled' + * @readonly + * @enum {string} + */ +export type JobState = 'Canceled' | 'Canceling' | 'Error' | 'Finished' | 'Processing' | 'Queued' | 'Scheduled'; + +/** + * Defines values for TrackPropertyType. + * Possible values include: 'Unknown', 'FourCC' + * @readonly + * @enum {string} + */ +export type TrackPropertyType = 'Unknown' | 'FourCC'; + +/** + * Defines values for TrackPropertyCompareOperation. + * Possible values include: 'Unknown', 'Equal' + * @readonly + * @enum {string} + */ +export type TrackPropertyCompareOperation = 'Unknown' | 'Equal'; + +/** + * Defines values for StreamingLocatorContentKeyType. + * Possible values include: 'CommonEncryptionCenc', 'CommonEncryptionCbcs', 'EnvelopeEncryption' + * @readonly + * @enum {string} + */ +export type StreamingLocatorContentKeyType = 'CommonEncryptionCenc' | 'CommonEncryptionCbcs' | 'EnvelopeEncryption'; + +/** + * Defines values for StreamingPolicyStreamingProtocol. + * Possible values include: 'Hls', 'Dash', 'SmoothStreaming', 'Download' + * @readonly + * @enum {string} + */ +export type StreamingPolicyStreamingProtocol = 'Hls' | 'Dash' | 'SmoothStreaming' | 'Download'; + +/** + * Defines values for EncryptionScheme. + * Possible values include: 'NoEncryption', 'EnvelopeEncryption', 'CommonEncryptionCenc', + * 'CommonEncryptionCbcs' + * @readonly + * @enum {string} + */ +export type EncryptionScheme = 'NoEncryption' | 'EnvelopeEncryption' | 'CommonEncryptionCenc' | 'CommonEncryptionCbcs'; + +/** + * Defines values for LiveOutputResourceState. + * Possible values include: 'Creating', 'Running', 'Deleting' + * @readonly + * @enum {string} + */ +export type LiveOutputResourceState = 'Creating' | 'Running' | 'Deleting'; + +/** + * Defines values for LiveEventInputProtocol. + * Possible values include: 'FragmentedMP4', 'RTMP' + * @readonly + * @enum {string} + */ +export type LiveEventInputProtocol = 'FragmentedMP4' | 'RTMP'; + +/** + * Defines values for LiveEventEncodingType. + * Possible values include: 'None', 'Basic', 'Standard' + * @readonly + * @enum {string} + */ +export type LiveEventEncodingType = 'None' | 'Basic' | 'Standard'; + +/** + * Defines values for LiveEventResourceState. + * Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping', 'Deleting' + * @readonly + * @enum {string} + */ +export type LiveEventResourceState = 'Stopped' | 'Starting' | 'Running' | 'Stopping' | 'Deleting'; + +/** + * Defines values for StreamOptionsFlag. + * Possible values include: 'Default', 'LowLatency' + * @readonly + * @enum {string} + */ +export type StreamOptionsFlag = 'Default' | 'LowLatency'; + +/** + * Defines values for StreamingEndpointResourceState. + * Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping', 'Deleting', 'Scaling' + * @readonly + * @enum {string} + */ +export type StreamingEndpointResourceState = 'Stopped' | 'Starting' | 'Running' | 'Stopping' | 'Deleting' | 'Scaling'; + +/** + * Contains response data for the list operation. + */ +export type AccountFiltersListResponse = AccountFilterCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountFilterCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AccountFiltersGetResponse = AccountFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountFilter; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AccountFiltersCreateOrUpdateResponse = AccountFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountFilter; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type AccountFiltersUpdateResponse = AccountFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountFilter; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AccountFiltersListNextResponse = AccountFilterCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountFilterCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationCollection; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type MediaservicesListResponse = MediaServiceCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MediaServiceCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type MediaservicesGetResponse = MediaService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MediaService; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type MediaservicesCreateOrUpdateResponse = MediaService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MediaService; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type MediaservicesUpdateResponse = MediaService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MediaService; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type MediaservicesListBySubscriptionResponse = SubscriptionMediaServiceCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionMediaServiceCollection; + }; +}; + +/** + * Contains response data for the getBySubscription operation. + */ +export type MediaservicesGetBySubscriptionResponse = SubscriptionMediaService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionMediaService; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type MediaservicesListNextResponse = MediaServiceCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MediaServiceCollection; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type MediaservicesListBySubscriptionNextResponse = SubscriptionMediaServiceCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionMediaServiceCollection; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type LocationsCheckNameAvailabilityResponse = EntityNameAvailabilityCheckOutput & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: EntityNameAvailabilityCheckOutput; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AssetsListResponse = AssetCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AssetsGetResponse = Asset & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Asset; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AssetsCreateOrUpdateResponse = Asset & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Asset; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type AssetsUpdateResponse = Asset & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Asset; + }; +}; + +/** + * Contains response data for the listContainerSas operation. + */ +export type AssetsListContainerSasResponse = AssetContainerSas & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetContainerSas; + }; +}; + +/** + * Contains response data for the getEncryptionKey operation. + */ +export type AssetsGetEncryptionKeyResponse = StorageEncryptedAssetDecryptionData & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StorageEncryptedAssetDecryptionData; + }; +}; + +/** + * Contains response data for the listStreamingLocators operation. + */ +export type AssetsListStreamingLocatorsResponse = ListStreamingLocatorsResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListStreamingLocatorsResponse; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AssetsListNextResponse = AssetCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AssetFiltersListResponse = AssetFilterCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetFilterCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AssetFiltersGetResponse = AssetFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetFilter; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AssetFiltersCreateOrUpdateResponse = AssetFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetFilter; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type AssetFiltersUpdateResponse = AssetFilter & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetFilter; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AssetFiltersListNextResponse = AssetFilterCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: AssetFilterCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ContentKeyPoliciesListResponse = ContentKeyPolicyCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicyCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ContentKeyPoliciesGetResponse = ContentKeyPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicy; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ContentKeyPoliciesCreateOrUpdateResponse = ContentKeyPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicy; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ContentKeyPoliciesUpdateResponse = ContentKeyPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicy; + }; +}; + +/** + * Contains response data for the getPolicyPropertiesWithSecrets operation. + */ +export type ContentKeyPoliciesGetPolicyPropertiesWithSecretsResponse = ContentKeyPolicyProperties & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicyProperties; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ContentKeyPoliciesListNextResponse = ContentKeyPolicyCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ContentKeyPolicyCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type TransformsListResponse = TransformCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransformCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TransformsGetResponse = Transform & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Transform; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type TransformsCreateOrUpdateResponse = Transform & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Transform; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type TransformsUpdateResponse = Transform & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Transform; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type TransformsListNextResponse = TransformCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: TransformCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type JobsListResponse = JobCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type JobsGetResponse = Job & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Job; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type JobsCreateResponse = Job & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Job; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type JobsUpdateResponse = Job & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Job; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type JobsListNextResponse = JobCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: JobCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type StreamingPoliciesListResponse = StreamingPolicyCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingPolicyCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type StreamingPoliciesGetResponse = StreamingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingPolicy; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type StreamingPoliciesCreateResponse = StreamingPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingPolicy; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type StreamingPoliciesListNextResponse = StreamingPolicyCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingPolicyCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type StreamingLocatorsListResponse = StreamingLocatorCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingLocatorCollection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type StreamingLocatorsGetResponse = StreamingLocator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingLocator; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type StreamingLocatorsCreateResponse = StreamingLocator & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingLocator; + }; +}; + +/** + * Contains response data for the listContentKeys operation. + */ +export type StreamingLocatorsListContentKeysResponse = ListContentKeysResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListContentKeysResponse; + }; +}; + +/** + * Contains response data for the listPaths operation. + */ +export type StreamingLocatorsListPathsResponse = ListPathsResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListPathsResponse; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type StreamingLocatorsListNextResponse = StreamingLocatorCollection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingLocatorCollection; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LiveEventsListResponse = LiveEventListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEventListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LiveEventsGetResponse = LiveEvent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEvent; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type LiveEventsCreateResponse = LiveEvent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEvent; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type LiveEventsUpdateResponse = LiveEvent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEvent; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type LiveEventsBeginCreateResponse = LiveEvent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEvent; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type LiveEventsBeginUpdateResponse = LiveEvent & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEvent; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type LiveEventsListNextResponse = LiveEventListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveEventListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type LiveOutputsListResponse = LiveOutputListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveOutputListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LiveOutputsGetResponse = LiveOutput & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveOutput; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type LiveOutputsCreateResponse = LiveOutput & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveOutput; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type LiveOutputsBeginCreateResponse = LiveOutput & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveOutput; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type LiveOutputsListNextResponse = LiveOutputListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: LiveOutputListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type StreamingEndpointsListResponse = StreamingEndpointListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpointListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type StreamingEndpointsGetResponse = StreamingEndpoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpoint; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type StreamingEndpointsCreateResponse = StreamingEndpoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpoint; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type StreamingEndpointsUpdateResponse = StreamingEndpoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpoint; + }; +}; + +/** + * Contains response data for the beginCreate operation. + */ +export type StreamingEndpointsBeginCreateResponse = StreamingEndpoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpoint; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type StreamingEndpointsBeginUpdateResponse = StreamingEndpoint & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpoint; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type StreamingEndpointsListNextResponse = StreamingEndpointListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: StreamingEndpointListResult; + }; +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/jobsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/jobsMappers.ts new file mode 100644 index 000000000000..87741a4b0f5a --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/jobsMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + JobCollection, + Job, + ProxyResource, + Resource, + BaseResource, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + ApiError, + ODataError, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/liveEventsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/liveEventsMappers.ts new file mode 100644 index 000000000000..35e4aeee9e88 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/liveEventsMappers.ts @@ -0,0 +1,138 @@ +/* + * 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. + */ + +export { + discriminators, + LiveEventListResult, + LiveEvent, + TrackedResource, + Resource, + BaseResource, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + ApiError, + ODataError, + LiveEventActionInput, + ProxyResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + AccountFilter, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/liveOutputsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/liveOutputsMappers.ts new file mode 100644 index 000000000000..e926810cc76d --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/liveOutputsMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + LiveOutputListResult, + LiveOutput, + ProxyResource, + Resource, + BaseResource, + Hls, + ApiError, + ODataError, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/locationsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/locationsMappers.ts new file mode 100644 index 000000000000..1f4bf35ac47e --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/locationsMappers.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ + +export { + discriminators, + CheckNameAvailabilityInput, + EntityNameAvailabilityCheckOutput, + ApiError, + ODataError +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/mappers.ts new file mode 100644 index 000000000000..b0fca3573926 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/mappers.ts @@ -0,0 +1,5018 @@ +/* + * 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. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const PresentationTimeRange: msRest.CompositeMapper = { + serializedName: "PresentationTimeRange", + type: { + name: "Composite", + className: "PresentationTimeRange", + modelProperties: { + startTimestamp: { + serializedName: "startTimestamp", + type: { + name: "Number" + } + }, + endTimestamp: { + serializedName: "endTimestamp", + type: { + name: "Number" + } + }, + presentationWindowDuration: { + serializedName: "presentationWindowDuration", + type: { + name: "Number" + } + }, + liveBackoffDuration: { + serializedName: "liveBackoffDuration", + type: { + name: "Number" + } + }, + timescale: { + serializedName: "timescale", + type: { + name: "Number" + } + }, + forceEndTimestamp: { + serializedName: "forceEndTimestamp", + type: { + name: "Boolean" + } + } + } + } +}; + +export const FilterTrackPropertyCondition: msRest.CompositeMapper = { + serializedName: "FilterTrackPropertyCondition", + type: { + name: "Composite", + className: "FilterTrackPropertyCondition", + modelProperties: { + property: { + required: true, + serializedName: "property", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + }, + operation: { + required: true, + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const FirstQuality: msRest.CompositeMapper = { + serializedName: "FirstQuality", + type: { + name: "Composite", + className: "FirstQuality", + modelProperties: { + bitrate: { + required: true, + serializedName: "bitrate", + type: { + name: "Number" + } + } + } + } +}; + +export const FilterTrackSelection: msRest.CompositeMapper = { + serializedName: "FilterTrackSelection", + type: { + name: "Composite", + className: "FilterTrackSelection", + modelProperties: { + trackSelections: { + required: true, + serializedName: "trackSelections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterTrackPropertyCondition" + } + } + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const AccountFilter: msRest.CompositeMapper = { + serializedName: "AccountFilter", + type: { + name: "Composite", + className: "AccountFilter", + modelProperties: { + ...ProxyResource.type.modelProperties, + presentationTimeRange: { + serializedName: "properties.presentationTimeRange", + type: { + name: "Composite", + className: "PresentationTimeRange" + } + }, + firstQuality: { + serializedName: "properties.firstQuality", + type: { + name: "Composite", + className: "FirstQuality" + } + }, + tracks: { + serializedName: "properties.tracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterTrackSelection" + } + } + } + } + } + } +}; + +export const ODataError: msRest.CompositeMapper = { + serializedName: "ODataError", + type: { + name: "Composite", + className: "ODataError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ODataError" + } + } + } + } + } + } +}; + +export const ApiError: msRest.CompositeMapper = { + serializedName: "ApiError", + type: { + name: "Composite", + className: "ApiError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ODataError" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const Provider: msRest.CompositeMapper = { + serializedName: "Provider", + type: { + name: "Composite", + className: "Provider", + modelProperties: { + providerName: { + required: true, + serializedName: "providerName", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDimension: msRest.CompositeMapper = { + serializedName: "MetricDimension", + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + nullable: false, + readOnly: true, + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Metric: msRest.CompositeMapper = { + serializedName: "Metric", + type: { + name: "Composite", + className: "Metric", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + readOnly: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + readOnly: true, + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + nullable: false, + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + nullable: false, + readOnly: true, + serializedName: "aggregationType", + type: { + name: "String" + } + }, + dimensions: { + readOnly: true, + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + metricSpecifications: { + readOnly: true, + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Metric" + } + } + } + } + } + } +}; + +export const MetricProperties: msRest.CompositeMapper = { + serializedName: "MetricProperties", + type: { + name: "Composite", + className: "MetricProperties", + modelProperties: { + serviceSpecification: { + readOnly: true, + serializedName: "serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MetricProperties" + } + } + } + } +}; + +export const Location: msRest.CompositeMapper = { + serializedName: "Location", + type: { + name: "Composite", + className: "Location", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const EntityNameAvailabilityCheckOutput: msRest.CompositeMapper = { + serializedName: "EntityNameAvailabilityCheckOutput", + type: { + name: "Composite", + className: "EntityNameAvailabilityCheckOutput", + modelProperties: { + nameAvailable: { + required: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const StorageAccount: msRest.CompositeMapper = { + serializedName: "StorageAccount", + type: { + name: "Composite", + className: "StorageAccount", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const SyncStorageKeysInput: msRest.CompositeMapper = { + serializedName: "SyncStorageKeysInput", + type: { + name: "Composite", + className: "SyncStorageKeysInput", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const MediaService: msRest.CompositeMapper = { + serializedName: "MediaService", + type: { + name: "Composite", + className: "MediaService", + modelProperties: { + ...TrackedResource.type.modelProperties, + mediaServiceId: { + nullable: false, + readOnly: true, + serializedName: "properties.mediaServiceId", + type: { + name: "Uuid" + } + }, + storageAccounts: { + serializedName: "properties.storageAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageAccount" + } + } + } + } + } + } +}; + +export const SubscriptionMediaService: msRest.CompositeMapper = { + serializedName: "SubscriptionMediaService", + type: { + name: "Composite", + className: "SubscriptionMediaService", + modelProperties: { + ...TrackedResource.type.modelProperties, + mediaServiceId: { + nullable: false, + readOnly: true, + serializedName: "properties.mediaServiceId", + type: { + name: "Uuid" + } + }, + storageAccounts: { + serializedName: "properties.storageAccounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageAccount" + } + } + } + } + } + } +}; + +export const CheckNameAvailabilityInput: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityInput", + type: { + name: "Composite", + className: "CheckNameAvailabilityInput", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const AssetContainerSas: msRest.CompositeMapper = { + serializedName: "AssetContainerSas", + type: { + name: "Composite", + className: "AssetContainerSas", + modelProperties: { + assetContainerSasUrls: { + serializedName: "assetContainerSasUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AssetFileEncryptionMetadata: msRest.CompositeMapper = { + serializedName: "AssetFileEncryptionMetadata", + type: { + name: "Composite", + className: "AssetFileEncryptionMetadata", + modelProperties: { + initializationVector: { + serializedName: "initializationVector", + type: { + name: "String" + } + }, + assetFileName: { + serializedName: "assetFileName", + type: { + name: "String" + } + }, + assetFileId: { + required: true, + serializedName: "assetFileId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const StorageEncryptedAssetDecryptionData: msRest.CompositeMapper = { + serializedName: "StorageEncryptedAssetDecryptionData", + type: { + name: "Composite", + className: "StorageEncryptedAssetDecryptionData", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "ByteArray" + } + }, + assetFileEncryptionMetadata: { + serializedName: "assetFileEncryptionMetadata", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AssetFileEncryptionMetadata" + } + } + } + } + } + } +}; + +export const AssetStreamingLocator: msRest.CompositeMapper = { + serializedName: "AssetStreamingLocator", + type: { + name: "Composite", + className: "AssetStreamingLocator", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + assetName: { + readOnly: true, + serializedName: "assetName", + type: { + name: "String" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "created", + type: { + name: "DateTime" + } + }, + startTime: { + nullable: false, + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + nullable: false, + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + streamingLocatorId: { + nullable: false, + readOnly: true, + serializedName: "streamingLocatorId", + type: { + name: "Uuid" + } + }, + streamingPolicyName: { + readOnly: true, + serializedName: "streamingPolicyName", + type: { + name: "String" + } + }, + defaultContentKeyPolicyName: { + readOnly: true, + serializedName: "defaultContentKeyPolicyName", + type: { + name: "String" + } + } + } + } +}; + +export const ListStreamingLocatorsResponse: msRest.CompositeMapper = { + serializedName: "ListStreamingLocatorsResponse", + type: { + name: "Composite", + className: "ListStreamingLocatorsResponse", + modelProperties: { + streamingLocators: { + readOnly: true, + serializedName: "streamingLocators", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AssetStreamingLocator" + } + } + } + } + } + } +}; + +export const Asset: msRest.CompositeMapper = { + serializedName: "Asset", + type: { + name: "Composite", + className: "Asset", + modelProperties: { + ...ProxyResource.type.modelProperties, + assetId: { + nullable: false, + readOnly: true, + serializedName: "properties.assetId", + type: { + name: "Uuid" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + alternateId: { + serializedName: "properties.alternateId", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + container: { + serializedName: "properties.container", + type: { + name: "String" + } + }, + storageAccountName: { + serializedName: "properties.storageAccountName", + type: { + name: "String" + } + }, + storageEncryptionFormat: { + nullable: false, + readOnly: true, + serializedName: "properties.storageEncryptionFormat", + type: { + name: "String" + } + } + } + } +}; + +export const AssetFilter: msRest.CompositeMapper = { + serializedName: "AssetFilter", + type: { + name: "Composite", + className: "AssetFilter", + modelProperties: { + ...ProxyResource.type.modelProperties, + presentationTimeRange: { + serializedName: "properties.presentationTimeRange", + type: { + name: "Composite", + className: "PresentationTimeRange" + } + }, + firstQuality: { + serializedName: "properties.firstQuality", + type: { + name: "Composite", + className: "FirstQuality" + } + }, + tracks: { + serializedName: "properties.tracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterTrackSelection" + } + } + } + } + } + } +}; + +export const ListContainerSasInput: msRest.CompositeMapper = { + serializedName: "ListContainerSasInput", + type: { + name: "Composite", + className: "ListContainerSasInput", + modelProperties: { + permissions: { + serializedName: "permissions", + type: { + name: "String" + } + }, + expiryTime: { + serializedName: "expiryTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction", + modelProperties: { + bestEffort: { + required: true, + serializedName: "bestEffort", + type: { + name: "Boolean" + } + }, + configurationData: { + required: true, + serializedName: "configurationData", + type: { + name: "Number" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyContentKeyLocation: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyPlayReadyContentKeyLocation", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "ContentKeyPolicyPlayReadyContentKeyLocation", + className: "ContentKeyPolicyPlayReadyContentKeyLocation", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyPlayReadyContentKeyLocation.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyPlayReadyContentKeyLocation", + className: "ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader", + modelProperties: { + ...ContentKeyPolicyPlayReadyContentKeyLocation.type.modelProperties + } + } +}; + +export const ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyPlayReadyContentKeyLocation.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyPlayReadyContentKeyLocation", + className: "ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier", + modelProperties: { + ...ContentKeyPolicyPlayReadyContentKeyLocation.type.modelProperties, + keyId: { + required: true, + serializedName: "keyId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyPlayRight: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyPlayReadyPlayRight", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyPlayRight", + modelProperties: { + firstPlayExpiration: { + serializedName: "firstPlayExpiration", + type: { + name: "TimeSpan" + } + }, + scmsRestriction: { + serializedName: "scmsRestriction", + type: { + name: "Number" + } + }, + agcAndColorStripeRestriction: { + serializedName: "agcAndColorStripeRestriction", + type: { + name: "Number" + } + }, + explicitAnalogTelevisionOutputRestriction: { + serializedName: "explicitAnalogTelevisionOutputRestriction", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction" + } + }, + digitalVideoOnlyContentRestriction: { + required: true, + serializedName: "digitalVideoOnlyContentRestriction", + type: { + name: "Boolean" + } + }, + imageConstraintForAnalogComponentVideoRestriction: { + required: true, + serializedName: "imageConstraintForAnalogComponentVideoRestriction", + type: { + name: "Boolean" + } + }, + imageConstraintForAnalogComputerMonitorRestriction: { + required: true, + serializedName: "imageConstraintForAnalogComputerMonitorRestriction", + type: { + name: "Boolean" + } + }, + allowPassingVideoContentToUnknownOutput: { + required: true, + serializedName: "allowPassingVideoContentToUnknownOutput", + type: { + name: "String" + } + }, + uncompressedDigitalVideoOpl: { + serializedName: "uncompressedDigitalVideoOpl", + type: { + name: "Number" + } + }, + compressedDigitalVideoOpl: { + serializedName: "compressedDigitalVideoOpl", + type: { + name: "Number" + } + }, + analogVideoOpl: { + serializedName: "analogVideoOpl", + type: { + name: "Number" + } + }, + compressedDigitalAudioOpl: { + serializedName: "compressedDigitalAudioOpl", + type: { + name: "Number" + } + }, + uncompressedDigitalAudioOpl: { + serializedName: "uncompressedDigitalAudioOpl", + type: { + name: "Number" + } + } + } + } +}; + +export const ContentKeyPolicyTokenClaim: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyTokenClaim", + type: { + name: "Composite", + className: "ContentKeyPolicyTokenClaim", + modelProperties: { + claimType: { + serializedName: "claimType", + type: { + name: "String" + } + }, + claimValue: { + serializedName: "claimValue", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyLicense: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyPlayReadyLicense", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyLicense", + modelProperties: { + allowTestDevices: { + required: true, + serializedName: "allowTestDevices", + type: { + name: "Boolean" + } + }, + beginDate: { + serializedName: "beginDate", + type: { + name: "DateTime" + } + }, + expirationDate: { + serializedName: "expirationDate", + type: { + name: "DateTime" + } + }, + relativeBeginDate: { + serializedName: "relativeBeginDate", + type: { + name: "TimeSpan" + } + }, + relativeExpirationDate: { + serializedName: "relativeExpirationDate", + type: { + name: "TimeSpan" + } + }, + gracePeriod: { + serializedName: "gracePeriod", + type: { + name: "TimeSpan" + } + }, + playRight: { + serializedName: "playRight", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyPlayRight" + } + }, + licenseType: { + required: true, + serializedName: "licenseType", + type: { + name: "String" + } + }, + contentKeyLocation: { + required: true, + serializedName: "contentKeyLocation", + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyContentKeyLocation" + } + }, + contentType: { + required: true, + serializedName: "contentType", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyRestriction: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyRestriction", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "ContentKeyPolicyRestriction", + className: "ContentKeyPolicyRestriction", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyOpenRestriction: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyOpenRestriction", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestriction.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestriction", + className: "ContentKeyPolicyOpenRestriction", + modelProperties: { + ...ContentKeyPolicyRestriction.type.modelProperties + } + } +}; + +export const ContentKeyPolicyUnknownRestriction: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyUnknownRestriction", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestriction.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestriction", + className: "ContentKeyPolicyUnknownRestriction", + modelProperties: { + ...ContentKeyPolicyRestriction.type.modelProperties + } + } +}; + +export const ContentKeyPolicyConfiguration: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyConfiguration", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyRestrictionTokenKey: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyRestrictionTokenKey", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "ContentKeyPolicyRestrictionTokenKey", + className: "ContentKeyPolicyRestrictionTokenKey", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicySymmetricTokenKey: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicySymmetricTokenKey", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestrictionTokenKey.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestrictionTokenKey", + className: "ContentKeyPolicySymmetricTokenKey", + modelProperties: { + ...ContentKeyPolicyRestrictionTokenKey.type.modelProperties, + keyValue: { + required: true, + serializedName: "keyValue", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const ContentKeyPolicyRsaTokenKey: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyRsaTokenKey", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestrictionTokenKey.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestrictionTokenKey", + className: "ContentKeyPolicyRsaTokenKey", + modelProperties: { + ...ContentKeyPolicyRestrictionTokenKey.type.modelProperties, + exponent: { + required: true, + serializedName: "exponent", + type: { + name: "ByteArray" + } + }, + modulus: { + required: true, + serializedName: "modulus", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const ContentKeyPolicyX509CertificateTokenKey: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestrictionTokenKey.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestrictionTokenKey", + className: "ContentKeyPolicyX509CertificateTokenKey", + modelProperties: { + ...ContentKeyPolicyRestrictionTokenKey.type.modelProperties, + rawBody: { + required: true, + serializedName: "rawBody", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const ContentKeyPolicyTokenRestriction: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyTokenRestriction", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyRestriction.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyRestriction", + className: "ContentKeyPolicyTokenRestriction", + modelProperties: { + ...ContentKeyPolicyRestriction.type.modelProperties, + issuer: { + required: true, + serializedName: "issuer", + type: { + name: "String" + } + }, + audience: { + required: true, + serializedName: "audience", + type: { + name: "String" + } + }, + primaryVerificationKey: { + required: true, + serializedName: "primaryVerificationKey", + type: { + name: "Composite", + className: "ContentKeyPolicyRestrictionTokenKey" + } + }, + alternateVerificationKeys: { + serializedName: "alternateVerificationKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicyRestrictionTokenKey" + } + } + } + }, + requiredClaims: { + serializedName: "requiredClaims", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicyTokenClaim" + } + } + } + }, + restrictionTokenType: { + required: true, + serializedName: "restrictionTokenType", + type: { + name: "String" + } + }, + openIdConnectDiscoveryDocument: { + serializedName: "openIdConnectDiscoveryDocument", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyClearKeyConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyConfiguration.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyClearKeyConfiguration", + modelProperties: { + ...ContentKeyPolicyConfiguration.type.modelProperties + } + } +}; + +export const ContentKeyPolicyUnknownConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyUnknownConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyConfiguration.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyUnknownConfiguration", + modelProperties: { + ...ContentKeyPolicyConfiguration.type.modelProperties + } + } +}; + +export const ContentKeyPolicyWidevineConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyWidevineConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyConfiguration.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyWidevineConfiguration", + modelProperties: { + ...ContentKeyPolicyConfiguration.type.modelProperties, + widevineTemplate: { + required: true, + serializedName: "widevineTemplate", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyPlayReadyConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyConfiguration.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyPlayReadyConfiguration", + modelProperties: { + ...ContentKeyPolicyConfiguration.type.modelProperties, + licenses: { + required: true, + serializedName: "licenses", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicyPlayReadyLicense" + } + } + } + }, + responseCustomData: { + serializedName: "responseCustomData", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyFairPlayConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: ContentKeyPolicyConfiguration.type.polymorphicDiscriminator, + uberParent: "ContentKeyPolicyConfiguration", + className: "ContentKeyPolicyFairPlayConfiguration", + modelProperties: { + ...ContentKeyPolicyConfiguration.type.modelProperties, + ask: { + required: true, + serializedName: "ask", + type: { + name: "ByteArray" + } + }, + fairPlayPfxPassword: { + required: true, + serializedName: "fairPlayPfxPassword", + type: { + name: "String" + } + }, + fairPlayPfx: { + required: true, + serializedName: "fairPlayPfx", + type: { + name: "String" + } + }, + rentalAndLeaseKeyType: { + required: true, + serializedName: "rentalAndLeaseKeyType", + type: { + name: "String" + } + }, + rentalDuration: { + required: true, + serializedName: "rentalDuration", + type: { + name: "Number" + } + } + } + } +}; + +export const ContentKeyPolicyOption: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyOption", + type: { + name: "Composite", + className: "ContentKeyPolicyOption", + modelProperties: { + policyOptionId: { + nullable: false, + readOnly: true, + serializedName: "policyOptionId", + type: { + name: "Uuid" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + configuration: { + required: true, + serializedName: "configuration", + type: { + name: "Composite", + className: "ContentKeyPolicyConfiguration" + } + }, + restriction: { + required: true, + serializedName: "restriction", + type: { + name: "Composite", + className: "ContentKeyPolicyRestriction" + } + } + } + } +}; + +export const ContentKeyPolicyProperties: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyProperties", + type: { + name: "Composite", + className: "ContentKeyPolicyProperties", + modelProperties: { + policyId: { + nullable: false, + readOnly: true, + serializedName: "policyId", + type: { + name: "Uuid" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "created", + type: { + name: "DateTime" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "lastModified", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + options: { + required: true, + serializedName: "options", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicyOption" + } + } + } + } + } + } +}; + +export const ContentKeyPolicy: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicy", + type: { + name: "Composite", + className: "ContentKeyPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + policyId: { + nullable: false, + readOnly: true, + serializedName: "properties.policyId", + type: { + name: "Uuid" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + options: { + required: true, + serializedName: "properties.options", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicyOption" + } + } + } + } + } + } +}; + +export const Preset: msRest.CompositeMapper = { + serializedName: "Preset", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Preset", + className: "Preset", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const Codec: msRest.CompositeMapper = { + serializedName: "Codec", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Codec", + className: "Codec", + modelProperties: { + label: { + serializedName: "label", + type: { + name: "String" + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const Audio: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.Audio", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "Audio", + modelProperties: { + ...Codec.type.modelProperties, + channels: { + serializedName: "channels", + type: { + name: "Number" + } + }, + samplingRate: { + serializedName: "samplingRate", + type: { + name: "Number" + } + }, + bitrate: { + serializedName: "bitrate", + type: { + name: "Number" + } + } + } + } +}; + +export const AacAudio: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.AacAudio", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "AacAudio", + modelProperties: { + ...Audio.type.modelProperties, + profile: { + serializedName: "profile", + type: { + name: "String" + } + } + } + } +}; + +export const FaceDetectorPreset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.FaceDetectorPreset", + type: { + name: "Composite", + polymorphicDiscriminator: Preset.type.polymorphicDiscriminator, + uberParent: "Preset", + className: "FaceDetectorPreset", + modelProperties: { + ...Preset.type.modelProperties, + resolution: { + serializedName: "resolution", + type: { + name: "String" + } + } + } + } +}; + +export const AudioAnalyzerPreset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.AudioAnalyzerPreset", + type: { + name: "Composite", + polymorphicDiscriminator: Preset.type.polymorphicDiscriminator, + uberParent: "Preset", + className: "AudioAnalyzerPreset", + modelProperties: { + ...Preset.type.modelProperties, + audioLanguage: { + serializedName: "audioLanguage", + type: { + name: "String" + } + } + } + } +}; + +export const Overlay: msRest.CompositeMapper = { + serializedName: "Overlay", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Overlay", + className: "Overlay", + modelProperties: { + inputLabel: { + required: true, + serializedName: "inputLabel", + type: { + name: "String" + } + }, + start: { + serializedName: "start", + type: { + name: "TimeSpan" + } + }, + end: { + serializedName: "end", + type: { + name: "TimeSpan" + } + }, + fadeInDuration: { + serializedName: "fadeInDuration", + type: { + name: "TimeSpan" + } + }, + fadeOutDuration: { + serializedName: "fadeOutDuration", + type: { + name: "TimeSpan" + } + }, + audioGainLevel: { + serializedName: "audioGainLevel", + type: { + name: "Number" + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const AudioOverlay: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.AudioOverlay", + type: { + name: "Composite", + polymorphicDiscriminator: Overlay.type.polymorphicDiscriminator, + uberParent: "Overlay", + className: "AudioOverlay", + modelProperties: { + ...Overlay.type.modelProperties + } + } +}; + +export const CopyVideo: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.CopyVideo", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "CopyVideo", + modelProperties: { + ...Codec.type.modelProperties + } + } +}; + +export const Video: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.Video", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "Video", + modelProperties: { + ...Codec.type.modelProperties, + keyFrameInterval: { + serializedName: "keyFrameInterval", + type: { + name: "TimeSpan" + } + }, + stretchMode: { + serializedName: "stretchMode", + type: { + name: "String" + } + } + } + } +}; + +export const Image: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.Image", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "Image", + modelProperties: { + ...Video.type.modelProperties, + start: { + required: true, + serializedName: "start", + type: { + name: "String" + } + }, + step: { + serializedName: "step", + type: { + name: "String" + } + }, + range: { + serializedName: "range", + type: { + name: "String" + } + } + } + } +}; + +export const Format: msRest.CompositeMapper = { + serializedName: "Format", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Format", + className: "Format", + modelProperties: { + filenamePattern: { + required: true, + serializedName: "filenamePattern", + type: { + name: "String" + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ImageFormat: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.ImageFormat", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "ImageFormat", + modelProperties: { + ...Format.type.modelProperties + } + } +}; + +export const JpgFormat: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JpgFormat", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "JpgFormat", + modelProperties: { + ...ImageFormat.type.modelProperties + } + } +}; + +export const PngFormat: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.PngFormat", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "PngFormat", + modelProperties: { + ...ImageFormat.type.modelProperties + } + } +}; + +export const CopyAudio: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.CopyAudio", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "CopyAudio", + modelProperties: { + ...Codec.type.modelProperties + } + } +}; + +export const Deinterlace: msRest.CompositeMapper = { + serializedName: "Deinterlace", + type: { + name: "Composite", + className: "Deinterlace", + modelProperties: { + parity: { + serializedName: "parity", + type: { + name: "String" + } + }, + mode: { + serializedName: "mode", + type: { + name: "String" + } + } + } + } +}; + +export const Rectangle: msRest.CompositeMapper = { + serializedName: "Rectangle", + type: { + name: "Composite", + className: "Rectangle", + modelProperties: { + left: { + serializedName: "left", + type: { + name: "String" + } + }, + top: { + serializedName: "top", + type: { + name: "String" + } + }, + width: { + serializedName: "width", + type: { + name: "String" + } + }, + height: { + serializedName: "height", + type: { + name: "String" + } + } + } + } +}; + +export const Filters: msRest.CompositeMapper = { + serializedName: "Filters", + type: { + name: "Composite", + className: "Filters", + modelProperties: { + deinterlace: { + serializedName: "deinterlace", + type: { + name: "Composite", + className: "Deinterlace" + } + }, + rotation: { + serializedName: "rotation", + type: { + name: "String" + } + }, + crop: { + serializedName: "crop", + type: { + name: "Composite", + className: "Rectangle" + } + }, + overlays: { + serializedName: "overlays", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Overlay" + } + } + } + } + } + } +}; + +export const Layer: msRest.CompositeMapper = { + serializedName: "Layer", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "Layer", + className: "Layer", + modelProperties: { + width: { + serializedName: "width", + type: { + name: "String" + } + }, + height: { + serializedName: "height", + type: { + name: "String" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const VideoLayer: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.VideoLayer", + type: { + name: "Composite", + polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, + uberParent: "Layer", + className: "VideoLayer", + modelProperties: { + ...Layer.type.modelProperties, + bitrate: { + required: true, + serializedName: "bitrate", + type: { + name: "Number" + } + }, + maxBitrate: { + serializedName: "maxBitrate", + type: { + name: "Number" + } + }, + bFrames: { + serializedName: "bFrames", + type: { + name: "Number" + } + }, + frameRate: { + serializedName: "frameRate", + type: { + name: "String" + } + }, + slices: { + serializedName: "slices", + type: { + name: "Number" + } + }, + adaptiveBFrame: { + serializedName: "adaptiveBFrame", + type: { + name: "Boolean" + } + } + } + } +}; + +export const H264Layer: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.H264Layer", + type: { + name: "Composite", + polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, + uberParent: "Layer", + className: "H264Layer", + modelProperties: { + ...VideoLayer.type.modelProperties, + profile: { + serializedName: "profile", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + type: { + name: "String" + } + }, + bufferWindow: { + serializedName: "bufferWindow", + type: { + name: "TimeSpan" + } + }, + referenceFrames: { + serializedName: "referenceFrames", + type: { + name: "Number" + } + }, + entropyMode: { + serializedName: "entropyMode", + type: { + name: "String" + } + } + } + } +}; + +export const H264Video: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.H264Video", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "H264Video", + modelProperties: { + ...Video.type.modelProperties, + sceneChangeDetection: { + serializedName: "sceneChangeDetection", + type: { + name: "Boolean" + } + }, + complexity: { + serializedName: "complexity", + type: { + name: "String" + } + }, + layers: { + serializedName: "layers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "H264Layer" + } + } + } + } + } + } +}; + +export const JpgLayer: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JpgLayer", + type: { + name: "Composite", + polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, + uberParent: "Layer", + className: "JpgLayer", + modelProperties: { + ...Layer.type.modelProperties, + quality: { + serializedName: "quality", + type: { + name: "Number" + } + } + } + } +}; + +export const JpgImage: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JpgImage", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "JpgImage", + modelProperties: { + ...Image.type.modelProperties, + layers: { + serializedName: "layers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JpgLayer" + } + } + } + } + } + } +}; + +export const OutputFile: msRest.CompositeMapper = { + serializedName: "OutputFile", + type: { + name: "Composite", + className: "OutputFile", + modelProperties: { + labels: { + required: true, + serializedName: "labels", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MultiBitrateFormat: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.MultiBitrateFormat", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "MultiBitrateFormat", + modelProperties: { + ...Format.type.modelProperties, + outputFiles: { + serializedName: "outputFiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OutputFile" + } + } + } + } + } + } +}; + +export const Mp4Format: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.Mp4Format", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "Mp4Format", + modelProperties: { + ...MultiBitrateFormat.type.modelProperties + } + } +}; + +export const PngLayer: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.PngLayer", + type: { + name: "Composite", + polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, + uberParent: "Layer", + className: "PngLayer", + modelProperties: { + ...Layer.type.modelProperties + } + } +}; + +export const PngImage: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.PngImage", + type: { + name: "Composite", + polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, + uberParent: "Codec", + className: "PngImage", + modelProperties: { + ...Image.type.modelProperties, + layers: { + serializedName: "layers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PngLayer" + } + } + } + } + } + } +}; + +export const BuiltInStandardEncoderPreset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.BuiltInStandardEncoderPreset", + type: { + name: "Composite", + polymorphicDiscriminator: Preset.type.polymorphicDiscriminator, + uberParent: "Preset", + className: "BuiltInStandardEncoderPreset", + modelProperties: { + ...Preset.type.modelProperties, + presetName: { + required: true, + serializedName: "presetName", + type: { + name: "String" + } + } + } + } +}; + +export const StandardEncoderPreset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.StandardEncoderPreset", + type: { + name: "Composite", + polymorphicDiscriminator: Preset.type.polymorphicDiscriminator, + uberParent: "Preset", + className: "StandardEncoderPreset", + modelProperties: { + ...Preset.type.modelProperties, + filters: { + serializedName: "filters", + type: { + name: "Composite", + className: "Filters" + } + }, + codecs: { + required: true, + serializedName: "codecs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Codec" + } + } + } + }, + formats: { + required: true, + serializedName: "formats", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Format" + } + } + } + } + } + } +}; + +export const VideoAnalyzerPreset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.VideoAnalyzerPreset", + type: { + name: "Composite", + polymorphicDiscriminator: Preset.type.polymorphicDiscriminator, + uberParent: "Preset", + className: "VideoAnalyzerPreset", + modelProperties: { + ...AudioAnalyzerPreset.type.modelProperties, + insightsToExtract: { + serializedName: "insightsToExtract", + type: { + name: "String" + } + } + } + } +}; + +export const TransportStreamFormat: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.TransportStreamFormat", + type: { + name: "Composite", + polymorphicDiscriminator: Format.type.polymorphicDiscriminator, + uberParent: "Format", + className: "TransportStreamFormat", + modelProperties: { + ...MultiBitrateFormat.type.modelProperties + } + } +}; + +export const VideoOverlay: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.VideoOverlay", + type: { + name: "Composite", + polymorphicDiscriminator: Overlay.type.polymorphicDiscriminator, + uberParent: "Overlay", + className: "VideoOverlay", + modelProperties: { + ...Overlay.type.modelProperties, + position: { + serializedName: "position", + type: { + name: "Composite", + className: "Rectangle" + } + }, + opacity: { + serializedName: "opacity", + type: { + name: "Number" + } + }, + cropRectangle: { + serializedName: "cropRectangle", + type: { + name: "Composite", + className: "Rectangle" + } + } + } + } +}; + +export const TransformOutput: msRest.CompositeMapper = { + serializedName: "TransformOutput", + type: { + name: "Composite", + className: "TransformOutput", + modelProperties: { + onError: { + serializedName: "onError", + type: { + name: "String" + } + }, + relativePriority: { + serializedName: "relativePriority", + type: { + name: "String" + } + }, + preset: { + required: true, + serializedName: "preset", + type: { + name: "Composite", + className: "Preset" + } + } + } + } +}; + +export const Transform: msRest.CompositeMapper = { + serializedName: "Transform", + type: { + name: "Composite", + className: "Transform", + modelProperties: { + ...ProxyResource.type.modelProperties, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + outputs: { + required: true, + serializedName: "properties.outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransformOutput" + } + } + } + } + } + } +}; + +export const JobInput: msRest.CompositeMapper = { + serializedName: "JobInput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "JobInput", + className: "JobInput", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const ClipTime: msRest.CompositeMapper = { + serializedName: "ClipTime", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "ClipTime", + className: "ClipTime", + modelProperties: { + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const JobInputClip: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobInputClip", + type: { + name: "Composite", + polymorphicDiscriminator: JobInput.type.polymorphicDiscriminator, + uberParent: "JobInput", + className: "JobInputClip", + modelProperties: { + ...JobInput.type.modelProperties, + files: { + serializedName: "files", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + start: { + serializedName: "start", + type: { + name: "Composite", + className: "ClipTime" + } + }, + end: { + serializedName: "end", + type: { + name: "Composite", + className: "ClipTime" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + } + } + } +}; + +export const AbsoluteClipTime: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.AbsoluteClipTime", + type: { + name: "Composite", + polymorphicDiscriminator: ClipTime.type.polymorphicDiscriminator, + uberParent: "ClipTime", + className: "AbsoluteClipTime", + modelProperties: { + ...ClipTime.type.modelProperties, + time: { + required: true, + serializedName: "time", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const JobInputs: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobInputs", + type: { + name: "Composite", + polymorphicDiscriminator: JobInput.type.polymorphicDiscriminator, + uberParent: "JobInput", + className: "JobInputs", + modelProperties: { + ...JobInput.type.modelProperties, + inputs: { + serializedName: "inputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobInput" + } + } + } + } + } + } +}; + +export const JobInputAsset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobInputAsset", + type: { + name: "Composite", + polymorphicDiscriminator: JobInput.type.polymorphicDiscriminator, + uberParent: "JobInput", + className: "JobInputAsset", + modelProperties: { + ...JobInputClip.type.modelProperties, + assetName: { + required: true, + serializedName: "assetName", + type: { + name: "String" + } + } + } + } +}; + +export const JobInputHttp: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobInputHttp", + type: { + name: "Composite", + polymorphicDiscriminator: JobInput.type.polymorphicDiscriminator, + uberParent: "JobInput", + className: "JobInputHttp", + modelProperties: { + ...JobInputClip.type.modelProperties, + baseUri: { + serializedName: "baseUri", + type: { + name: "String" + } + } + } + } +}; + +export const JobErrorDetail: msRest.CompositeMapper = { + serializedName: "JobErrorDetail", + type: { + name: "Composite", + className: "JobErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const JobError: msRest.CompositeMapper = { + serializedName: "JobError", + type: { + name: "Composite", + className: "JobError", + modelProperties: { + code: { + nullable: false, + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + category: { + nullable: false, + readOnly: true, + serializedName: "category", + type: { + name: "String" + } + }, + retry: { + nullable: false, + readOnly: true, + serializedName: "retry", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobErrorDetail" + } + } + } + } + } + } +}; + +export const JobOutput: msRest.CompositeMapper = { + serializedName: "JobOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "JobOutput", + className: "JobOutput", + modelProperties: { + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "JobError" + } + }, + state: { + nullable: false, + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + progress: { + nullable: false, + readOnly: true, + serializedName: "progress", + type: { + name: "Number" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const JobOutputAsset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputAsset", + type: { + name: "Composite", + polymorphicDiscriminator: JobOutput.type.polymorphicDiscriminator, + uberParent: "JobOutput", + className: "JobOutputAsset", + modelProperties: { + ...JobOutput.type.modelProperties, + assetName: { + required: true, + serializedName: "assetName", + type: { + name: "String" + } + } + } + } +}; + +export const Job: msRest.CompositeMapper = { + serializedName: "Job", + type: { + name: "Composite", + className: "Job", + modelProperties: { + ...ProxyResource.type.modelProperties, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + state: { + nullable: false, + readOnly: true, + serializedName: "properties.state", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + input: { + required: true, + serializedName: "properties.input", + type: { + name: "Composite", + className: "JobInput" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + outputs: { + required: true, + serializedName: "properties.outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobOutput" + } + } + } + }, + priority: { + serializedName: "properties.priority", + type: { + name: "String" + } + }, + correlationData: { + serializedName: "properties.correlationData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TrackPropertyCondition: msRest.CompositeMapper = { + serializedName: "TrackPropertyCondition", + type: { + name: "Composite", + className: "TrackPropertyCondition", + modelProperties: { + property: { + required: true, + serializedName: "property", + type: { + name: "String" + } + }, + operation: { + required: true, + serializedName: "operation", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const TrackSelection: msRest.CompositeMapper = { + serializedName: "TrackSelection", + type: { + name: "Composite", + className: "TrackSelection", + modelProperties: { + trackSelections: { + serializedName: "trackSelections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackPropertyCondition" + } + } + } + } + } + } +}; + +export const DefaultKey: msRest.CompositeMapper = { + serializedName: "DefaultKey", + type: { + name: "Composite", + className: "DefaultKey", + modelProperties: { + label: { + serializedName: "label", + type: { + name: "String" + } + }, + policyName: { + serializedName: "policyName", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingPolicyContentKey: msRest.CompositeMapper = { + serializedName: "StreamingPolicyContentKey", + type: { + name: "Composite", + className: "StreamingPolicyContentKey", + modelProperties: { + label: { + serializedName: "label", + type: { + name: "String" + } + }, + policyName: { + serializedName: "policyName", + type: { + name: "String" + } + }, + tracks: { + serializedName: "tracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackSelection" + } + } + } + } + } + } +}; + +export const StreamingPolicyContentKeys: msRest.CompositeMapper = { + serializedName: "StreamingPolicyContentKeys", + type: { + name: "Composite", + className: "StreamingPolicyContentKeys", + modelProperties: { + defaultKey: { + serializedName: "defaultKey", + type: { + name: "Composite", + className: "DefaultKey" + } + }, + keyToTrackMappings: { + serializedName: "keyToTrackMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingPolicyContentKey" + } + } + } + } + } + } +}; + +export const StreamingPolicyPlayReadyConfiguration: msRest.CompositeMapper = { + serializedName: "StreamingPolicyPlayReadyConfiguration", + type: { + name: "Composite", + className: "StreamingPolicyPlayReadyConfiguration", + modelProperties: { + customLicenseAcquisitionUrlTemplate: { + serializedName: "customLicenseAcquisitionUrlTemplate", + type: { + name: "String" + } + }, + playReadyCustomAttributes: { + serializedName: "playReadyCustomAttributes", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingPolicyWidevineConfiguration: msRest.CompositeMapper = { + serializedName: "StreamingPolicyWidevineConfiguration", + type: { + name: "Composite", + className: "StreamingPolicyWidevineConfiguration", + modelProperties: { + customLicenseAcquisitionUrlTemplate: { + serializedName: "customLicenseAcquisitionUrlTemplate", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingPolicyFairPlayConfiguration: msRest.CompositeMapper = { + serializedName: "StreamingPolicyFairPlayConfiguration", + type: { + name: "Composite", + className: "StreamingPolicyFairPlayConfiguration", + modelProperties: { + customLicenseAcquisitionUrlTemplate: { + serializedName: "customLicenseAcquisitionUrlTemplate", + type: { + name: "String" + } + }, + allowPersistentLicense: { + required: true, + serializedName: "allowPersistentLicense", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CbcsDrmConfiguration: msRest.CompositeMapper = { + serializedName: "CbcsDrmConfiguration", + type: { + name: "Composite", + className: "CbcsDrmConfiguration", + modelProperties: { + fairPlay: { + serializedName: "fairPlay", + type: { + name: "Composite", + className: "StreamingPolicyFairPlayConfiguration" + } + }, + playReady: { + serializedName: "playReady", + type: { + name: "Composite", + className: "StreamingPolicyPlayReadyConfiguration" + } + }, + widevine: { + serializedName: "widevine", + type: { + name: "Composite", + className: "StreamingPolicyWidevineConfiguration" + } + } + } + } +}; + +export const CencDrmConfiguration: msRest.CompositeMapper = { + serializedName: "CencDrmConfiguration", + type: { + name: "Composite", + className: "CencDrmConfiguration", + modelProperties: { + playReady: { + serializedName: "playReady", + type: { + name: "Composite", + className: "StreamingPolicyPlayReadyConfiguration" + } + }, + widevine: { + serializedName: "widevine", + type: { + name: "Composite", + className: "StreamingPolicyWidevineConfiguration" + } + } + } + } +}; + +export const EnabledProtocols: msRest.CompositeMapper = { + serializedName: "EnabledProtocols", + type: { + name: "Composite", + className: "EnabledProtocols", + modelProperties: { + download: { + required: true, + serializedName: "download", + type: { + name: "Boolean" + } + }, + dash: { + required: true, + serializedName: "dash", + type: { + name: "Boolean" + } + }, + hls: { + required: true, + serializedName: "hls", + type: { + name: "Boolean" + } + }, + smoothStreaming: { + required: true, + serializedName: "smoothStreaming", + type: { + name: "Boolean" + } + } + } + } +}; + +export const NoEncryption: msRest.CompositeMapper = { + serializedName: "NoEncryption", + type: { + name: "Composite", + className: "NoEncryption", + modelProperties: { + enabledProtocols: { + serializedName: "enabledProtocols", + type: { + name: "Composite", + className: "EnabledProtocols" + } + } + } + } +}; + +export const EnvelopeEncryption: msRest.CompositeMapper = { + serializedName: "EnvelopeEncryption", + type: { + name: "Composite", + className: "EnvelopeEncryption", + modelProperties: { + enabledProtocols: { + serializedName: "enabledProtocols", + type: { + name: "Composite", + className: "EnabledProtocols" + } + }, + clearTracks: { + serializedName: "clearTracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackSelection" + } + } + } + }, + contentKeys: { + serializedName: "contentKeys", + type: { + name: "Composite", + className: "StreamingPolicyContentKeys" + } + }, + customKeyAcquisitionUrlTemplate: { + serializedName: "customKeyAcquisitionUrlTemplate", + type: { + name: "String" + } + } + } + } +}; + +export const CommonEncryptionCenc: msRest.CompositeMapper = { + serializedName: "CommonEncryptionCenc", + type: { + name: "Composite", + className: "CommonEncryptionCenc", + modelProperties: { + enabledProtocols: { + serializedName: "enabledProtocols", + type: { + name: "Composite", + className: "EnabledProtocols" + } + }, + clearTracks: { + serializedName: "clearTracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackSelection" + } + } + } + }, + contentKeys: { + serializedName: "contentKeys", + type: { + name: "Composite", + className: "StreamingPolicyContentKeys" + } + }, + drm: { + serializedName: "drm", + type: { + name: "Composite", + className: "CencDrmConfiguration" + } + } + } + } +}; + +export const CommonEncryptionCbcs: msRest.CompositeMapper = { + serializedName: "CommonEncryptionCbcs", + type: { + name: "Composite", + className: "CommonEncryptionCbcs", + modelProperties: { + enabledProtocols: { + serializedName: "enabledProtocols", + type: { + name: "Composite", + className: "EnabledProtocols" + } + }, + clearTracks: { + serializedName: "clearTracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackSelection" + } + } + } + }, + contentKeys: { + serializedName: "contentKeys", + type: { + name: "Composite", + className: "StreamingPolicyContentKeys" + } + }, + drm: { + serializedName: "drm", + type: { + name: "Composite", + className: "CbcsDrmConfiguration" + } + } + } + } +}; + +export const StreamingPolicy: msRest.CompositeMapper = { + serializedName: "StreamingPolicy", + type: { + name: "Composite", + className: "StreamingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + defaultContentKeyPolicyName: { + serializedName: "properties.defaultContentKeyPolicyName", + type: { + name: "String" + } + }, + envelopeEncryption: { + serializedName: "properties.envelopeEncryption", + type: { + name: "Composite", + className: "EnvelopeEncryption" + } + }, + commonEncryptionCenc: { + serializedName: "properties.commonEncryptionCenc", + type: { + name: "Composite", + className: "CommonEncryptionCenc" + } + }, + commonEncryptionCbcs: { + serializedName: "properties.commonEncryptionCbcs", + type: { + name: "Composite", + className: "CommonEncryptionCbcs" + } + }, + noEncryption: { + serializedName: "properties.noEncryption", + type: { + name: "Composite", + className: "NoEncryption" + } + } + } + } +}; + +export const StreamingLocatorContentKey: msRest.CompositeMapper = { + serializedName: "StreamingLocatorContentKey", + type: { + name: "Composite", + className: "StreamingLocatorContentKey", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "Uuid" + } + }, + type: { + nullable: false, + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + labelReferenceInStreamingPolicy: { + serializedName: "labelReferenceInStreamingPolicy", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + policyName: { + readOnly: true, + serializedName: "policyName", + type: { + name: "String" + } + }, + tracks: { + readOnly: true, + serializedName: "tracks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackSelection" + } + } + } + } + } + } +}; + +export const StreamingPath: msRest.CompositeMapper = { + serializedName: "StreamingPath", + type: { + name: "Composite", + className: "StreamingPath", + modelProperties: { + streamingProtocol: { + required: true, + serializedName: "streamingProtocol", + type: { + name: "String" + } + }, + encryptionScheme: { + required: true, + serializedName: "encryptionScheme", + type: { + name: "String" + } + }, + paths: { + serializedName: "paths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ListContentKeysResponse: msRest.CompositeMapper = { + serializedName: "ListContentKeysResponse", + type: { + name: "Composite", + className: "ListContentKeysResponse", + modelProperties: { + contentKeys: { + serializedName: "contentKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingLocatorContentKey" + } + } + } + } + } + } +}; + +export const ListPathsResponse: msRest.CompositeMapper = { + serializedName: "ListPathsResponse", + type: { + name: "Composite", + className: "ListPathsResponse", + modelProperties: { + streamingPaths: { + serializedName: "streamingPaths", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingPath" + } + } + } + }, + downloadPaths: { + serializedName: "downloadPaths", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const StreamingLocator: msRest.CompositeMapper = { + serializedName: "StreamingLocator", + type: { + name: "Composite", + className: "StreamingLocator", + modelProperties: { + ...ProxyResource.type.modelProperties, + assetName: { + required: true, + serializedName: "properties.assetName", + type: { + name: "String" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime" + } + }, + streamingLocatorId: { + serializedName: "properties.streamingLocatorId", + type: { + name: "Uuid" + } + }, + streamingPolicyName: { + required: true, + serializedName: "properties.streamingPolicyName", + type: { + name: "String" + } + }, + defaultContentKeyPolicyName: { + serializedName: "properties.defaultContentKeyPolicyName", + type: { + name: "String" + } + }, + contentKeys: { + serializedName: "properties.contentKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingLocatorContentKey" + } + } + } + }, + alternativeMediaId: { + serializedName: "properties.alternativeMediaId", + type: { + name: "String" + } + }, + filters: { + serializedName: "properties.filters", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Hls: msRest.CompositeMapper = { + serializedName: "Hls", + type: { + name: "Composite", + className: "Hls", + modelProperties: { + fragmentsPerTsSegment: { + serializedName: "fragmentsPerTsSegment", + type: { + name: "Number" + } + } + } + } +}; + +export const LiveOutput: msRest.CompositeMapper = { + serializedName: "LiveOutput", + type: { + name: "Composite", + className: "LiveOutput", + modelProperties: { + ...ProxyResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + assetName: { + required: true, + serializedName: "properties.assetName", + type: { + name: "String" + } + }, + archiveWindowLength: { + required: true, + serializedName: "properties.archiveWindowLength", + type: { + name: "TimeSpan" + } + }, + manifestName: { + serializedName: "properties.manifestName", + type: { + name: "String" + } + }, + hls: { + serializedName: "properties.hls", + type: { + name: "Composite", + className: "Hls" + } + }, + outputSnapTime: { + serializedName: "properties.outputSnapTime", + type: { + name: "Number" + } + }, + created: { + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "Enum", + allowedValues: [ + "Creating", + "Running", + "Deleting" + ] + } + } + } + } +}; + +export const LiveEventEndpoint: msRest.CompositeMapper = { + serializedName: "LiveEventEndpoint", + type: { + name: "Composite", + className: "LiveEventEndpoint", + modelProperties: { + protocol: { + serializedName: "protocol", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const IPRange: msRest.CompositeMapper = { + serializedName: "IPRange", + type: { + name: "Composite", + className: "IPRange", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + subnetPrefixLength: { + serializedName: "subnetPrefixLength", + type: { + name: "Number" + } + } + } + } +}; + +export const IPAccessControl: msRest.CompositeMapper = { + serializedName: "IPAccessControl", + type: { + name: "Composite", + className: "IPAccessControl", + modelProperties: { + allow: { + serializedName: "allow", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPRange" + } + } + } + } + } + } +}; + +export const LiveEventInputAccessControl: msRest.CompositeMapper = { + serializedName: "LiveEventInputAccessControl", + type: { + name: "Composite", + className: "LiveEventInputAccessControl", + modelProperties: { + ip: { + serializedName: "ip", + type: { + name: "Composite", + className: "IPAccessControl" + } + } + } + } +}; + +export const LiveEventInput: msRest.CompositeMapper = { + serializedName: "LiveEventInput", + type: { + name: "Composite", + className: "LiveEventInput", + modelProperties: { + streamingProtocol: { + required: true, + serializedName: "streamingProtocol", + type: { + name: "Enum", + allowedValues: [ + "FragmentedMP4", + "RTMP" + ] + } + }, + accessControl: { + serializedName: "accessControl", + type: { + name: "Composite", + className: "LiveEventInputAccessControl" + } + }, + keyFrameIntervalDuration: { + serializedName: "keyFrameIntervalDuration", + type: { + name: "String" + } + }, + accessToken: { + serializedName: "accessToken", + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventEndpoint" + } + } + } + } + } + } +}; + +export const LiveEventPreviewAccessControl: msRest.CompositeMapper = { + serializedName: "LiveEventPreviewAccessControl", + type: { + name: "Composite", + className: "LiveEventPreviewAccessControl", + modelProperties: { + ip: { + serializedName: "ip", + type: { + name: "Composite", + className: "IPAccessControl" + } + } + } + } +}; + +export const LiveEventPreview: msRest.CompositeMapper = { + serializedName: "LiveEventPreview", + type: { + name: "Composite", + className: "LiveEventPreview", + modelProperties: { + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventEndpoint" + } + } + } + }, + accessControl: { + serializedName: "accessControl", + type: { + name: "Composite", + className: "LiveEventPreviewAccessControl" + } + }, + previewLocator: { + serializedName: "previewLocator", + type: { + name: "String" + } + }, + streamingPolicyName: { + serializedName: "streamingPolicyName", + type: { + name: "String" + } + }, + alternativeMediaId: { + serializedName: "alternativeMediaId", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventEncoding: msRest.CompositeMapper = { + serializedName: "LiveEventEncoding", + type: { + name: "Composite", + className: "LiveEventEncoding", + modelProperties: { + encodingType: { + serializedName: "encodingType", + type: { + name: "Enum", + allowedValues: [ + "None", + "Basic", + "Standard" + ] + } + }, + presetName: { + serializedName: "presetName", + type: { + name: "String" + } + } + } + } +}; + +export const CrossSiteAccessPolicies: msRest.CompositeMapper = { + serializedName: "CrossSiteAccessPolicies", + type: { + name: "Composite", + className: "CrossSiteAccessPolicies", + modelProperties: { + clientAccessPolicy: { + serializedName: "clientAccessPolicy", + type: { + name: "String" + } + }, + crossDomainPolicy: { + serializedName: "crossDomainPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventActionInput: msRest.CompositeMapper = { + serializedName: "LiveEventActionInput", + type: { + name: "Composite", + className: "LiveEventActionInput", + modelProperties: { + removeOutputsOnStop: { + serializedName: "removeOutputsOnStop", + type: { + name: "Boolean" + } + } + } + } +}; + +export const LiveEvent: msRest.CompositeMapper = { + serializedName: "LiveEvent", + type: { + name: "Composite", + className: "LiveEvent", + modelProperties: { + ...TrackedResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + input: { + required: true, + serializedName: "properties.input", + type: { + name: "Composite", + className: "LiveEventInput" + } + }, + preview: { + serializedName: "properties.preview", + type: { + name: "Composite", + className: "LiveEventPreview" + } + }, + encoding: { + serializedName: "properties.encoding", + type: { + name: "Composite", + className: "LiveEventEncoding" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "Enum", + allowedValues: [ + "Stopped", + "Starting", + "Running", + "Stopping", + "Deleting" + ] + } + }, + crossSiteAccessPolicies: { + serializedName: "properties.crossSiteAccessPolicies", + type: { + name: "Composite", + className: "CrossSiteAccessPolicies" + } + }, + vanityUrl: { + serializedName: "properties.vanityUrl", + type: { + name: "Boolean" + } + }, + streamOptions: { + serializedName: "properties.streamOptions", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "Default", + "LowLatency" + ] + } + } + } + }, + created: { + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AkamaiSignatureHeaderAuthenticationKey: msRest.CompositeMapper = { + serializedName: "AkamaiSignatureHeaderAuthenticationKey", + type: { + name: "Composite", + className: "AkamaiSignatureHeaderAuthenticationKey", + modelProperties: { + identifier: { + serializedName: "identifier", + type: { + name: "String" + } + }, + base64Key: { + serializedName: "base64Key", + type: { + name: "String" + } + }, + expiration: { + serializedName: "expiration", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AkamaiAccessControl: msRest.CompositeMapper = { + serializedName: "AkamaiAccessControl", + type: { + name: "Composite", + className: "AkamaiAccessControl", + modelProperties: { + akamaiSignatureHeaderAuthenticationKeyList: { + serializedName: "akamaiSignatureHeaderAuthenticationKeyList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AkamaiSignatureHeaderAuthenticationKey" + } + } + } + } + } + } +}; + +export const StreamingEndpointAccessControl: msRest.CompositeMapper = { + serializedName: "StreamingEndpointAccessControl", + type: { + name: "Composite", + className: "StreamingEndpointAccessControl", + modelProperties: { + akamai: { + serializedName: "akamai", + type: { + name: "Composite", + className: "AkamaiAccessControl" + } + }, + ip: { + serializedName: "ip", + type: { + name: "Composite", + className: "IPAccessControl" + } + } + } + } +}; + +export const StreamingEntityScaleUnit: msRest.CompositeMapper = { + serializedName: "StreamingEntityScaleUnit", + type: { + name: "Composite", + className: "StreamingEntityScaleUnit", + modelProperties: { + scaleUnit: { + serializedName: "scaleUnit", + type: { + name: "Number" + } + } + } + } +}; + +export const StreamingEndpoint: msRest.CompositeMapper = { + serializedName: "StreamingEndpoint", + type: { + name: "Composite", + className: "StreamingEndpoint", + modelProperties: { + ...TrackedResource.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + scaleUnits: { + required: true, + serializedName: "properties.scaleUnits", + type: { + name: "Number" + } + }, + availabilitySetName: { + serializedName: "properties.availabilitySetName", + type: { + name: "String" + } + }, + accessControl: { + serializedName: "properties.accessControl", + type: { + name: "Composite", + className: "StreamingEndpointAccessControl" + } + }, + maxCacheAge: { + serializedName: "properties.maxCacheAge", + type: { + name: "Number" + } + }, + customHostNames: { + serializedName: "properties.customHostNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hostName: { + readOnly: true, + serializedName: "properties.hostName", + type: { + name: "String" + } + }, + cdnEnabled: { + serializedName: "properties.cdnEnabled", + type: { + name: "Boolean" + } + }, + cdnProvider: { + serializedName: "properties.cdnProvider", + type: { + name: "String" + } + }, + cdnProfile: { + serializedName: "properties.cdnProfile", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + resourceState: { + readOnly: true, + serializedName: "properties.resourceState", + type: { + name: "Enum", + allowedValues: [ + "Stopped", + "Starting", + "Running", + "Stopping", + "Deleting", + "Scaling" + ] + } + }, + crossSiteAccessPolicies: { + serializedName: "properties.crossSiteAccessPolicies", + type: { + name: "Composite", + className: "CrossSiteAccessPolicies" + } + }, + freeTrialEndTime: { + readOnly: true, + serializedName: "properties.freeTrialEndTime", + type: { + name: "DateTime" + } + }, + created: { + readOnly: true, + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + lastModified: { + readOnly: true, + serializedName: "properties.lastModified", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AccountFilterCollection: msRest.CompositeMapper = { + serializedName: "AccountFilterCollection", + type: { + name: "Composite", + className: "AccountFilterCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccountFilter" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationCollection: msRest.CompositeMapper = { + serializedName: "OperationCollection", + type: { + name: "Composite", + className: "OperationCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const MediaServiceCollection: msRest.CompositeMapper = { + serializedName: "MediaServiceCollection", + type: { + name: "Composite", + className: "MediaServiceCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaService" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionMediaServiceCollection: msRest.CompositeMapper = { + serializedName: "SubscriptionMediaServiceCollection", + type: { + name: "Composite", + className: "SubscriptionMediaServiceCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionMediaService" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AssetCollection: msRest.CompositeMapper = { + serializedName: "AssetCollection", + type: { + name: "Composite", + className: "AssetCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Asset" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AssetFilterCollection: msRest.CompositeMapper = { + serializedName: "AssetFilterCollection", + type: { + name: "Composite", + className: "AssetFilterCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AssetFilter" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyCollection: msRest.CompositeMapper = { + serializedName: "ContentKeyPolicyCollection", + type: { + name: "Composite", + className: "ContentKeyPolicyCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicy" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TransformCollection: msRest.CompositeMapper = { + serializedName: "TransformCollection", + type: { + name: "Composite", + className: "TransformCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Transform" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const JobCollection: msRest.CompositeMapper = { + serializedName: "JobCollection", + type: { + name: "Composite", + className: "JobCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingPolicyCollection: msRest.CompositeMapper = { + serializedName: "StreamingPolicyCollection", + type: { + name: "Composite", + className: "StreamingPolicyCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingPolicy" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingLocatorCollection: msRest.CompositeMapper = { + serializedName: "StreamingLocatorCollection", + type: { + name: "Composite", + className: "StreamingLocatorCollection", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingLocator" + } + } + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventListResult: msRest.CompositeMapper = { + serializedName: "LiveEventListResult", + type: { + name: "Composite", + className: "LiveEventListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEvent" + } + } + } + }, + odatacount: { + serializedName: "@odata\\.count", + type: { + name: "Number" + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const LiveOutputListResult: msRest.CompositeMapper = { + serializedName: "LiveOutputListResult", + type: { + name: "Composite", + className: "LiveOutputListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveOutput" + } + } + } + }, + odatacount: { + serializedName: "@odata\\.count", + type: { + name: "Number" + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StreamingEndpointListResult: msRest.CompositeMapper = { + serializedName: "StreamingEndpointListResult", + type: { + name: "Composite", + className: "StreamingEndpointListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingEndpoint" + } + } + } + }, + odatacount: { + serializedName: "@odata\\.count", + type: { + name: "Number" + } + }, + odatanextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'ContentKeyPolicyPlayReadyContentKeyLocation' : ContentKeyPolicyPlayReadyContentKeyLocation, + 'ContentKeyPolicyPlayReadyContentKeyLocation.#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader' : ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + 'ContentKeyPolicyPlayReadyContentKeyLocation.#Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier' : ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + 'ContentKeyPolicyRestriction' : ContentKeyPolicyRestriction, + 'ContentKeyPolicyRestriction.#Microsoft.Media.ContentKeyPolicyOpenRestriction' : ContentKeyPolicyOpenRestriction, + 'ContentKeyPolicyRestriction.#Microsoft.Media.ContentKeyPolicyUnknownRestriction' : ContentKeyPolicyUnknownRestriction, + 'ContentKeyPolicyConfiguration' : ContentKeyPolicyConfiguration, + 'ContentKeyPolicyRestrictionTokenKey' : ContentKeyPolicyRestrictionTokenKey, + 'ContentKeyPolicyRestrictionTokenKey.#Microsoft.Media.ContentKeyPolicySymmetricTokenKey' : ContentKeyPolicySymmetricTokenKey, + 'ContentKeyPolicyRestrictionTokenKey.#Microsoft.Media.ContentKeyPolicyRsaTokenKey' : ContentKeyPolicyRsaTokenKey, + 'ContentKeyPolicyRestrictionTokenKey.#Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey' : ContentKeyPolicyX509CertificateTokenKey, + 'ContentKeyPolicyRestriction.#Microsoft.Media.ContentKeyPolicyTokenRestriction' : ContentKeyPolicyTokenRestriction, + 'ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration' : ContentKeyPolicyClearKeyConfiguration, + 'ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyUnknownConfiguration' : ContentKeyPolicyUnknownConfiguration, + 'ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyWidevineConfiguration' : ContentKeyPolicyWidevineConfiguration, + 'ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration' : ContentKeyPolicyPlayReadyConfiguration, + 'ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyFairPlayConfiguration' : ContentKeyPolicyFairPlayConfiguration, + 'Preset' : Preset, + 'Codec' : Codec, + 'Codec.#Microsoft.Media.Audio' : Audio, + 'Codec.#Microsoft.Media.AacAudio' : AacAudio, + 'Preset.#Microsoft.Media.FaceDetectorPreset' : FaceDetectorPreset, + 'Preset.#Microsoft.Media.AudioAnalyzerPreset' : AudioAnalyzerPreset, + 'Overlay' : Overlay, + 'Overlay.#Microsoft.Media.AudioOverlay' : AudioOverlay, + 'Codec.#Microsoft.Media.CopyVideo' : CopyVideo, + 'Codec.#Microsoft.Media.Video' : Video, + 'Codec.#Microsoft.Media.Image' : Image, + 'Format' : Format, + 'Format.#Microsoft.Media.ImageFormat' : ImageFormat, + 'Format.#Microsoft.Media.JpgFormat' : JpgFormat, + 'Format.#Microsoft.Media.PngFormat' : PngFormat, + 'Codec.#Microsoft.Media.CopyAudio' : CopyAudio, + 'Layer' : Layer, + 'Layer.#Microsoft.Media.VideoLayer' : VideoLayer, + 'Layer.#Microsoft.Media.H264Layer' : H264Layer, + 'Codec.#Microsoft.Media.H264Video' : H264Video, + 'Layer.#Microsoft.Media.JpgLayer' : JpgLayer, + 'Codec.#Microsoft.Media.JpgImage' : JpgImage, + 'Format.#Microsoft.Media.MultiBitrateFormat' : MultiBitrateFormat, + 'Format.#Microsoft.Media.Mp4Format' : Mp4Format, + 'Layer.#Microsoft.Media.PngLayer' : PngLayer, + 'Codec.#Microsoft.Media.PngImage' : PngImage, + 'Preset.#Microsoft.Media.BuiltInStandardEncoderPreset' : BuiltInStandardEncoderPreset, + 'Preset.#Microsoft.Media.StandardEncoderPreset' : StandardEncoderPreset, + 'Preset.#Microsoft.Media.VideoAnalyzerPreset' : VideoAnalyzerPreset, + 'Format.#Microsoft.Media.TransportStreamFormat' : TransportStreamFormat, + 'Overlay.#Microsoft.Media.VideoOverlay' : VideoOverlay, + 'JobInput' : JobInput, + 'ClipTime' : ClipTime, + 'JobInput.#Microsoft.Media.JobInputClip' : JobInputClip, + 'ClipTime.#Microsoft.Media.AbsoluteClipTime' : AbsoluteClipTime, + 'JobInput.#Microsoft.Media.JobInputs' : JobInputs, + 'JobInput.#Microsoft.Media.JobInputAsset' : JobInputAsset, + 'JobInput.#Microsoft.Media.JobInputHttp' : JobInputHttp, + 'JobOutput' : JobOutput, + 'JobOutput.#Microsoft.Media.JobOutputAsset' : JobOutputAsset +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/mediaservicesMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/mediaservicesMappers.ts new file mode 100644 index 000000000000..769712c9ce75 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/mediaservicesMappers.ts @@ -0,0 +1,139 @@ +/* + * 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. + */ + +export { + discriminators, + MediaServiceCollection, + MediaService, + TrackedResource, + Resource, + BaseResource, + StorageAccount, + ApiError, + ODataError, + SyncStorageKeysInput, + SubscriptionMediaServiceCollection, + SubscriptionMediaService, + ProxyResource, + Asset, + AssetFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + AccountFilter, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/operationsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..9fb33795fe65 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/operationsMappers.ts @@ -0,0 +1,23 @@ +/* + * 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. + */ + +export { + discriminators, + OperationCollection, + Operation, + OperationDisplay, + MetricProperties, + ServiceSpecification, + Metric, + MetricDimension, + ApiError, + ODataError +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/parameters.ts b/sdk/mediaservices/arm-mediaservices/lib/models/parameters.ts new file mode 100644 index 000000000000..01a6fe028c32 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/parameters.ts @@ -0,0 +1,246 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const accountName: msRest.OperationURLParameter = { + parameterPath: "accountName", + mapper: { + required: true, + serializedName: "accountName", + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const assetName: msRest.OperationURLParameter = { + parameterPath: "assetName", + mapper: { + required: true, + serializedName: "assetName", + type: { + name: "String" + } + } +}; +export const autoStart: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "autoStart" + ], + mapper: { + serializedName: "autoStart", + type: { + name: "Boolean" + } + } +}; +export const contentKeyPolicyName: msRest.OperationURLParameter = { + parameterPath: "contentKeyPolicyName", + mapper: { + required: true, + serializedName: "contentKeyPolicyName", + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const filterName: msRest.OperationURLParameter = { + parameterPath: "filterName", + mapper: { + required: true, + serializedName: "filterName", + type: { + name: "String" + } + } +}; +export const jobName: msRest.OperationURLParameter = { + parameterPath: "jobName", + mapper: { + required: true, + serializedName: "jobName", + type: { + name: "String" + } + } +}; +export const liveEventName: msRest.OperationURLParameter = { + parameterPath: "liveEventName", + mapper: { + required: true, + serializedName: "liveEventName", + constraints: { + MaxLength: 32, + MinLength: 1, + Pattern: /^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$/ + }, + type: { + name: "String" + } + } +}; +export const liveOutputName: msRest.OperationURLParameter = { + parameterPath: "liveOutputName", + mapper: { + required: true, + serializedName: "liveOutputName", + constraints: { + MaxLength: 256, + MinLength: 1, + Pattern: /^([a-zA-Z0-9])+(-*[a-zA-Z0-9])*$/ + }, + type: { + name: "String" + } + } +}; +export const locationName: msRest.OperationURLParameter = { + parameterPath: "locationName", + mapper: { + required: true, + serializedName: "locationName", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const orderby: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "orderby" + ], + mapper: { + serializedName: "$orderby", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const streamingEndpointName: msRest.OperationURLParameter = { + parameterPath: "streamingEndpointName", + mapper: { + required: true, + serializedName: "streamingEndpointName", + constraints: { + MaxLength: 24, + MinLength: 1, + Pattern: /^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$/ + }, + type: { + name: "String" + } + } +}; +export const streamingLocatorName: msRest.OperationURLParameter = { + parameterPath: "streamingLocatorName", + mapper: { + required: true, + serializedName: "streamingLocatorName", + type: { + name: "String" + } + } +}; +export const streamingPolicyName: msRest.OperationURLParameter = { + parameterPath: "streamingPolicyName", + mapper: { + required: true, + serializedName: "streamingPolicyName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; +export const transformName: msRest.OperationURLParameter = { + parameterPath: "transformName", + mapper: { + required: true, + serializedName: "transformName", + type: { + name: "String" + } + } +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/streamingEndpointsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/streamingEndpointsMappers.ts new file mode 100644 index 000000000000..804c8dd22077 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/streamingEndpointsMappers.ts @@ -0,0 +1,138 @@ +/* + * 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. + */ + +export { + discriminators, + StreamingEndpointListResult, + StreamingEndpoint, + TrackedResource, + Resource, + BaseResource, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + IPAccessControl, + IPRange, + CrossSiteAccessPolicies, + ApiError, + ODataError, + StreamingEntityScaleUnit, + ProxyResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + AccountFilter, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/streamingLocatorsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/streamingLocatorsMappers.ts new file mode 100644 index 000000000000..771ee870414a --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/streamingLocatorsMappers.ts @@ -0,0 +1,140 @@ +/* + * 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. + */ + +export { + discriminators, + StreamingLocatorCollection, + StreamingLocator, + ProxyResource, + Resource, + BaseResource, + StreamingLocatorContentKey, + TrackSelection, + TrackPropertyCondition, + ApiError, + ODataError, + ListContentKeysResponse, + ListPathsResponse, + StreamingPath, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/streamingPoliciesMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/streamingPoliciesMappers.ts new file mode 100644 index 000000000000..f0201cf7e055 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/streamingPoliciesMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + StreamingPolicyCollection, + StreamingPolicy, + ProxyResource, + Resource, + BaseResource, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + ApiError, + ODataError, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + Transform, + TransformOutput, + Preset, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/models/transformsMappers.ts b/sdk/mediaservices/arm-mediaservices/lib/models/transformsMappers.ts new file mode 100644 index 000000000000..12bf225267d9 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/models/transformsMappers.ts @@ -0,0 +1,137 @@ +/* + * 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. + */ + +export { + discriminators, + TransformCollection, + Transform, + ProxyResource, + Resource, + BaseResource, + TransformOutput, + Preset, + ApiError, + ODataError, + AccountFilter, + PresentationTimeRange, + FirstQuality, + FilterTrackSelection, + FilterTrackPropertyCondition, + TrackedResource, + MediaService, + StorageAccount, + SubscriptionMediaService, + Asset, + AssetFilter, + ContentKeyPolicy, + ContentKeyPolicyOption, + ContentKeyPolicyConfiguration, + ContentKeyPolicyRestriction, + FaceDetectorPreset, + AudioAnalyzerPreset, + BuiltInStandardEncoderPreset, + StandardEncoderPreset, + Filters, + Deinterlace, + Rectangle, + Overlay, + Codec, + Format, + VideoAnalyzerPreset, + VideoOverlay, + Job, + JobInput, + JobOutput, + JobError, + JobErrorDetail, + StreamingPolicy, + EnvelopeEncryption, + EnabledProtocols, + TrackSelection, + TrackPropertyCondition, + StreamingPolicyContentKeys, + DefaultKey, + StreamingPolicyContentKey, + CommonEncryptionCenc, + CencDrmConfiguration, + StreamingPolicyPlayReadyConfiguration, + StreamingPolicyWidevineConfiguration, + CommonEncryptionCbcs, + CbcsDrmConfiguration, + StreamingPolicyFairPlayConfiguration, + NoEncryption, + StreamingLocator, + StreamingLocatorContentKey, + LiveOutput, + Hls, + LiveEvent, + LiveEventInput, + LiveEventInputAccessControl, + IPAccessControl, + IPRange, + LiveEventEndpoint, + LiveEventPreview, + LiveEventPreviewAccessControl, + LiveEventEncoding, + CrossSiteAccessPolicies, + StreamingEndpoint, + StreamingEndpointAccessControl, + AkamaiAccessControl, + AkamaiSignatureHeaderAuthenticationKey, + ContentKeyPolicyOpenRestriction, + ContentKeyPolicyUnknownRestriction, + ContentKeyPolicyTokenRestriction, + ContentKeyPolicyRestrictionTokenKey, + ContentKeyPolicyTokenClaim, + ContentKeyPolicyClearKeyConfiguration, + ContentKeyPolicyUnknownConfiguration, + ContentKeyPolicyWidevineConfiguration, + ContentKeyPolicyPlayReadyConfiguration, + ContentKeyPolicyPlayReadyLicense, + ContentKeyPolicyPlayReadyPlayRight, + ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction, + ContentKeyPolicyPlayReadyContentKeyLocation, + ContentKeyPolicyFairPlayConfiguration, + Audio, + AacAudio, + AudioOverlay, + CopyVideo, + Video, + Image, + ImageFormat, + JpgFormat, + PngFormat, + CopyAudio, + H264Video, + H264Layer, + VideoLayer, + Layer, + JpgLayer, + JpgImage, + MultiBitrateFormat, + OutputFile, + Mp4Format, + PngLayer, + PngImage, + TransportStreamFormat, + JobInputClip, + ClipTime, + AbsoluteClipTime, + JobInputs, + JobInputAsset, + JobInputHttp, + JobOutputAsset, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader, + ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier, + ContentKeyPolicySymmetricTokenKey, + ContentKeyPolicyRsaTokenKey, + ContentKeyPolicyX509CertificateTokenKey +} from "../models/mappers"; + diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/accountFilters.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/accountFilters.ts new file mode 100644 index 000000000000..f5ccd55c9f9d --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/accountFilters.ts @@ -0,0 +1,415 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/accountFiltersMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a AccountFilters. */ +export class AccountFilters { + private readonly client: AzureMediaServicesContext; + + /** + * Create a AccountFilters. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * List Account Filters in the Media Services account. + * @summary List Account Filters + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of an Account Filter in the Media Services account. + * @summary Get an Account Filter. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, filterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, filterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, filterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, filterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + filterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an Account Filter in the Media Services account. + * @summary Create or update an Account Filter + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + filterName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an Account Filter in the Media Services account. + * @summary Delete an Account Filter. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, filterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + filterName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates an existing Account Filter in the Media Services account. + * @summary Update an Account Filter + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param filterName The Account Filter name + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, filterName: string, parameters: Models.AccountFilter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + filterName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * List Account Filters in the Media Services account. + * @summary List Account Filters + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountFilterCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountFilter + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AccountFilter, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccountFilter + }, + 201: { + bodyMapper: Mappers.AccountFilter + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/accountFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AccountFilter, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccountFilter + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountFilterCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/assetFilters.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/assetFilters.ts new file mode 100644 index 000000000000..0f4b6a92b60a --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/assetFilters.ts @@ -0,0 +1,440 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/assetFiltersMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a AssetFilters. */ +export class AssetFilters { + private readonly client: AzureMediaServicesContext; + + /** + * Create a AssetFilters. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * List Asset Filters associated with the specified Asset. + * @summary List Asset Filters + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, assetName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, assetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of an Asset Filter associated with the specified Asset. + * @summary Get an Asset Filter. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + filterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an Asset Filter associated with the specified Asset. + * @summary Create or update an Asset Filter + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + filterName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an Asset Filter associated with the specified Asset. + * @summary Delete an Asset Filter. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, filterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + filterName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates an existing Asset Filter associated with the specified Asset. + * @summary Update an Asset Filter + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param filterName The Asset Filter name + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, filterName: string, parameters: Models.AssetFilter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + filterName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * List Asset Filters associated with the specified Asset. + * @summary List Asset Filters + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AssetFilterCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AssetFilter + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AssetFilter, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AssetFilter + }, + 201: { + bodyMapper: Mappers.AssetFilter + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/assetFilters/{filterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.filterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.AssetFilter, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AssetFilter + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AssetFilterCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/assets.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/assets.ts new file mode 100644 index 000000000000..0de2d62d4c7e --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/assets.ts @@ -0,0 +1,620 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/assetsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Assets. */ +export class Assets { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Assets. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * List Assets in the Media Services account with optional filtering and ordering + * @summary List Assets + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.AssetsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.AssetsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.AssetsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of an Asset in the Media Services account + * @summary Get an Asset + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, assetName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, assetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates an Asset in the Media Services account + * @summary Create or update an Asset + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an Asset in the Media Services account + * @summary Delete an Asset. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates an existing Asset in the Media Services account + * @summary Update an Asset + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.Asset, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists storage container URLs with shared access signatures (SAS) for uploading and downloading + * Asset content. The signatures are derived from the storage account keys. + * @summary List the Asset URLs + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.ListContainerSasInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param callback The callback + */ + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.ListContainerSasInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.ListContainerSasInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listContainerSas(resourceGroupName: string, accountName: string, assetName: string, parameters: Models.ListContainerSasInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + parameters, + options + }, + listContainerSasOperationSpec, + callback) as Promise; + } + + /** + * Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media + * Services API + * @summary Gets the Asset storage key + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param [options] The optional parameters + * @returns Promise + */ + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param callback The callback + */ + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param options The optional parameters + * @param callback The callback + */ + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getEncryptionKey(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + options + }, + getEncryptionKeyOperationSpec, + callback) as Promise; + } + + /** + * Lists Streaming Locators which are associated with this asset. + * @summary List Streaming Locators + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param [options] The optional parameters + * @returns Promise + */ + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param callback The callback + */ + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param assetName The Asset name. + * @param options The optional parameters + * @param callback The callback + */ + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listStreamingLocators(resourceGroupName: string, accountName: string, assetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + options + }, + listStreamingLocatorsOperationSpec, + callback) as Promise; + } + + /** + * List Assets in the Media Services account with optional filtering and ordering + * @summary List Assets + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AssetCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Asset + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Asset, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Asset + }, + 201: { + bodyMapper: Mappers.Asset + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Asset, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Asset + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listContainerSasOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listContainerSas", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ListContainerSasInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AssetContainerSas + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getEncryptionKeyOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/getEncryptionKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageEncryptedAssetDecryptionData + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listStreamingLocatorsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/listStreamingLocators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListStreamingLocatorsResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AssetCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/contentKeyPolicies.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/contentKeyPolicies.ts new file mode 100644 index 000000000000..0dca3126d27a --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/contentKeyPolicies.ts @@ -0,0 +1,482 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/contentKeyPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a ContentKeyPolicies. */ +export class ContentKeyPolicies { + private readonly client: AzureMediaServicesContext; + + /** + * Create a ContentKeyPolicies. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Content Key Policies in the account + * @summary List Content Key Policies + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.ContentKeyPoliciesListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.ContentKeyPoliciesListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.ContentKeyPoliciesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of a Content Key Policy in the Media Services account + * @summary Get a Content Key Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + contentKeyPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a Content Key Policy in the Media Services account + * @summary Create or update an Content Key Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + contentKeyPolicyName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Content Key Policy in the Media Services account + * @summary Delete a Content Key Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + contentKeyPolicyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates an existing Content Key Policy in the Media Services account + * @summary Update a Content Key Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, parameters: Models.ContentKeyPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + contentKeyPolicyName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Get a Content Key Policy including secret values + * @summary Get a Content Key Policy with secrets + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param [options] The optional parameters + * @returns Promise + */ + getPolicyPropertiesWithSecrets(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param callback The callback + */ + getPolicyPropertiesWithSecrets(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param contentKeyPolicyName The Content Key Policy name. + * @param options The optional parameters + * @param callback The callback + */ + getPolicyPropertiesWithSecrets(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPolicyPropertiesWithSecrets(resourceGroupName: string, accountName: string, contentKeyPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + contentKeyPolicyName, + options + }, + getPolicyPropertiesWithSecretsOperationSpec, + callback) as Promise; + } + + /** + * Lists the Content Key Policies in the account + * @summary List Content Key Policies + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicyCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.contentKeyPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicy + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.contentKeyPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ContentKeyPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicy + }, + 201: { + bodyMapper: Mappers.ContentKeyPolicy + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.contentKeyPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.contentKeyPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ContentKeyPolicy, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicy + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getPolicyPropertiesWithSecretsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/contentKeyPolicies/{contentKeyPolicyName}/getPolicyPropertiesWithSecrets", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.contentKeyPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicyProperties + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContentKeyPolicyCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/index.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/index.ts new file mode 100644 index 000000000000..d0576512912c --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/index.ts @@ -0,0 +1,24 @@ +/* + * 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. + */ + +export * from "./accountFilters"; +export * from "./operations"; +export * from "./mediaservices"; +export * from "./locations"; +export * from "./assets"; +export * from "./assetFilters"; +export * from "./contentKeyPolicies"; +export * from "./transforms"; +export * from "./jobs"; +export * from "./streamingPolicies"; +export * from "./streamingLocators"; +export * from "./liveEvents"; +export * from "./liveOutputs"; +export * from "./streamingEndpoints"; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/jobs.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/jobs.ts new file mode 100644 index 000000000000..6f3f3b293094 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/jobs.ts @@ -0,0 +1,507 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/jobsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Jobs. */ +export class Jobs { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Jobs. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists all of the Jobs for the Transform. + * @summary List Jobs + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, transformName: string, options?: Models.JobsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, transformName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, transformName: string, options: Models.JobsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, transformName: string, options?: Models.JobsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a Job. + * @summary Get Job + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, transformName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + jobName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a Job. + * @summary Create Job + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + jobName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Job. + * @summary Delete Job + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + jobName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Update is only supported for description and priority. Updating Priority will take effect when + * the Job state is Queued or Scheduled and depending on the timing the priority update may be + * ignored. + * @summary Update Job + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, transformName: string, jobName: string, parameters: Models.Job, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + jobName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Cancel a Job. + * @summary Cancel Job + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param [options] The optional parameters + * @returns Promise + */ + cancelJob(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param callback The callback + */ + cancelJob(resourceGroupName: string, accountName: string, transformName: string, jobName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param jobName The Job name. + * @param options The optional parameters + * @param callback The callback + */ + cancelJob(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + cancelJob(resourceGroupName: string, accountName: string, transformName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + jobName, + options + }, + cancelJobOperationSpec, + callback); + } + + /** + * Lists all of the Jobs for the Transform. + * @summary List Jobs + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName, + Parameters.jobName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName, + Parameters.jobName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Job, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName, + Parameters.jobName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName, + Parameters.jobName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Job, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const cancelJobOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}/jobs/{jobName}/cancelJob", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName, + Parameters.jobName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.JobCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/liveEvents.ts new file mode 100644 index 000000000000..c06e63ea4dae --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/liveEvents.ts @@ -0,0 +1,601 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/liveEventsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a LiveEvents. */ +export class LiveEvents { + private readonly client: AzureMediaServicesContext; + + /** + * Create a LiveEvents. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Live Events in the account. + * @summary List Live Events + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a Live Event. + * @summary Get Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + liveEventName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a Live Event. + * @summary Create Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters Live Event properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEvent, options?: Models.LiveEventsCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,accountName,liveEventName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates a existing Live Event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters Live Event properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEvent, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,accountName,liveEventName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a Live Event. + * @summary Delete Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,liveEventName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Starts an existing Live Event. + * @summary Start Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,accountName,liveEventName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Stops an existing Live Event. + * @summary Stop Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters LiveEvent stop parameters + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEventActionInput, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,accountName,liveEventName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Resets an existing Live Event. + * @summary Reset Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + reset(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginReset(resourceGroupName,accountName,liveEventName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a Live Event. + * @summary Create Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters Live Event properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEvent, options?: Models.LiveEventsBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates a existing Live Event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters Live Event properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEvent, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes a Live Event. + * @summary Delete Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Starts an existing Live Event. + * @summary Start Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Stops an existing Live Event. + * @summary Stop Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param parameters LiveEvent stop parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, accountName: string, liveEventName: string, parameters: Models.LiveEventActionInput, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + parameters, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Resets an existing Live Event. + * @summary Reset Live Event + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + beginReset(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + options + }, + beginResetOperationSpec, + options); + } + + /** + * Lists the Live Events in the account. + * @summary List Live Events + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveEventListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveEvent + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.autoStart + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LiveEvent, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LiveEvent + }, + 202: { + bodyMapper: Mappers.LiveEvent + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LiveEvent, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LiveEvent + }, + 202: { + bodyMapper: Mappers.LiveEvent + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LiveEventActionInput, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginResetOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/reset", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveEventListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/liveOutputs.ts new file mode 100644 index 000000000000..2dec4c75f9fe --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/liveOutputs.ts @@ -0,0 +1,356 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/liveOutputsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a LiveOutputs. */ +export class LiveOutputs { + private readonly client: AzureMediaServicesContext; + + /** + * Create a LiveOutputs. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Live Outputs in the Live Event. + * @summary List Live Outputs + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, liveEventName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, liveEventName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, liveEventName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + liveEventName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a Live Output. + * @summary Get Live Output + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + liveEventName, + liveOutputName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a Live Output. + * @summary Create Live Output + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param parameters Live Output properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, parameters: Models.LiveOutput, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreate(resourceGroupName,accountName,liveEventName,liveOutputName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a Live Output. + * @summary Delete Live Output + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,liveEventName,liveOutputName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a Live Output. + * @summary Create Live Output + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param parameters Live Output properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, parameters: Models.LiveOutput, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + liveOutputName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Deletes a Live Output. + * @summary Delete Live Output + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the Live Event. + * @param liveOutputName The name of the Live Output. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, liveEventName: string, liveOutputName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + liveEventName, + liveOutputName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists the Live Outputs in the Live Event. + * @summary List Live Outputs + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveOutputListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName, + Parameters.liveOutputName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveOutput + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName, + Parameters.liveOutputName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LiveOutput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LiveOutput + }, + 202: { + bodyMapper: Mappers.LiveOutput + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/liveOutputs/{liveOutputName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName, + Parameters.liveOutputName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LiveOutputListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/locations.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/locations.ts new file mode 100644 index 000000000000..ee17d6ba2f2c --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/locations.ts @@ -0,0 +1,94 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Locations. */ +export class Locations { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Locations. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Checks whether the Media Service resource name is available. + * @summary Check Name Availability + * @param locationName The name of the location + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + checkNameAvailability(locationName: string, parameters: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param locationName The name of the location + * @param parameters The request parameters + * @param callback The callback + */ + checkNameAvailability(locationName: string, parameters: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param locationName The name of the location + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(locationName: string, parameters: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(locationName: string, parameters: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + locationName, + parameters, + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId, + Parameters.locationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.EntityNameAvailabilityCheckOutput + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/mediaservices.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/mediaservices.ts new file mode 100644 index 000000000000..7cc6495c02ac --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/mediaservices.ts @@ -0,0 +1,607 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/mediaservicesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Mediaservices. */ +export class Mediaservices { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Mediaservices. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * List Media Services accounts in the resource group + * @summary List Media Services accounts + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param callback The callback + */ + list(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of a Media Services account + * @summary Get a Media Services account + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a Media Services account + * @summary Create or update a Media Services account + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, parameters: Models.MediaService, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Media Services account + * @summary Delete a Media Services account. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates an existing Media Services account + * @summary Update a Media Services account + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, parameters: Models.MediaService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Synchronizes storage account keys for a storage account associated with the Media Service + * account. + * @summary Synchronizes Storage Account Keys + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: Models.SyncStorageKeysInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param callback The callback + */ + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: Models.SyncStorageKeysInput, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: Models.SyncStorageKeysInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + syncStorageKeys(resourceGroupName: string, accountName: string, parameters: Models.SyncStorageKeysInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + parameters, + options + }, + syncStorageKeysOperationSpec, + callback); + } + + /** + * List Media Services accounts in the subscription. + * @summary List Media Services accounts + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Get the details of a Media Services account + * @summary Get a Media Services account + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + getBySubscription(accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param accountName The Media Services account name. + * @param callback The callback + */ + getBySubscription(accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + getBySubscription(accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBySubscription(accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + accountName, + options + }, + getBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * List Media Services accounts in the resource group + * @summary List Media Services accounts + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * List Media Services accounts in the subscription. + * @summary List Media Services accounts + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MediaServiceCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MediaService + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.MediaService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MediaService + }, + 201: { + bodyMapper: Mappers.MediaService + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.MediaService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MediaService + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const syncStorageKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/syncStorageKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SyncStorageKeysInput, + required: true + } + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionMediaServiceCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionMediaService + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MediaServiceCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionMediaServiceCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/operations.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/operations.ts new file mode 100644 index 000000000000..8b5ee4c6fecd --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/operations.ts @@ -0,0 +1,125 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Operations. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists all the Media Services operations. + * @summary List Operations + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all the Media Services operations. + * @summary List Operations + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Media/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingEndpoints.ts new file mode 100644 index 000000000000..51a00cbba68c --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingEndpoints.ts @@ -0,0 +1,603 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/streamingEndpointsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a StreamingEndpoints. */ +export class StreamingEndpoints { + private readonly client: AzureMediaServicesContext; + + /** + * Create a StreamingEndpoints. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the StreamingEndpoints in the account. + * @summary List StreamingEndpoints + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a StreamingEndpoint. + * @summary Get StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingEndpointName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingEndpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a StreamingEndpoint. + * @summary Create StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEndpoint, options?: Models.StreamingEndpointsCreateOptionalParams): Promise { + return this.beginCreate(resourceGroupName,accountName,streamingEndpointName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates a existing StreamingEndpoint. + * @summary Update StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEndpoint, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,accountName,streamingEndpointName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a StreamingEndpoint. + * @summary Delete StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,accountName,streamingEndpointName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Starts an existing StreamingEndpoint. + * @summary Start StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,accountName,streamingEndpointName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Stops an existing StreamingEndpoint. + * @summary Stop StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStop(resourceGroupName,accountName,streamingEndpointName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Scales an existing StreamingEndpoint. + * @summary Scale StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint scale parameters + * @param [options] The optional parameters + * @returns Promise + */ + scale(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEntityScaleUnit, options?: msRest.RequestOptionsBase): Promise { + return this.beginScale(resourceGroupName,accountName,streamingEndpointName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates a StreamingEndpoint. + * @summary Create StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreate(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEndpoint, options?: Models.StreamingEndpointsBeginCreateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + parameters, + options + }, + beginCreateOperationSpec, + options); + } + + /** + * Updates a existing StreamingEndpoint. + * @summary Update StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint properties needed for creation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEndpoint, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes a StreamingEndpoint. + * @summary Delete StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Starts an existing StreamingEndpoint. + * @summary Start StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Stops an existing StreamingEndpoint. + * @summary Stop StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Scales an existing StreamingEndpoint. + * @summary Scale StreamingEndpoint + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingEndpointName The name of the StreamingEndpoint. + * @param parameters StreamingEndpoint scale parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginScale(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: Models.StreamingEntityScaleUnit, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + streamingEndpointName, + parameters, + options + }, + beginScaleOperationSpec, + options); + } + + /** + * Lists the StreamingEndpoints in the account. + * @summary List StreamingEndpoints + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpointListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpoint + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginCreateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.autoStart + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StreamingEndpoint, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpoint + }, + 202: { + bodyMapper: Mappers.StreamingEndpoint + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StreamingEndpoint, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpoint + }, + 202: { + bodyMapper: Mappers.StreamingEndpoint + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const beginScaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/scale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StreamingEntityScaleUnit, + required: true + } + }, + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpointListResult + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/streamingLocators.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingLocators.ts new file mode 100644 index 000000000000..41ade18824cd --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingLocators.ts @@ -0,0 +1,467 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/streamingLocatorsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a StreamingLocators. */ +export class StreamingLocators { + private readonly client: AzureMediaServicesContext; + + /** + * Create a StreamingLocators. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Streaming Locators in the account + * @summary List Streaming Locators + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.StreamingLocatorsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.StreamingLocatorsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.StreamingLocatorsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of a Streaming Locator in the Media Services account + * @summary Get a Streaming Locator + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingLocatorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingLocatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingLocatorName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a Streaming Locator in the Media Services account + * @summary Create a Streaming Locator + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, streamingLocatorName: string, parameters: Models.StreamingLocator, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param parameters The request parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, streamingLocatorName: string, parameters: Models.StreamingLocator, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, streamingLocatorName: string, parameters: Models.StreamingLocator, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, streamingLocatorName: string, parameters: Models.StreamingLocator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingLocatorName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Streaming Locator in the Media Services account + * @summary Delete a Streaming Locator + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingLocatorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingLocatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingLocatorName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * List Content Keys used by this Streaming Locator + * @summary List Content Keys + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param [options] The optional parameters + * @returns Promise + */ + listContentKeys(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param callback The callback + */ + listContentKeys(resourceGroupName: string, accountName: string, streamingLocatorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param options The optional parameters + * @param callback The callback + */ + listContentKeys(resourceGroupName: string, accountName: string, streamingLocatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listContentKeys(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingLocatorName, + options + }, + listContentKeysOperationSpec, + callback) as Promise; + } + + /** + * List Paths supported by this Streaming Locator + * @summary List Paths + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param [options] The optional parameters + * @returns Promise + */ + listPaths(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param callback The callback + */ + listPaths(resourceGroupName: string, accountName: string, streamingLocatorName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingLocatorName The Streaming Locator name. + * @param options The optional parameters + * @param callback The callback + */ + listPaths(resourceGroupName: string, accountName: string, streamingLocatorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPaths(resourceGroupName: string, accountName: string, streamingLocatorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingLocatorName, + options + }, + listPathsOperationSpec, + callback) as Promise; + } + + /** + * Lists the Streaming Locators in the account + * @summary List Streaming Locators + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingLocatorCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingLocatorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingLocator + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingLocatorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StreamingLocator, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.StreamingLocator + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingLocatorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listContentKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listContentKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingLocatorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListContentKeysResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listPathsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingLocators/{streamingLocatorName}/listPaths", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingLocatorName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListPathsResponse + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingLocatorCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/streamingPolicies.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingPolicies.ts new file mode 100644 index 000000000000..c36bd009e7cb --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/streamingPolicies.ts @@ -0,0 +1,341 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/streamingPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a StreamingPolicies. */ +export class StreamingPolicies { + private readonly client: AzureMediaServicesContext; + + /** + * Create a StreamingPolicies. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Streaming Policies in the account + * @summary List Streaming Policies + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.StreamingPoliciesListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.StreamingPoliciesListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.StreamingPoliciesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the details of a Streaming Policy in the Media Services account + * @summary Get a Streaming Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, streamingPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, streamingPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, streamingPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a Streaming Policy in the Media Services account + * @summary Create a Streaming Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, streamingPolicyName: string, parameters: Models.StreamingPolicy, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param parameters The request parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, streamingPolicyName: string, parameters: Models.StreamingPolicy, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, streamingPolicyName: string, parameters: Models.StreamingPolicy, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, streamingPolicyName: string, parameters: Models.StreamingPolicy, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingPolicyName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Streaming Policy in the Media Services account + * @summary Delete a Streaming Policy + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param streamingPolicyName The Streaming Policy name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, streamingPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, streamingPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + streamingPolicyName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the Streaming Policies in the account + * @summary List Streaming Policies + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingPolicyCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingPolicy + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StreamingPolicy, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.StreamingPolicy + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/streamingPolicies/{streamingPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StreamingPolicyCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/lib/operations/transforms.ts b/sdk/mediaservices/arm-mediaservices/lib/operations/transforms.ts new file mode 100644 index 000000000000..379e42c19434 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/lib/operations/transforms.ts @@ -0,0 +1,417 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/transformsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServicesContext } from "../azureMediaServicesContext"; + +/** Class representing a Transforms. */ +export class Transforms { + private readonly client: AzureMediaServicesContext; + + /** + * Create a Transforms. + * @param {AzureMediaServicesContext} client Reference to the service client. + */ + constructor(client: AzureMediaServicesContext) { + this.client = client; + } + + /** + * Lists the Transforms in the account. + * @summary List Transforms + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, accountName: string, options?: Models.TransformsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, accountName: string, options: Models.TransformsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, accountName: string, options?: Models.TransformsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a Transform. + * @summary Get Transform + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, transformName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, transformName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, transformName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, transformName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a new Transform. + * @summary Create or Update Transform + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Transform. + * @summary Delete Transform + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, transformName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates a Transform. + * @summary Update Transform + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param transformName The Transform name. + * @param parameters The request parameters + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, transformName: string, parameters: Models.Transform, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + transformName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists the Transforms in the account. + * @summary List Transforms + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.orderby + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransformCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Transform + }, + 404: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Transform, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Transform + }, + 201: { + bodyMapper: Mappers.Transform + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/transforms/{transformName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.transformName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Transform, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Transform + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TransformCollection + }, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index 1c721980ed13..cc5c50d7e866 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -4,8 +4,8 @@ "description": "AzureMediaServices Library with typescript type definitions for node.js and browser.", "version": "6.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -26,7 +26,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/mediaservices/arm-mediaservices", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,8 +43,7 @@ "esm/**/*.js.map", "esm/**/*.d.ts", "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", + "lib/**/*.ts", "rollup.config.js", "tsconfig.json" ], @@ -53,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-mediaservices.js.map'\" -o ./dist/arm-mediaservices.min.js ./dist/arm-mediaservices.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "autoPublish": true + "sideEffects": false } diff --git a/sdk/mediaservices/arm-mediaservices/tsconfig.json b/sdk/mediaservices/arm-mediaservices/tsconfig.json index 87bbf5b5fa49..51ea90961ce5 100644 --- a/sdk/mediaservices/arm-mediaservices/tsconfig.json +++ b/sdk/mediaservices/arm-mediaservices/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./lib/**/*.ts"], "exclude": ["node_modules"] }