From 9a5ebfb0f225b7b88baec26ae8b280a7d089d149 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 24 Feb 2022 08:50:35 +0000 Subject: [PATCH] CodeGen from PR 17540 in Azure/azure-rest-api-specs Merge 9d08c9ba0c89e0fac0614158c5189514e4fa0f7d into 23cd65e0e9fb064a98341351c4b24e627cd77df8 --- common/config/rush/pnpm-lock.yaml | 14 +- .../arm-mediaservices/CHANGELOG.md | 106 +- sdk/mediaservices/arm-mediaservices/LICENSE | 2 +- .../arm-mediaservices/_meta.json | 6 +- .../arm-mediaservices/api-extractor.json | 25 +- .../arm-mediaservices/package.json | 8 +- .../review/arm-mediaservices.api.md | 365 ++- .../src/azureMediaServices.ts | 38 +- .../arm-mediaservices/src/models/index.ts | 1302 ++++++--- .../arm-mediaservices/src/models/mappers.ts | 2533 ++++++++++------- .../src/models/parameters.ts | 122 +- .../src/operations/accountFilters.ts | 4 +- .../src/operations/contentKeyPolicies.ts | 4 +- .../arm-mediaservices/src/operations/index.ts | 7 +- .../arm-mediaservices/src/operations/jobs.ts | 4 +- .../src/operations/liveEvents.ts | 6 +- .../src/operations/liveOutputs.ts | 2 +- .../src/operations/locations.ts | 4 +- .../mediaServiceOperationResults.ts | 76 + .../mediaServiceOperationStatuses.ts | 73 + .../src/operations/mediaservices.ts | 195 +- .../src/operations/operationResults.ts | 92 + .../src/operations/operationStatuses.ts | 88 + .../operations/privateEndpointConnections.ts | 10 +- .../src/operations/privateLinkResources.ts | 4 +- .../src/operations/streamingEndpoints.ts | 50 +- .../src/operations/streamingLocators.ts | 2 +- .../src/operations/streamingPolicies.ts | 2 +- .../src/operations/tracks.ts | 753 +++++ .../src/operations/transforms.ts | 4 +- .../src/operationsInterfaces/index.ts | 7 +- .../src/operationsInterfaces/locations.ts | 2 +- .../mediaServiceOperationResults.ts | 27 + .../mediaServiceOperationStatuses.ts | 27 + .../src/operationsInterfaces/mediaservices.ts | 43 +- .../operationsInterfaces/operationResults.ts | 33 + .../operationsInterfaces/operationStatuses.ts | 33 + .../privateEndpointConnections.ts | 8 +- .../privateLinkResources.ts | 4 +- .../streamingEndpoints.ts | 15 + .../src/operationsInterfaces/tracks.ts | 207 ++ .../arm-mediaservices/test/sampleTest.ts | 48 + .../arm-mediaservices/tsconfig.json | 16 +- 43 files changed, 4794 insertions(+), 1577 deletions(-) create mode 100644 sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationResults.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationStatuses.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operations/operationResults.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operations/operationStatuses.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operations/tracks.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationResults.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationStatuses.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationResults.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationStatuses.ts create mode 100644 sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/tracks.ts create mode 100644 sdk/mediaservices/arm-mediaservices/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 10d96b0c0283..445d5e423b57 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10921,22 +10921,22 @@ packages: dev: false file:projects/arm-mediaservices.tgz: - resolution: {integrity: sha512-Z4sbFbr1f8b8N3pjTST4ForUIBgtVkPwucOdkX9C4kFMbjO4asJYZ//VvU4hYCdWmVzV9XoXSWc9E/x1iZ98zg==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-F8O2XQ9PlyZo61/j0AJnv79/UtvW4vie3jIzD5jINbSVB61hLvFNsfkLQIekN8V0mQzmaEHOth+U+WyNvnHrVg==, tarball: file:projects/arm-mediaservices.tgz} name: '@rush-temp/arm-mediaservices' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 diff --git a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md index 7ae29d09edf4..718c3e609646 100644 --- a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md @@ -1,15 +1,105 @@ # Release History + +## 11.0.0 (2022-02-24) + +**Features** -## 10.0.1 (Unreleased) + - Added operation group MediaServiceOperationResults + - Added operation group MediaServiceOperationStatuses + - Added operation group OperationResults + - Added operation group OperationStatuses + - Added operation group Tracks + - Added operation Mediaservices.beginCreateOrUpdate + - Added operation Mediaservices.beginCreateOrUpdateAndWait + - Added operation Mediaservices.beginUpdate + - Added operation Mediaservices.beginUpdateAndWait + - Added operation StreamingEndpoints.skus + - Added Interface ArmStreamingEndpointCapacity + - Added Interface ArmStreamingEndpointCurrentSku + - Added Interface ArmStreamingEndpointSku + - Added Interface ArmStreamingEndpointSkuInfo + - Added Interface AssetTrackCollection + - Added Interface AssetTrackOperationStatus + - Added Interface HlsSettings + - Added Interface MediaServiceOperationResultsGetHeaders + - Added Interface MediaServiceOperationResultsGetOptionalParams + - Added Interface MediaServiceOperationStatus + - Added Interface MediaServiceOperationStatusesGetOptionalParams + - Added Interface MediaservicesCreateOrUpdateHeaders + - Added Interface MediaservicesUpdateHeaders + - Added Interface OperationResultsGetHeaders + - Added Interface OperationResultsGetOptionalParams + - Added Interface OperationStatusesGetOptionalParams + - Added Interface StreamingEndpointSkuInfoListResult + - Added Interface StreamingEndpointsSkusOptionalParams + - Added Interface TrackBase + - Added Interface TracksCreateOrUpdateHeaders + - Added Interface TracksCreateOrUpdateOptionalParams + - Added Interface TracksDeleteHeaders + - Added Interface TracksDeleteOptionalParams + - Added Interface TracksGetOptionalParams + - Added Interface TracksListOptionalParams + - Added Interface TracksUpdateHeaders + - Added Interface TracksUpdateOptionalParams + - Added Interface TracksUpdateTrackDataHeaders + - Added Interface TracksUpdateTrackDataOptionalParams + - Added Type Alias AssetTrack + - Added Type Alias AudioTrack + - Added Type Alias H264RateControlMode + - Added Type Alias MediaServiceOperationResultsGetResponse + - Added Type Alias MediaServiceOperationStatusesGetResponse + - Added Type Alias OperationResultsGetResponse + - Added Type Alias OperationStatusesGetResponse + - Added Type Alias ProvisioningState + - Added Type Alias StreamingEndpointsSkusResponse + - Added Type Alias TextTrack_2 + - Added Type Alias TrackBaseUnion + - Added Type Alias TracksCreateOrUpdateResponse + - Added Type Alias TracksDeleteResponse + - Added Type Alias TracksGetResponse + - Added Type Alias TracksListResponse + - Added Type Alias TracksUpdateResponse + - Added Type Alias TracksUpdateTrackDataResponse + - Added Type Alias VideoTrack + - Added Type Alias Visibility + - Interface MediaservicesCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface MediaservicesCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface MediaservicesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface MediaservicesUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface MediaServiceUpdate has a new optional parameter privateEndpointConnections + - Interface MediaServiceUpdate has a new optional parameter provisioningState + - Class AzureMediaServices has a new parameter mediaServiceOperationResults + - Class AzureMediaServices has a new parameter mediaServiceOperationStatuses + - Class AzureMediaServices has a new parameter operationResults + - Class AzureMediaServices has a new parameter operationStatuses + - Class AzureMediaServices has a new parameter tracks + - Add parameters of MediaservicesCreateOrUpdateHeaders to TypeAlias MediaservicesCreateOrUpdateResponse + - Add parameters of MediaservicesUpdateHeaders to TypeAlias MediaservicesUpdateResponse + - Type Alias H264Layer has a new parameter crf + - Type Alias H264Video has a new parameter rateControlMode + - Type Alias H265Layer has a new parameter crf + - Type Alias MediaService has a new parameter provisioningState + - Type Alias MediaService has a new parameter privateEndpointConnections + - Type Alias StreamingEndpoint has a new parameter sku + - Added Enum KnownH264RateControlMode + - Added Enum KnownProvisioningState + - Added Enum KnownVisibility + - Enum KnownH265VideoProfile has a new value Main10 + - Enum KnownStreamOptionsFlag has a new value LowLatencyV2 -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +**Breaking Changes** + - Removed operation Mediaservices.createOrUpdate + - Removed operation Mediaservices.update + - Interface Layer no longer has parameter odataType + - Type Alias H264Layer no longer has parameter odataType + - Type Alias H265Layer no longer has parameter odataType + - Type Alias H265VideoLayer no longer has parameter odataType + - Type Alias JpgLayer no longer has parameter odataType + - Type Alias PngLayer no longer has parameter odataType + - Type Alias VideoLayer no longer has parameter odataType + + ## 10.0.0 (2021-12-13) The package of @azure/arm-mediaservices is using our next generation design principles since version 10.0.0, which contains breaking changes. diff --git a/sdk/mediaservices/arm-mediaservices/LICENSE b/sdk/mediaservices/arm-mediaservices/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/mediaservices/arm-mediaservices/LICENSE +++ b/sdk/mediaservices/arm-mediaservices/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/mediaservices/arm-mediaservices/_meta.json b/sdk/mediaservices/arm-mediaservices/_meta.json index 39e8f420677d..1125ffdda2b7 100644 --- a/sdk/mediaservices/arm-mediaservices/_meta.json +++ b/sdk/mediaservices/arm-mediaservices/_meta.json @@ -1,7 +1,7 @@ { - "commit": "b8cae07c799a07f2e779a9e301f639e9b85124b1", + "commit": "e47de3bec9da10723b40a9ce0c85d65a1fe53db6", "readme": "specification/mediaservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/api-extractor.json b/sdk/mediaservices/arm-mediaservices/api-extractor.json index a487200f1286..4329d45e7e38 100644 --- a/sdk/mediaservices/arm-mediaservices/api-extractor.json +++ b/sdk/mediaservices/arm-mediaservices/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-mediaservices.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index b464713d3840..476b4fc9c4c3 100644 --- a/sdk/mediaservices/arm-mediaservices/package.json +++ b/sdk/mediaservices/arm-mediaservices/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureMediaServices.", - "version": "10.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-mediaservices.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md b/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md index 6fbc8128397d..00e2ff56b7d5 100644 --- a/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md +++ b/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md @@ -122,6 +122,33 @@ export interface AkamaiSignatureHeaderAuthenticationKey { // @public export type AnalysisResolution = string; +// @public +export interface ArmStreamingEndpointCapacity { + default?: number; + maximum?: number; + minimum?: number; + readonly scaleType?: string; +} + +// @public +export interface ArmStreamingEndpointCurrentSku { + capacity?: number; + readonly name?: string; +} + +// @public +export interface ArmStreamingEndpointSku { + readonly name?: string; +} + +// @public (undocumented) +export interface ArmStreamingEndpointSkuInfo { + capacity?: ArmStreamingEndpointCapacity; + // (undocumented) + resourceType?: string; + sku?: ArmStreamingEndpointSku; +} + // @public export type Asset = ProxyResource & { readonly systemData?: SystemData; @@ -311,6 +338,27 @@ export interface AssetsUpdateOptionalParams extends coreClient.OperationOptions // @public export type AssetsUpdateResponse = Asset; +// @public +export type AssetTrack = ProxyResource & { + track?: TrackBaseUnion; + readonly provisioningState?: ProvisioningState; +}; + +// @public +export interface AssetTrackCollection { + value?: AssetTrack[]; +} + +// @public +export interface AssetTrackOperationStatus { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name: string; + startTime?: Date; + status: string; +} + // @public export type AttributeFilter = string; @@ -344,6 +392,11 @@ export type AudioOverlay = Overlay & { odataType: "#Microsoft.Media.AudioOverlay"; }; +// @public +export type AudioTrack = TrackBase & { + odataType: "#Microsoft.Media.AudioTrack"; +}; + // @public export type AudioTrackDescriptor = TrackDescriptor & { odataType: "#Microsoft.Media.AudioTrackDescriptor" | "#Microsoft.Media.SelectAudioTrackByAttribute" | "#Microsoft.Media.SelectAudioTrackById"; @@ -380,10 +433,18 @@ export class AzureMediaServices extends coreClient.ServiceClient { // (undocumented) locations: Locations; // (undocumented) + mediaServiceOperationResults: MediaServiceOperationResults; + // (undocumented) + mediaServiceOperationStatuses: MediaServiceOperationStatuses; + // (undocumented) mediaservices: Mediaservices; // (undocumented) + operationResults: OperationResults; + // (undocumented) operations: Operations; // (undocumented) + operationStatuses: OperationStatuses; + // (undocumented) privateEndpointConnections: PrivateEndpointConnections; // (undocumented) privateLinkResources: PrivateLinkResources; @@ -396,6 +457,8 @@ export class AzureMediaServices extends coreClient.ServiceClient { // (undocumented) subscriptionId: string; // (undocumented) + tracks: Tracks; + // (undocumented) transforms: Transforms; } @@ -933,20 +996,24 @@ export type H264Complexity = string; // @public export type H264Layer = VideoLayer & { - odataType: "#Microsoft.Media.H264Layer"; profile?: H264VideoProfile; level?: string; bufferWindow?: string; + crf?: number; referenceFrames?: number; entropyMode?: EntropyMode; }; +// @public +export type H264RateControlMode = string; + // @public export type H264Video = Video & { odataType: "#Microsoft.Media.H264Video"; - sceneChangeDetection?: boolean; complexity?: H264Complexity; layers?: H264Layer[]; + rateControlMode?: H264RateControlMode; + sceneChangeDetection?: boolean; }; // @public @@ -957,10 +1024,10 @@ export type H265Complexity = string; // @public export type H265Layer = H265VideoLayer & { - odataType: "#Microsoft.Media.H265Layer"; profile?: H265VideoProfile; level?: string; bufferWindow?: string; + crf?: number; referenceFrames?: number; }; @@ -974,7 +1041,6 @@ export type H265Video = Video & { // @public export type H265VideoLayer = Layer & { - odataType: "#Microsoft.Media.H265VideoLayer" | "#Microsoft.Media.H265Layer"; bitrate: number; maxBitrate?: number; bFrames?: number; @@ -983,9 +1049,6 @@ export type H265VideoLayer = Layer & { adaptiveBFrame?: boolean; }; -// @public (undocumented) -export type H265VideoLayerUnion = H265VideoLayer | H265Layer; - // @public export type H265VideoProfile = string; @@ -994,6 +1057,13 @@ export interface Hls { fragmentsPerTsSegment?: number; } +// @public +export interface HlsSettings { + characteristics?: string; + default?: boolean; + forced?: boolean; +} + // @public type Image_2 = Video & { odataType: "#Microsoft.Media.Image" | "#Microsoft.Media.JpgImage" | "#Microsoft.Media.PngImage"; @@ -1234,7 +1304,6 @@ export type JpgImage = Image_2 & { // @public export type JpgLayer = Layer & { - odataType: "#Microsoft.Media.JpgLayer"; quality?: number; }; @@ -1464,6 +1533,13 @@ export enum KnownH264Complexity { Speed = "Speed" } +// @public +export enum KnownH264RateControlMode { + ABR = "ABR", + CBR = "CBR", + CRF = "CRF" +} + // @public export enum KnownH264VideoProfile { Auto = "Auto", @@ -1484,7 +1560,8 @@ export enum KnownH265Complexity { // @public export enum KnownH265VideoProfile { Auto = "Auto", - Main = "Main" + Main = "Main", + Main10 = "Main10" } // @public @@ -1621,6 +1698,13 @@ export enum KnownPrivateEndpointServiceConnectionStatus { Rejected = "Rejected" } +// @public +export enum KnownProvisioningState { + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", @@ -1677,7 +1761,8 @@ export enum KnownStreamingPolicyStreamingProtocol { // @public export enum KnownStreamOptionsFlag { Default = "Default", - LowLatency = "LowLatency" + LowLatency = "LowLatency", + LowLatencyV2 = "LowLatencyV2" } // @public @@ -1713,17 +1798,19 @@ export enum KnownVideoSyncMode { Vfr = "Vfr" } +// @public +export enum KnownVisibility { + Hidden = "Hidden", + Visible = "Visible" +} + // @public export interface Layer { height?: string; label?: string; - odataType: "#Microsoft.Media.H265VideoLayer" | "#Microsoft.Media.H265Layer" | "#Microsoft.Media.VideoLayer" | "#Microsoft.Media.H264Layer" | "#Microsoft.Media.JpgLayer" | "#Microsoft.Media.PngLayer"; width?: string; } -// @public (undocumented) -export type LayerUnion = Layer | H265VideoLayerUnion | VideoLayerUnion | JpgLayer | PngLayer; - // @public export interface ListContainerSasInput { expiryTime?: Date; @@ -2033,14 +2120,16 @@ export interface LogSpecification { // @public export type MediaService = TrackedResource & { - identity?: MediaServiceIdentity; readonly systemData?: SystemData; + identity?: MediaServiceIdentity; readonly mediaServiceId?: string; storageAccounts?: StorageAccount[]; storageAuthentication?: StorageAuthentication; encryption?: AccountEncryption; keyDelivery?: KeyDelivery; publicNetworkAccess?: PublicNetworkAccess; + readonly provisioningState?: ProvisioningState; + readonly privateEndpointConnections?: any; }; // @public @@ -2059,24 +2148,76 @@ export interface MediaServiceIdentity { }; } +// @public +export interface MediaServiceOperationResults { + get(locationName: string, operationId: string, options?: MediaServiceOperationResultsGetOptionalParams): Promise; +} + +// @public +export interface MediaServiceOperationResultsGetHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface MediaServiceOperationResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MediaServiceOperationResultsGetResponse = MediaService; + +// @public +export interface MediaServiceOperationStatus { + endTime?: Date; + error?: ErrorDetail; + id?: string; + name: string; + startTime?: Date; + status: string; +} + +// @public +export interface MediaServiceOperationStatuses { + get(locationName: string, operationId: string, options?: MediaServiceOperationStatusesGetOptionalParams): Promise; +} + +// @public +export interface MediaServiceOperationStatusesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MediaServiceOperationStatusesGetResponse = MediaServiceOperationStatus; + // @public export interface Mediaservices { - createOrUpdate(resourceGroupName: string, accountName: string, parameters: MediaService, options?: MediaservicesCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, accountName: string, parameters: MediaService, options?: MediaservicesCreateOrUpdateOptionalParams): Promise, MediaservicesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, parameters: MediaService, options?: MediaservicesCreateOrUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, parameters: MediaServiceUpdate, options?: MediaservicesUpdateOptionalParams): Promise, MediaservicesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, parameters: MediaServiceUpdate, options?: MediaservicesUpdateOptionalParams): Promise; delete(resourceGroupName: string, accountName: string, options?: MediaservicesDeleteOptionalParams): Promise; get(resourceGroupName: string, accountName: string, options?: MediaservicesGetOptionalParams): Promise; list(resourceGroupName: string, options?: MediaservicesListOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: MediaservicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; listEdgePolicies(resourceGroupName: string, accountName: string, parameters: ListEdgePoliciesInput, options?: MediaservicesListEdgePoliciesOptionalParams): Promise; syncStorageKeys(resourceGroupName: string, accountName: string, parameters: SyncStorageKeysInput, options?: MediaservicesSyncStorageKeysOptionalParams): Promise; - update(resourceGroupName: string, accountName: string, parameters: MediaServiceUpdate, options?: MediaservicesUpdateOptionalParams): Promise; +} + +// @public +export interface MediaservicesCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; } // @public export interface MediaservicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type MediaservicesCreateOrUpdateResponse = MediaService; +export type MediaservicesCreateOrUpdateResponse = MediaservicesCreateOrUpdateHeaders & MediaService; // @public export interface MediaservicesDeleteOptionalParams extends coreClient.OperationOptions { @@ -2128,12 +2269,21 @@ export type MediaservicesListResponse = MediaServiceCollection; export interface MediaservicesSyncStorageKeysOptionalParams extends coreClient.OperationOptions { } +// @public +export interface MediaservicesUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + // @public export interface MediaservicesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type MediaservicesUpdateResponse = MediaService; +export type MediaservicesUpdateResponse = MediaservicesUpdateHeaders & MediaService; // @public export interface MediaServiceUpdate { @@ -2141,6 +2291,8 @@ export interface MediaServiceUpdate { identity?: MediaServiceIdentity; keyDelivery?: KeyDelivery; readonly mediaServiceId?: string; + readonly privateEndpointConnections?: any; + readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; storageAccounts?: StorageAccount[]; // (undocumented) @@ -2224,6 +2376,25 @@ export interface OperationDisplay { resource?: string; } +// @public +export interface OperationResults { + get(resourceGroupName: string, accountName: string, assetName: string, trackName: string, operationId: string, options?: OperationResultsGetOptionalParams): Promise; +} + +// @public +export interface OperationResultsGetHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface OperationResultsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationResultsGetResponse = AssetTrack; + // @public export interface Operations { list(options?: OperationsListOptionalParams): Promise; @@ -2236,6 +2407,18 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationCollection; +// @public +export interface OperationStatuses { + get(resourceGroupName: string, accountName: string, assetName: string, trackName: string, operationId: string, options?: OperationStatusesGetOptionalParams): Promise; +} + +// @public +export interface OperationStatusesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationStatusesGetResponse = AssetTrackOperationStatus; + // @public export interface OutputFile { labels: string[]; @@ -2267,9 +2450,7 @@ export type PngImage = Image_2 & { }; // @public -export type PngLayer = Layer & { - odataType: "#Microsoft.Media.PngLayer"; -}; +export type PngLayer = Layer & {}; // @public export interface PresentationTimeRange { @@ -2404,6 +2585,9 @@ export interface Properties { readonly serviceSpecification?: ServiceSpecification; } +// @public +export type ProvisioningState = string; + // @public export type ProxyResource = Resource & {}; @@ -2499,6 +2683,7 @@ export interface StorageEncryptedAssetDecryptionData { // @public export type StreamingEndpoint = TrackedResource & { readonly systemData?: SystemData; + sku?: ArmStreamingEndpointCurrentSku; description?: string; scaleUnits?: number; availabilitySetName?: string; @@ -2549,6 +2734,7 @@ export interface StreamingEndpoints { beginUpdateAndWait(resourceGroupName: string, accountName: string, streamingEndpointName: string, parameters: StreamingEndpoint, options?: StreamingEndpointsUpdateOptionalParams): Promise; get(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: StreamingEndpointsGetOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: StreamingEndpointsListOptionalParams): PagedAsyncIterableIterator; + skus(resourceGroupName: string, accountName: string, streamingEndpointName: string, options?: StreamingEndpointsSkusOptionalParams): Promise; } // @public @@ -2574,6 +2760,11 @@ export interface StreamingEndpointsGetOptionalParams extends coreClient.Operatio // @public export type StreamingEndpointsGetResponse = StreamingEndpoint; +// @public (undocumented) +export interface StreamingEndpointSkuInfoListResult { + value?: ArmStreamingEndpointSkuInfo[]; +} + // @public export interface StreamingEndpointsListNextOptionalParams extends coreClient.OperationOptions { } @@ -2594,6 +2785,13 @@ export interface StreamingEndpointsScaleOptionalParams extends coreClient.Operat updateIntervalInMs?: number; } +// @public +export interface StreamingEndpointsSkusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StreamingEndpointsSkusResponse = StreamingEndpointSkuInfoListResult; + // @public export interface StreamingEndpointsStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2840,9 +3038,28 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +type TextTrack_2 = TrackBase & { + odataType: "#Microsoft.Media.TextTrack"; + fileName?: string; + displayName?: string; + readonly languageCode?: string; + playerVisibility?: Visibility; + hlsSettings?: HlsSettings; +}; +export { TextTrack_2 as TextTrack } + // @public export type TrackAttribute = string; +// @public +export interface TrackBase { + odataType: "#Microsoft.Media.AudioTrack" | "#Microsoft.Media.VideoTrack" | "#Microsoft.Media.TextTrack"; +} + +// @public (undocumented) +export type TrackBaseUnion = TrackBase | AudioTrack | VideoTrack | TextTrack_2; + // @public export interface TrackDescriptor { odataType: "#Microsoft.Media.AudioTrackDescriptor" | "#Microsoft.Media.SelectAudioTrackByAttribute" | "#Microsoft.Media.SelectAudioTrackById" | "#Microsoft.Media.VideoTrackDescriptor" | "#Microsoft.Media.SelectVideoTrackByAttribute" | "#Microsoft.Media.SelectVideoTrackById"; @@ -2872,11 +3089,103 @@ export interface TrackPropertyCondition { // @public export type TrackPropertyType = string; +// @public +export interface Tracks { + beginCreateOrUpdate(resourceGroupName: string, accountName: string, assetName: string, trackName: string, parameters: AssetTrack, options?: TracksCreateOrUpdateOptionalParams): Promise, TracksCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, assetName: string, trackName: string, parameters: AssetTrack, options?: TracksCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, assetName: string, trackName: string, options?: TracksDeleteOptionalParams): Promise, TracksDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, assetName: string, trackName: string, options?: TracksDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, accountName: string, assetName: string, trackName: string, parameters: AssetTrack, options?: TracksUpdateOptionalParams): Promise, TracksUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, accountName: string, assetName: string, trackName: string, parameters: AssetTrack, options?: TracksUpdateOptionalParams): Promise; + beginUpdateTrackData(resourceGroupName: string, accountName: string, assetName: string, trackName: string, options?: TracksUpdateTrackDataOptionalParams): Promise, TracksUpdateTrackDataResponse>>; + beginUpdateTrackDataAndWait(resourceGroupName: string, accountName: string, assetName: string, trackName: string, options?: TracksUpdateTrackDataOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, assetName: string, trackName: string, options?: TracksGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, assetName: string, options?: TracksListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TracksCreateOrUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface TracksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TracksCreateOrUpdateResponse = TracksCreateOrUpdateHeaders & AssetTrack; + +// @public +export interface TracksDeleteHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface TracksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TracksDeleteResponse = TracksDeleteHeaders; + // @public export interface TrackSelection { trackSelections?: TrackPropertyCondition[]; } +// @public +export interface TracksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TracksGetResponse = AssetTrack; + +// @public +export interface TracksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TracksListResponse = AssetTrackCollection; + +// @public +export interface TracksUpdateHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface TracksUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TracksUpdateResponse = TracksUpdateHeaders & AssetTrack; + +// @public +export interface TracksUpdateTrackDataHeaders { + azureAsyncOperation?: string; + location?: string; + retryAfter?: number; +} + +// @public +export interface TracksUpdateTrackDataOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TracksUpdateTrackDataResponse = TracksUpdateTrackDataHeaders; + // @public export type Transform = ProxyResource & { readonly systemData?: SystemData; @@ -2984,7 +3293,6 @@ export type VideoAnalyzerPreset = AudioAnalyzerPreset & { // @public export type VideoLayer = Layer & { - odataType: "#Microsoft.Media.VideoLayer" | "#Microsoft.Media.H264Layer"; bitrate: number; maxBitrate?: number; bFrames?: number; @@ -2993,9 +3301,6 @@ export type VideoLayer = Layer & { adaptiveBFrame?: boolean; }; -// @public (undocumented) -export type VideoLayerUnion = VideoLayer | H264Layer; - // @public export type VideoOverlay = Overlay & { odataType: "#Microsoft.Media.VideoOverlay"; @@ -3007,6 +3312,11 @@ export type VideoOverlay = Overlay & { // @public export type VideoSyncMode = string; +// @public +export type VideoTrack = TrackBase & { + odataType: "#Microsoft.Media.VideoTrack"; +}; + // @public export type VideoTrackDescriptor = TrackDescriptor & { odataType: "#Microsoft.Media.VideoTrackDescriptor" | "#Microsoft.Media.SelectVideoTrackByAttribute" | "#Microsoft.Media.SelectVideoTrackById"; @@ -3018,6 +3328,9 @@ export type VideoTrackDescriptorUnion = VideoTrackDescriptor | SelectVideoTrackB // @public (undocumented) export type VideoUnion = Video | H265Video | ImageUnion | H264Video; +// @public +export type Visibility = string; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index 456ab97103b6..c9f41e5bbef0 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -9,14 +9,19 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + AccountFiltersImpl, OperationsImpl, MediaservicesImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, LocationsImpl, - AccountFiltersImpl, + MediaServiceOperationStatusesImpl, + MediaServiceOperationResultsImpl, AssetsImpl, AssetFiltersImpl, + TracksImpl, + OperationStatusesImpl, + OperationResultsImpl, ContentKeyPoliciesImpl, TransformsImpl, JobsImpl, @@ -27,14 +32,19 @@ import { StreamingEndpointsImpl } from "./operations"; import { + AccountFilters, Operations, Mediaservices, PrivateLinkResources, PrivateEndpointConnections, Locations, - AccountFilters, + MediaServiceOperationStatuses, + MediaServiceOperationResults, Assets, AssetFilters, + Tracks, + OperationStatuses, + OperationResults, ContentKeyPolicies, Transforms, Jobs, @@ -48,8 +58,8 @@ import { AzureMediaServicesOptionalParams } from "./models"; export class AzureMediaServices extends coreClient.ServiceClient { $host: string; - apiVersion: string; subscriptionId: string; + apiVersion: string; /** * Initializes a new instance of the AzureMediaServices class. @@ -78,7 +88,7 @@ export class AzureMediaServices extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mediaservices/1.0.0`; + const packageDetails = `azsdk-js-arm-mediaservices/11.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -101,15 +111,24 @@ export class AzureMediaServices extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-06-01"; + this.apiVersion = options.apiVersion || "2021-11-01"; + this.accountFilters = new AccountFiltersImpl(this); this.operations = new OperationsImpl(this); this.mediaservices = new MediaservicesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.locations = new LocationsImpl(this); - this.accountFilters = new AccountFiltersImpl(this); + this.mediaServiceOperationStatuses = new MediaServiceOperationStatusesImpl( + this + ); + this.mediaServiceOperationResults = new MediaServiceOperationResultsImpl( + this + ); this.assets = new AssetsImpl(this); this.assetFilters = new AssetFiltersImpl(this); + this.tracks = new TracksImpl(this); + this.operationStatuses = new OperationStatusesImpl(this); + this.operationResults = new OperationResultsImpl(this); this.contentKeyPolicies = new ContentKeyPoliciesImpl(this); this.transforms = new TransformsImpl(this); this.jobs = new JobsImpl(this); @@ -120,14 +139,19 @@ export class AzureMediaServices extends coreClient.ServiceClient { this.streamingEndpoints = new StreamingEndpointsImpl(this); } + accountFilters: AccountFilters; operations: Operations; mediaservices: Mediaservices; privateLinkResources: PrivateLinkResources; privateEndpointConnections: PrivateEndpointConnections; locations: Locations; - accountFilters: AccountFilters; + mediaServiceOperationStatuses: MediaServiceOperationStatuses; + mediaServiceOperationResults: MediaServiceOperationResults; assets: Assets; assetFilters: AssetFilters; + tracks: Tracks; + operationStatuses: OperationStatuses; + operationResults: OperationResults; contentKeyPolicies: ContentKeyPolicies; transforms: Transforms; jobs: Jobs; diff --git a/sdk/mediaservices/arm-mediaservices/src/models/index.ts b/sdk/mediaservices/arm-mediaservices/src/models/index.ts index 57465d3ec7e6..e073493a8c8e 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/index.ts @@ -8,6 +8,7 @@ import * as coreClient from "@azure/core-client"; +export type TrackBaseUnion = TrackBase | AudioTrack | VideoTrack | TextTrack; export type ContentKeyPolicyConfigurationUnion = | ContentKeyPolicyConfiguration | ContentKeyPolicyClearKeyConfiguration @@ -47,12 +48,6 @@ export type CodecUnion = | VideoUnion | CopyVideo | CopyAudio; -export type LayerUnion = - | Layer - | H265VideoLayerUnion - | VideoLayerUnion - | JpgLayer - | PngLayer; export type TrackDescriptorUnion = | TrackDescriptor | AudioTrackDescriptorUnion @@ -71,8 +66,6 @@ export type AudioAnalyzerPresetUnion = export type JobInputClipUnion = JobInputClip | JobInputAsset | JobInputHttp; export type AudioUnion = Audio | AacAudio; export type VideoUnion = Video | H265Video | ImageUnion | H264Video; -export type H265VideoLayerUnion = H265VideoLayer | H265Layer; -export type VideoLayerUnion = VideoLayer | H264Layer; export type AudioTrackDescriptorUnion = | AudioTrackDescriptor | SelectAudioTrackByAttribute @@ -88,6 +81,136 @@ export type MultiBitrateFormatUnion = | TransportStreamFormat; export type ImageUnion = Image | JpgImage | PngImage; +/** A collection of AccountFilter items. */ +export interface AccountFilterCollection { + /** A collection of AccountFilter items. */ + value?: AccountFilter[]; + /** A link to the next page of the collection (when the collection contains too many results to return in one response). */ + odataNextLink?: string; +} + +/** The presentation time range, this is asset related and not recommended for Account Filter. */ +export interface PresentationTimeRange { + /** The absolute start time boundary. */ + startTimestamp?: number; + /** The absolute end time boundary. */ + endTimestamp?: number; + /** The relative to end sliding window. */ + presentationWindowDuration?: number; + /** The relative to end right edge. */ + liveBackoffDuration?: number; + /** The time scale of time stamps. */ + timescale?: number; + /** The indicator of forcing existing of end time stamp. */ + forceEndTimestamp?: boolean; +} + +/** Filter First Quality */ +export interface FirstQuality { + /** The first quality bitrate. */ + bitrate: number; +} + +/** Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. */ +export interface FilterTrackSelection { + /** The track selections. */ + trackSelections: FilterTrackPropertyCondition[]; +} + +/** The class to specify one track property condition. */ +export interface FilterTrackPropertyCondition { + /** The track property type. */ + property: FilterTrackPropertyType; + /** The track property value. */ + value: string; + /** The track property condition operation. */ + operation: FilterTrackPropertyCompareOperation; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** A collection of Operation items. */ export interface OperationCollection { /** A collection of Operation items. */ @@ -244,55 +367,6 @@ export interface MetricDimension { readonly toBeExportedForShoebox?: boolean; } -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - /** A collection of MediaService items. */ export interface MediaServiceCollection { /** A collection of MediaService items. */ @@ -391,41 +465,6 @@ export interface UserAssignedManagedIdentity { readonly principalId?: string; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - /** A Media Services account update. */ export interface MediaServiceUpdate { /** Resource tags. */ @@ -446,6 +485,16 @@ export interface MediaServiceUpdate { keyDelivery?: KeyDelivery; /** Whether or not public network access is allowed for resources under the Media Services account. */ publicNetworkAccess?: PublicNetworkAccess; + /** + * Provisioning state of the Media Services account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The Private Endpoint Connections created for the Media Service account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: any; } /** The input to the sync storage keys request. */ @@ -532,50 +581,20 @@ export interface EntityNameAvailabilityCheckOutput { message?: string; } -/** A collection of AccountFilter items. */ -export interface AccountFilterCollection { - /** A collection of AccountFilter items. */ - value?: AccountFilter[]; - /** A link to the next page of the collection (when the collection contains too many results to return in one response). */ - odataNextLink?: string; -} - -/** The presentation time range, this is asset related and not recommended for Account Filter. */ -export interface PresentationTimeRange { - /** The absolute start time boundary. */ - startTimestamp?: number; - /** The absolute end time boundary. */ - endTimestamp?: number; - /** The relative to end sliding window. */ - presentationWindowDuration?: number; - /** The relative to end right edge. */ - liveBackoffDuration?: number; - /** The time scale of time stamps. */ - timescale?: number; - /** The indicator of forcing existing of end time stamp. */ - forceEndTimestamp?: boolean; -} - -/** Filter First Quality */ -export interface FirstQuality { - /** The first quality bitrate. */ - bitrate: number; -} - -/** Representing a list of FilterTrackPropertyConditions to select a track. The filters are combined using a logical AND operation. */ -export interface FilterTrackSelection { - /** The track selections. */ - trackSelections: FilterTrackPropertyCondition[]; -} - -/** The class to specify one track property condition. */ -export interface FilterTrackPropertyCondition { - /** The track property type. */ - property: FilterTrackPropertyType; - /** The track property value. */ - value: string; - /** The track property condition operation. */ - operation: FilterTrackPropertyCompareOperation; +/** Status of media service operation. */ +export interface MediaServiceOperationStatus { + /** Operation identifier. */ + name: string; + /** Operation resource ID. */ + id?: string; + /** Operation start time. */ + startTime?: Date; + /** Operation end time. */ + endTime?: Date; + /** Operation status. */ + status: string; + /** The error detail. */ + error?: ErrorDetail; } /** A collection of Asset items. */ @@ -679,6 +698,37 @@ export interface AssetFilterCollection { odataNextLink?: string; } +/** A collection of AssetTrack items. */ +export interface AssetTrackCollection { + /** A collection of AssetTrack items. */ + value?: AssetTrack[]; +} + +/** Base type for concrete track types. A derived type must be used to represent the Track. */ +export interface TrackBase { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: + | "#Microsoft.Media.AudioTrack" + | "#Microsoft.Media.VideoTrack" + | "#Microsoft.Media.TextTrack"; +} + +/** Status of asset track operation. */ +export interface AssetTrackOperationStatus { + /** Operation identifier. */ + name: string; + /** Operation resource ID. */ + id?: string; + /** Operation start time. */ + startTime?: Date; + /** Operation end time. */ + endTime?: Date; + /** Operation status. */ + status: string; + /** The error detail. */ + error?: ErrorDetail; +} + /** A collection of ContentKeyPolicy items. */ export interface ContentKeyPolicyCollection { /** A collection of ContentKeyPolicy items. */ @@ -1248,12 +1298,67 @@ export interface AkamaiSignatureHeaderAuthenticationKey { expiration?: Date; } +/** The streaming endpoint current sku. */ +export interface ArmStreamingEndpointCurrentSku { + /** + * The streaming endpoint sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** The streaming endpoint sku capacity. */ + capacity?: number; +} + +export interface StreamingEndpointSkuInfoListResult { + /** The result of the List StreamingEndpoint skus. */ + value?: ArmStreamingEndpointSkuInfo[]; +} + +export interface ArmStreamingEndpointSkuInfo { + resourceType?: string; + /** The streaming endpoint sku capacity. */ + capacity?: ArmStreamingEndpointCapacity; + /** The streaming endpoint sku. */ + sku?: ArmStreamingEndpointSku; +} + +/** The streaming endpoint sku capacity. */ +export interface ArmStreamingEndpointCapacity { + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly scaleType?: string; + /** The streaming endpoint default capacity. */ + default?: number; + /** The streaming endpoint minimum capacity. */ + minimum?: number; + /** The streaming endpoint maximum capacity. */ + maximum?: number; +} + +/** The streaming endpoint sku. */ +export interface ArmStreamingEndpointSku { + /** + * The streaming endpoint sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; +} + /** scale units definition */ export interface StreamingEntityScaleUnit { /** The scale unit number of the streaming endpoint. */ scaleUnit?: number; } +/** The HLS setting for a text track. */ +export interface HlsSettings { + /** The default for the HLS setting. */ + default?: boolean; + /** The forced for the HLS setting. */ + forced?: boolean; + /** The characteristics for the HLS setting. */ + characteristics?: string; +} + /** Configures the Explicit Analog Television Output Restriction control bits. For further details see the PlayReady Compliance Rules. */ export interface ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction { /** Indicates whether this restriction is enforced on a Best Effort basis. */ @@ -1368,14 +1473,6 @@ export interface Codec { /** 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 { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "#Microsoft.Media.H265VideoLayer" - | "#Microsoft.Media.H265Layer" - | "#Microsoft.Media.VideoLayer" - | "#Microsoft.Media.H264Layer" - | "#Microsoft.Media.JpgLayer" - | "#Microsoft.Media.PngLayer"; /** 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; /** 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. */ @@ -1505,6 +1602,9 @@ export interface ClipTime { | "#Microsoft.Media.UtcClipTime"; } +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export type TrackedResource = Resource & { /** Resource tags. */ @@ -1542,8 +1642,36 @@ export type PrivateEndpointConnection = Resource & { readonly provisioningState?: PrivateEndpointConnectionProvisioningState; }; -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +/** Represents an audio track in the asset. */ +export type AudioTrack = TrackBase & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.AudioTrack"; +}; + +/** Represents a video track in the asset. */ +export type VideoTrack = TrackBase & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.VideoTrack"; +}; + +/** Represents a text track in an asset. A text track is usually used for sparse data related to the audio or video tracks. */ +export type TextTrack = TrackBase & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.TextTrack"; + /** The file name to the source file. This file is located in the storage container of the asset. */ + fileName?: string; + /** The display name of the text track on a video player. In HLS, this maps to the NAME attribute of EXT-X-MEDIA. */ + displayName?: string; + /** + * The RFC5646 language code for the text track. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly languageCode?: string; + /** When PlayerVisibility is set to "Visible", the text track will be present in the DASH manifest or HLS playlist when requested by a client. When the PlayerVisibility is set to "Hidden", the text will not be available to the client. The default value is "Visible". */ + playerVisibility?: Visibility; + /** The HLS specific setting for the text track. */ + hlsSettings?: HlsSettings; +}; /** Represents a configuration for non-DRM keys. */ export type ContentKeyPolicyClearKeyConfiguration = ContentKeyPolicyConfiguration & { @@ -1657,7 +1785,7 @@ export type AudioAnalyzerPreset = Preset & { export type BuiltInStandardEncoderPreset = Preset & { /** Polymorphic discriminator, which specifies the different types this object can be */ odataType: "#Microsoft.Media.BuiltInStandardEncoderPreset"; - /** PresetConfigurations are only supported for the ContentAwareEncoding and H265ContentAwareEncoding built-in presets. These settings will not affect other built-in or custom defined presets. */ + /** Optional configuration settings for encoder. Configurations is only supported for ContentAwareEncoding and H265ContentAwareEncoding BuiltInStandardEncoderPreset. */ configurations?: PresetConfigurations; /** The built-in preset to be used for encoding videos. */ presetName: EncoderNamedPreset; @@ -1802,8 +1930,6 @@ export type CopyAudio = Codec & { /** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ export type H265VideoLayer = Layer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.H265VideoLayer" | "#Microsoft.Media.H265Layer"; /** The average bitrate in bits per second at which to encode the input video when generating this layer. For example: a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This is a required field. */ bitrate: number; /** 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. */ @@ -1820,8 +1946,6 @@ export type H265VideoLayer = Layer & { /** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ export type VideoLayer = Layer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.VideoLayer" | "#Microsoft.Media.H264Layer"; /** 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; /** 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. */ @@ -1838,17 +1962,12 @@ export type VideoLayer = Layer & { /** Describes the settings to produce a JPEG image from the input video. */ export type JpgLayer = Layer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.JpgLayer"; /** The compression quality of the JPEG output. Range is from 0-100 and the default is 70. */ quality?: number; }; /** Describes the settings to produce a PNG image from the input video. */ -export type PngLayer = Layer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.PngLayer"; -}; +export type PngLayer = Layer & {}; /** A TrackSelection to select audio tracks. */ export type AudioTrackDescriptor = TrackDescriptor & { @@ -1900,179 +2019,48 @@ export type AudioOverlay = Overlay & { export type VideoOverlay = Overlay & { /** Polymorphic discriminator, which specifies the different types this object can be */ odataType: "#Microsoft.Media.VideoOverlay"; - /** The location in the input video where the overlay is applied. */ - position?: Rectangle; - /** 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; - /** An optional rectangular window used to crop the overlay image or video. */ - cropRectangle?: Rectangle; -}; - -/** Describes the properties for an output image file. */ -export type ImageFormat = Format & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "#Microsoft.Media.ImageFormat" - | "#Microsoft.Media.JpgFormat" - | "#Microsoft.Media.PngFormat"; -}; - -/** 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 type MultiBitrateFormat = Format & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: - | "#Microsoft.Media.MultiBitrateFormat" - | "#Microsoft.Media.Mp4Format" - | "#Microsoft.Media.TransportStreamFormat"; - /** The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . */ - outputFiles?: OutputFile[]; -}; - -/** 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 type AbsoluteClipTime = ClipTime & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.AbsoluteClipTime"; - /** The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. */ - time: string; -}; - -/** Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position depending on whether the media file starts from a timestamp of zero or not. */ -export type UtcClipTime = ClipTime & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.UtcClipTime"; - /** The time position on the timeline of the input media based on Utc time. */ - time: Date; -}; - -/** A Media Services account. */ -export type MediaService = TrackedResource & { - /** The Managed Identity for the Media Services account. */ - identity?: MediaServiceIdentity; - /** - * The system metadata relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** - * The Media Services account ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly mediaServiceId?: string; - /** The storage accounts for this resource. */ - storageAccounts?: StorageAccount[]; - storageAuthentication?: StorageAuthentication; - /** The account encryption properties. */ - encryption?: AccountEncryption; - /** The Key Delivery properties for Media Services account. */ - keyDelivery?: KeyDelivery; - /** Whether or not public network access is allowed for resources under the Media Services account. */ - publicNetworkAccess?: PublicNetworkAccess; -}; - -/** The live event. */ -export type LiveEvent = TrackedResource & { - /** - * The system metadata relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** A description for the live event. */ - description?: string; - /** Live event input settings. It defines how the live event receives input from a contribution encoder. */ - input?: LiveEventInput; - /** Live event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output. */ - preview?: LiveEventPreview; - /** Encoding settings for the live event. It configures whether a live encoder is used for the live event and settings for the live encoder if it is used. */ - encoding?: LiveEventEncoding; - /** Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. */ - transcriptions?: LiveEventTranscription[]; - /** - * 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; - /** - * The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: LiveEventResourceState; - /** Live event cross site access policies. */ - crossSiteAccessPolicies?: CrossSiteAccessPolicies; - /** Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. This value can only be updated if the live event is in Standby state */ - useStaticHostname?: boolean; - /** When useStaticHostname is set to true, the hostnamePrefix specifies the first part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a combination of this prefix, the media service account name and a short code for the Azure Media Services data center. */ - hostnamePrefix?: string; - /** The options to use for the LiveEvent. This value is specified at creation time and cannot be updated. The valid values for the array entry values are 'Default' and 'LowLatency'. */ - streamOptions?: StreamOptionsFlag[]; - /** - * The creation time for the live event - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly created?: Date; - /** - * The last modified time of the live event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModified?: Date; -}; - -/** The streaming endpoint. */ -export type StreamingEndpoint = TrackedResource & { - /** - * The system metadata relating to this resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; - /** The streaming endpoint description. */ - description?: string; - /** The number of scale units. Use the Scale operation to adjust this value. */ - scaleUnits?: number; - /** This feature is deprecated, do not set a value for this property. */ - availabilitySetName?: string; - /** The access control definition of the streaming endpoint. */ - accessControl?: StreamingEndpointAccessControl; - /** Max cache age */ - maxCacheAge?: number; - /** The custom host names of the streaming endpoint */ - customHostNames?: string[]; - /** - * The streaming endpoint host name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostName?: string; - /** The CDN enabled flag. */ - cdnEnabled?: boolean; - /** The CDN provider name. */ - cdnProvider?: string; - /** The CDN profile name. */ - cdnProfile?: string; - /** - * The provisioning state of the streaming endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: string; - /** - * The resource state of the streaming endpoint. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceState?: StreamingEndpointResourceState; - /** The streaming endpoint access policies. */ - crossSiteAccessPolicies?: CrossSiteAccessPolicies; - /** - * The free trial expiration time. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly freeTrialEndTime?: Date; - /** - * The exact time the streaming endpoint was created. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly created?: Date; - /** - * The exact time the streaming endpoint was last modified. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastModified?: Date; + /** The location in the input video where the overlay is applied. */ + position?: Rectangle; + /** 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; + /** An optional rectangular window used to crop the overlay image or video. */ + cropRectangle?: Rectangle; +}; + +/** Describes the properties for an output image file. */ +export type ImageFormat = Format & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: + | "#Microsoft.Media.ImageFormat" + | "#Microsoft.Media.JpgFormat" + | "#Microsoft.Media.PngFormat"; +}; + +/** 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 type MultiBitrateFormat = Format & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: + | "#Microsoft.Media.MultiBitrateFormat" + | "#Microsoft.Media.Mp4Format" + | "#Microsoft.Media.TransportStreamFormat"; + /** The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . */ + outputFiles?: OutputFile[]; +}; + +/** 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 type AbsoluteClipTime = ClipTime & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.AbsoluteClipTime"; + /** The time position on the timeline of the input media. It is usually specified as an ISO8601 period. e.g PT30S for 30 seconds. */ + time: string; +}; + +/** Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position depending on whether the media file starts from a timestamp of zero or not. */ +export type UtcClipTime = ClipTime & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.UtcClipTime"; + /** The time position on the timeline of the input media based on Utc time. */ + time: Date; }; /** An Account Filter. */ @@ -2142,6 +2130,17 @@ export type AssetFilter = ProxyResource & { tracks?: FilterTrackSelection[]; }; +/** An Asset Track resource. */ +export type AssetTrack = ProxyResource & { + /** Detailed information about a track in the asset. */ + track?: TrackBaseUnion; + /** + * Provisioning state of the asset track. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** A Content Key Policy resource. */ export type ContentKeyPolicy = ProxyResource & { /** @@ -2334,6 +2333,149 @@ export type LiveOutput = ProxyResource & { readonly resourceState?: LiveOutputResourceState; }; +/** A Media Services account. */ +export type MediaService = TrackedResource & { + /** + * The system metadata relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The Managed Identity for the Media Services account. */ + identity?: MediaServiceIdentity; + /** + * The Media Services account ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly mediaServiceId?: string; + /** The storage accounts for this resource. */ + storageAccounts?: StorageAccount[]; + storageAuthentication?: StorageAuthentication; + /** The account encryption properties. */ + encryption?: AccountEncryption; + /** The Key Delivery properties for Media Services account. */ + keyDelivery?: KeyDelivery; + /** Whether or not public network access is allowed for resources under the Media Services account. */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * Provisioning state of the Media Services account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The Private Endpoint Connections created for the Media Service account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: any; +}; + +/** The live event. */ +export type LiveEvent = TrackedResource & { + /** + * The system metadata relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** A description for the live event. */ + description?: string; + /** Live event input settings. It defines how the live event receives input from a contribution encoder. */ + input?: LiveEventInput; + /** Live event preview settings. Preview allows live event producers to preview the live streaming content without creating any live output. */ + preview?: LiveEventPreview; + /** Encoding settings for the live event. It configures whether a live encoder is used for the live event and settings for the live encoder if it is used. */ + encoding?: LiveEventEncoding; + /** Live transcription settings for the live event. See https://go.microsoft.com/fwlink/?linkid=2133742 for more information about the live transcription feature. */ + transcriptions?: LiveEventTranscription[]; + /** + * 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; + /** + * The resource state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: LiveEventResourceState; + /** Live event cross site access policies. */ + crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** Specifies whether a static hostname would be assigned to the live event preview and ingest endpoints. This value can only be updated if the live event is in Standby state */ + useStaticHostname?: boolean; + /** When useStaticHostname is set to true, the hostnamePrefix specifies the first part of the hostname assigned to the live event preview and ingest endpoints. The final hostname would be a combination of this prefix, the media service account name and a short code for the Azure Media Services data center. */ + hostnamePrefix?: string; + /** The options to use for the LiveEvent. This value is specified at creation time and cannot be updated. The valid values for the array entry values are 'Default' and 'LowLatency'. */ + streamOptions?: StreamOptionsFlag[]; + /** + * The creation time for the live event + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly created?: Date; + /** + * The last modified time of the live event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModified?: Date; +}; + +/** The streaming endpoint. */ +export type StreamingEndpoint = TrackedResource & { + /** + * The system metadata relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The streaming endpoint sku. */ + sku?: ArmStreamingEndpointCurrentSku; + /** The streaming endpoint description. */ + description?: string; + /** The number of scale units. Use the Scale operation to adjust this value. */ + scaleUnits?: number; + /** This feature is deprecated, do not set a value for this property. */ + availabilitySetName?: string; + /** The access control definition of the streaming endpoint. */ + accessControl?: StreamingEndpointAccessControl; + /** Max cache age */ + maxCacheAge?: number; + /** The custom host names of the streaming endpoint */ + customHostNames?: string[]; + /** + * The streaming endpoint host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** The CDN enabled flag. */ + cdnEnabled?: boolean; + /** The CDN provider name. */ + cdnProvider?: string; + /** The CDN profile name. */ + cdnProfile?: string; + /** + * The provisioning state of the streaming endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The resource state of the streaming endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceState?: StreamingEndpointResourceState; + /** The streaming endpoint access policies. */ + crossSiteAccessPolicies?: CrossSiteAccessPolicies; + /** + * The free trial expiration time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly freeTrialEndTime?: Date; + /** + * The exact time the streaming endpoint was created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly created?: Date; + /** + * The exact time the streaming endpoint was last modified. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModified?: Date; +}; + /** A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format file. */ export type VideoAnalyzerPreset = AudioAnalyzerPreset & { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -2397,38 +2539,40 @@ export type Image = Video & { export type H264Video = Video & { /** Polymorphic discriminator, which specifies the different types this object can be */ odataType: "#Microsoft.Media.H264Video"; - /** 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; /** Tells the encoder how to choose its encoding settings. The default value is Balanced. */ complexity?: H264Complexity; /** The collection of output H.264 layers to be produced by the encoder. */ layers?: H264Layer[]; + /** The video rate control mode */ + rateControlMode?: H264RateControlMode; + /** 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; }; /** Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 video codec. */ export type H265Layer = H265VideoLayer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.H265Layer"; /** We currently support Main. Default is Auto. */ profile?: H265VideoProfile; /** We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. */ level?: string; /** 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; + /** The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 28. */ + crf?: number; /** 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; }; /** Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 video codec. */ export type H264Layer = VideoLayer & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.H264Layer"; /** We currently support Baseline, Main, High, High422, High444. Default is Auto. */ profile?: H264VideoProfile; /** 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; /** 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; + /** The value of CRF to be used when encoding this layer. This setting takes effect when RateControlMode of video codec is set at CRF mode. The range of CRF value is between 0 and 51, where lower values would result in better quality, at the expense of higher file sizes. Higher values mean more compression, but at some point quality degradation will be noticed. Default value is 23. */ + crf?: number; /** 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; /** 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. */ @@ -2499,23 +2643,171 @@ export type TransportStreamFormat = MultiBitrateFormat & { odataType: "#Microsoft.Media.TransportStreamFormat"; }; -/** Describes the properties for producing a series of JPEG images from the input video. */ -export type JpgImage = Image & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.JpgImage"; - /** A collection of output JPEG image layers to be produced by the encoder. */ - layers?: JpgLayer[]; - /** Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution limit 65535x65535. */ - spriteColumn?: number; -}; +/** Describes the properties for producing a series of JPEG images from the input video. */ +export type JpgImage = Image & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.JpgImage"; + /** A collection of output JPEG image layers to be produced by the encoder. */ + layers?: JpgLayer[]; + /** Sets the number of columns used in thumbnail sprite image. The number of rows are automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image resolution will not go beyond JPEG maximum pixel resolution limit 65535x65535. */ + spriteColumn?: number; +}; + +/** Describes the properties for producing a series of PNG images from the input video. */ +export type PngImage = Image & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odataType: "#Microsoft.Media.PngImage"; + /** A collection of output PNG image layers to be produced by the encoder. */ + layers?: PngLayer[]; +}; + +/** Defines headers for Mediaservices_createOrUpdate operation. */ +export interface MediaservicesCreateOrUpdateHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Mediaservices_update operation. */ +export interface MediaservicesUpdateHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for MediaServiceOperationResults_get operation. */ +export interface MediaServiceOperationResultsGetHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Tracks_createOrUpdate operation. */ +export interface TracksCreateOrUpdateHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Tracks_delete operation. */ +export interface TracksDeleteHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Tracks_update operation. */ +export interface TracksUpdateHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for Tracks_updateTrackData operation. */ +export interface TracksUpdateTrackDataHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for OperationResults_get operation. */ +export interface OperationResultsGetHeaders { + /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */ + retryAfter?: number; + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Known values of {@link FilterTrackPropertyType} that the service accepts. */ +export enum KnownFilterTrackPropertyType { + /** The unknown track property type. */ + Unknown = "Unknown", + /** The type. */ + Type = "Type", + /** The name. */ + Name = "Name", + /** The language. */ + Language = "Language", + /** The fourCC. */ + FourCC = "FourCC", + /** The bitrate. */ + Bitrate = "Bitrate" +} + +/** + * Defines values for FilterTrackPropertyType. \ + * {@link KnownFilterTrackPropertyType} can be used interchangeably with FilterTrackPropertyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: The unknown track property type. \ + * **Type**: The type. \ + * **Name**: The name. \ + * **Language**: The language. \ + * **FourCC**: The fourCC. \ + * **Bitrate**: The bitrate. + */ +export type FilterTrackPropertyType = string; + +/** Known values of {@link FilterTrackPropertyCompareOperation} that the service accepts. */ +export enum KnownFilterTrackPropertyCompareOperation { + /** The equal operation. */ + Equal = "Equal", + /** The not equal operation. */ + NotEqual = "NotEqual" +} + +/** + * Defines values for FilterTrackPropertyCompareOperation. \ + * {@link KnownFilterTrackPropertyCompareOperation} can be used interchangeably with FilterTrackPropertyCompareOperation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Equal**: The equal operation. \ + * **NotEqual**: The not equal operation. + */ +export type FilterTrackPropertyCompareOperation = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} -/** Describes the properties for producing a series of PNG images from the input video. */ -export type PngImage = Image & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odataType: "#Microsoft.Media.PngImage"; - /** A collection of output PNG image layers to be produced by the encoder. */ - layers?: PngLayer[]; -}; +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; /** Known values of {@link MetricUnit} that the service accepts. */ export enum KnownMetricUnit { @@ -2664,25 +2956,26 @@ export enum KnownPublicNetworkAccess { */ export type PublicNetworkAccess = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - User = "User", - Application = "Application", - ManagedIdentity = "ManagedIdentity", - Key = "Key" +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Provisioning state failed. */ + Failed = "Failed", + /** Provisioning state in progress. */ + InProgress = "InProgress", + /** Provisioning state succeeded. */ + Succeeded = "Succeeded" } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Failed**: Provisioning state failed. \ + * **InProgress**: Provisioning state in progress. \ + * **Succeeded**: Provisioning state succeeded. */ -export type CreatedByType = string; +export type ProvisioningState = string; /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointServiceConnectionStatus { @@ -2722,54 +3015,6 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; -/** Known values of {@link FilterTrackPropertyType} that the service accepts. */ -export enum KnownFilterTrackPropertyType { - /** The unknown track property type. */ - Unknown = "Unknown", - /** The type. */ - Type = "Type", - /** The name. */ - Name = "Name", - /** The language. */ - Language = "Language", - /** The fourCC. */ - FourCC = "FourCC", - /** The bitrate. */ - Bitrate = "Bitrate" -} - -/** - * Defines values for FilterTrackPropertyType. \ - * {@link KnownFilterTrackPropertyType} can be used interchangeably with FilterTrackPropertyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown**: The unknown track property type. \ - * **Type**: The type. \ - * **Name**: The name. \ - * **Language**: The language. \ - * **FourCC**: The fourCC. \ - * **Bitrate**: The bitrate. - */ -export type FilterTrackPropertyType = string; - -/** Known values of {@link FilterTrackPropertyCompareOperation} that the service accepts. */ -export enum KnownFilterTrackPropertyCompareOperation { - /** The equal operation. */ - Equal = "Equal", - /** The not equal operation. */ - NotEqual = "NotEqual" -} - -/** - * Defines values for FilterTrackPropertyCompareOperation. \ - * {@link KnownFilterTrackPropertyCompareOperation} can be used interchangeably with FilterTrackPropertyCompareOperation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Equal**: The equal operation. \ - * **NotEqual**: The not equal operation. - */ -export type FilterTrackPropertyCompareOperation = string; - /** Known values of {@link AssetStorageEncryptionFormat} that the service accepts. */ export enum KnownAssetStorageEncryptionFormat { /** The Asset does not use client-side storage encryption (this is the only allowed value for new Assets). */ @@ -3173,8 +3418,10 @@ export type LiveEventResourceState = string; export enum KnownStreamOptionsFlag { /** Live streaming with no special latency optimizations. */ Default = "Default", - /** The live event provides lower end to end latency by reducing its internal buffers. This could result in more client buffering during playback if network bandwidth is low. */ - LowLatency = "LowLatency" + /** The live event provides lower end to end latency by reducing its internal buffers. */ + LowLatency = "LowLatency", + /** The live event is optimized for end to end latency. This option is only available for encoding live events with RTMP input. The outputs can be streamed using HLS or DASH formats. The outputs' archive or DVR rewind length is limited to 6 hours. Use "LowLatency" stream option for all other scenarios. */ + LowLatencyV2 = "LowLatencyV2" } /** @@ -3183,7 +3430,8 @@ export enum KnownStreamOptionsFlag { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Default**: Live streaming with no special latency optimizations. \ - * **LowLatency**: The live event provides lower end to end latency by reducing its internal buffers. This could result in more client buffering during playback if network bandwidth is low. + * **LowLatency**: The live event provides lower end to end latency by reducing its internal buffers. \ + * **LowLatencyV2**: The live event is optimized for end to end latency. This option is only available for encoding live events with RTMP input. The outputs can be streamed using HLS or DASH formats. The outputs' archive or DVR rewind length is limited to 6 hours. Use "LowLatency" stream option for all other scenarios. */ export type StreamOptionsFlag = string; @@ -3238,6 +3486,24 @@ export enum KnownStreamingEndpointResourceState { */ export type StreamingEndpointResourceState = string; +/** Known values of {@link Visibility} that the service accepts. */ +export enum KnownVisibility { + /** The track is hidden to video player. */ + Hidden = "Hidden", + /** The track is visible to video player. */ + Visible = "Visible" +} + +/** + * Defines values for Visibility. \ + * {@link KnownVisibility} can be used interchangeably with Visibility, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Hidden**: The track is hidden to video player. \ + * **Visible**: The track is visible to video player. + */ +export type Visibility = string; + /** Known values of {@link ContentKeyPolicyPlayReadyUnknownOutputPassingOption} that the service accepts. */ export enum KnownContentKeyPolicyPlayReadyUnknownOutputPassingOption { /** Represents a ContentKeyPolicyPlayReadyUnknownOutputPassingOption that is unavailable in current API version. */ @@ -3381,7 +3647,9 @@ export enum KnownH265VideoProfile { /** Tells the encoder to automatically determine the appropriate H.265 profile. */ Auto = "Auto", /** Main profile (https://x265.readthedocs.io/en/default/cli.html?highlight=profile#profile-level-tier) */ - Main = "Main" + Main = "Main", + /** Main 10 profile (https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Main_10) */ + Main10 = "Main10" } /** @@ -3390,7 +3658,8 @@ export enum KnownH265VideoProfile { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Auto**: Tells the encoder to automatically determine the appropriate H.265 profile. \ - * **Main**: Main profile (https:\/\/x265.readthedocs.io\/en\/default\/cli.html?highlight=profile#profile-level-tier) + * **Main**: Main profile (https:\/\/x265.readthedocs.io\/en\/default\/cli.html?highlight=profile#profile-level-tier) \ + * **Main10**: Main 10 profile (https:\/\/en.wikipedia.org\/wiki\/High_Efficiency_Video_Coding#Main_10) */ export type H265VideoProfile = string; @@ -3737,6 +4006,27 @@ export enum KnownH264Complexity { */ export type H264Complexity = string; +/** Known values of {@link H264RateControlMode} that the service accepts. */ +export enum KnownH264RateControlMode { + /** Average Bitrate (ABR) mode that hits the target bitrate: Default mode. */ + ABR = "ABR", + /** Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate. */ + CBR = "CBR", + /** Constant Rate Factor (CRF) mode that targets at constant subjective quality. */ + CRF = "CRF" +} + +/** + * Defines values for H264RateControlMode. \ + * {@link KnownH264RateControlMode} can be used interchangeably with H264RateControlMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ABR**: Average Bitrate (ABR) mode that hits the target bitrate: Default mode. \ + * **CBR**: Constant Bitrate (CBR) mode that tightens bitrate variations around target bitrate. \ + * **CRF**: Constant Rate Factor (CRF) mode that targets at constant subjective quality. + */ +export type H264RateControlMode = string; + /** Known values of {@link Complexity} that the service accepts. */ export enum KnownComplexity { /** Configures the encoder to use settings optimized for faster encoding. Quality is sacrificed to decrease encoding time. */ @@ -3857,6 +4147,45 @@ export enum KnownInsightsType { */ export type InsightsType = string; +/** Optional parameters. */ +export interface AccountFiltersListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AccountFiltersListResponse = AccountFilterCollection; + +/** Optional parameters. */ +export interface AccountFiltersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AccountFiltersGetResponse = AccountFilter; + +/** Optional parameters. */ +export interface AccountFiltersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AccountFiltersCreateOrUpdateResponse = AccountFilter; + +/** Optional parameters. */ +export interface AccountFiltersDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AccountFiltersUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AccountFiltersUpdateResponse = AccountFilter; + +/** Optional parameters. */ +export interface AccountFiltersListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AccountFiltersListNextResponse = AccountFilterCollection; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -3880,10 +4209,16 @@ export type MediaservicesGetResponse = MediaService; /** Optional parameters. */ export interface MediaservicesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ -export type MediaservicesCreateOrUpdateResponse = MediaService; +export type MediaservicesCreateOrUpdateResponse = MediaservicesCreateOrUpdateHeaders & + MediaService; /** Optional parameters. */ export interface MediaservicesDeleteOptionalParams @@ -3891,10 +4226,16 @@ export interface MediaservicesDeleteOptionalParams /** Optional parameters. */ export interface MediaservicesUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ -export type MediaservicesUpdateResponse = MediaService; +export type MediaservicesUpdateResponse = MediaservicesUpdateHeaders & + MediaService; /** Optional parameters. */ export interface MediaservicesSyncStorageKeysOptionalParams @@ -3975,43 +4316,18 @@ export interface LocationsCheckNameAvailabilityOptionalParams export type LocationsCheckNameAvailabilityResponse = EntityNameAvailabilityCheckOutput; /** Optional parameters. */ -export interface AccountFiltersListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AccountFiltersListResponse = AccountFilterCollection; - -/** Optional parameters. */ -export interface AccountFiltersGetOptionalParams +export interface MediaServiceOperationStatusesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type AccountFiltersGetResponse = AccountFilter; - -/** Optional parameters. */ -export interface AccountFiltersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type AccountFiltersCreateOrUpdateResponse = AccountFilter; - -/** Optional parameters. */ -export interface AccountFiltersDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface AccountFiltersUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type AccountFiltersUpdateResponse = AccountFilter; +export type MediaServiceOperationStatusesGetResponse = MediaServiceOperationStatus; /** Optional parameters. */ -export interface AccountFiltersListNextOptionalParams +export interface MediaServiceOperationResultsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type AccountFiltersListNextResponse = AccountFilterCollection; +/** Contains response data for the get operation. */ +export type MediaServiceOperationResultsGetResponse = MediaService; /** Optional parameters. */ export interface AssetsListOptionalParams extends coreClient.OperationOptions { @@ -4124,6 +4440,81 @@ export interface AssetFiltersListNextOptionalParams /** Contains response data for the listNext operation. */ export type AssetFiltersListNextResponse = AssetFilterCollection; +/** Optional parameters. */ +export interface TracksListOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type TracksListResponse = AssetTrackCollection; + +/** Optional parameters. */ +export interface TracksGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TracksGetResponse = AssetTrack; + +/** Optional parameters. */ +export interface TracksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type TracksCreateOrUpdateResponse = TracksCreateOrUpdateHeaders & + AssetTrack; + +/** Optional parameters. */ +export interface TracksDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type TracksDeleteResponse = TracksDeleteHeaders; + +/** Optional parameters. */ +export interface TracksUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type TracksUpdateResponse = TracksUpdateHeaders & AssetTrack; + +/** Optional parameters. */ +export interface TracksUpdateTrackDataOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateTrackData operation. */ +export type TracksUpdateTrackDataResponse = TracksUpdateTrackDataHeaders; + +/** Optional parameters. */ +export interface OperationStatusesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationStatusesGetResponse = AssetTrackOperationStatus; + +/** Optional parameters. */ +export interface OperationResultsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type OperationResultsGetResponse = AssetTrack; + /** Optional parameters. */ export interface ContentKeyPoliciesListOptionalParams extends coreClient.OperationOptions { @@ -4570,6 +4961,13 @@ export interface StreamingEndpointsDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface StreamingEndpointsSkusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the skus operation. */ +export type StreamingEndpointsSkusResponse = StreamingEndpointSkuInfoListResult; + /** Optional parameters. */ export interface StreamingEndpointsStartOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index 12a18b8c6604..e7e7eeff3d45 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -8,10 +8,10 @@ import * as coreClient from "@azure/core-client"; -export const OperationCollection: coreClient.CompositeMapper = { +export const AccountFilterCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationCollection", + className: "AccountFilterCollection", modelProperties: { value: { serializedName: "value", @@ -20,279 +20,318 @@ export const OperationCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "AccountFilter" } } } + }, + odataNextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } } } } }; -export const Operation: coreClient.CompositeMapper = { +export const PresentationTimeRange: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "PresentationTimeRange", modelProperties: { - name: { - serializedName: "name", - required: true, + startTimestamp: { + serializedName: "startTimestamp", type: { - name: "String" + name: "Number" } }, - display: { - serializedName: "display", + endTimestamp: { + serializedName: "endTimestamp", type: { - name: "Composite", - className: "OperationDisplay" + name: "Number" } }, - origin: { - serializedName: "origin", + presentationWindowDuration: { + serializedName: "presentationWindowDuration", type: { - name: "String" + name: "Number" } }, - properties: { - serializedName: "properties", + liveBackoffDuration: { + serializedName: "liveBackoffDuration", type: { - name: "Composite", - className: "Properties" + name: "Number" } }, - isDataAction: { - serializedName: "isDataAction", - nullable: true, + timescale: { + serializedName: "timescale", type: { - name: "Boolean" + name: "Number" } }, - actionType: { - serializedName: "actionType", - nullable: true, + forceEndTimestamp: { + serializedName: "forceEndTimestamp", type: { - name: "String" + name: "Boolean" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const FirstQuality: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "FirstQuality", modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - }, - description: { - serializedName: "description", + bitrate: { + serializedName: "bitrate", + required: true, type: { - name: "String" + name: "Number" } } } } }; -export const Properties: coreClient.CompositeMapper = { +export const FilterTrackSelection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Properties", + className: "FilterTrackSelection", modelProperties: { - serviceSpecification: { - serializedName: "serviceSpecification", + trackSelections: { + serializedName: "trackSelections", + required: true, type: { - name: "Composite", - className: "ServiceSpecification" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterTrackPropertyCondition" + } + } } } } } }; -export const ServiceSpecification: coreClient.CompositeMapper = { +export const FilterTrackPropertyCondition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceSpecification", + className: "FilterTrackPropertyCondition", modelProperties: { - logSpecifications: { - serializedName: "logSpecifications", - readOnly: true, + property: { + serializedName: "property", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogSpecification" - } - } + name: "String" } }, - metricSpecifications: { - serializedName: "metricSpecifications", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSpecification" - } - } + name: "String" + } + }, + operation: { + serializedName: "operation", + required: true, + type: { + name: "String" } } } } }; -export const LogSpecification: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogSpecification", + className: "SystemData", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - displayName: { - serializedName: "displayName", - readOnly: true, + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - blobDuration: { - serializedName: "blobDuration", - readOnly: true, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } }; -export const MetricSpecification: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricSpecification", + className: "Resource", modelProperties: { - name: { - serializedName: "name", + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", + name: { + serializedName: "name", readOnly: true, type: { name: "String" } }, - displayDescription: { - serializedName: "displayDescription", + type: { + serializedName: "type", readOnly: true, type: { name: "String" } - }, - unit: { - serializedName: "unit", + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", readOnly: true, type: { name: "String" } }, - aggregationType: { - serializedName: "aggregationType", + message: { + serializedName: "message", readOnly: true, type: { name: "String" } }, - lockAggregationType: { - serializedName: "lockAggregationType", + target: { + serializedName: "target", readOnly: true, type: { name: "String" } }, - supportedAggregationTypes: { - serializedName: "supportedAggregationTypes", + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } }, - dimensions: { - serializedName: "dimensions", + additionalInfo: { + serializedName: "additionalInfo", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricDimension" + className: "ErrorAdditionalInfo" } } } - }, - enableRegionalMdmAccount: { - serializedName: "enableRegionalMdmAccount", - readOnly: true, - type: { - name: "Boolean" - } - }, - sourceMdmAccount: { - serializedName: "sourceMdmAccount", + } + } + } +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", readOnly: true, type: { name: "String" } }, - sourceMdmNamespace: { - serializedName: "sourceMdmNamespace", + info: { + serializedName: "info", readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } - }, - supportedTimeGrainTypes: { - serializedName: "supportedTimeGrainTypes", - readOnly: true, + } + } + } +}; + +export const OperationCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationCollection", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Operation" } } } @@ -301,186 +340,161 @@ export const MetricSpecification: coreClient.CompositeMapper = { } }; -export const MetricDimension: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricDimension", + className: "Operation", modelProperties: { name: { serializedName: "name", - readOnly: true, + required: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", - readOnly: true, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", type: { name: "String" } }, - toBeExportedForShoebox: { - serializedName: "toBeExportedForShoebox", - readOnly: true, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "Properties" + } + }, + isDataAction: { + serializedName: "isDataAction", + nullable: true, type: { name: "Boolean" } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", + }, + actionType: { + serializedName: "actionType", + nullable: true, type: { - name: "Composite", - className: "ErrorDetail" + name: "String" } } } } }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "OperationDisplay", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + provider: { + serializedName: "provider", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + resource: { + serializedName: "resource", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + operation: { + serializedName: "operation", type: { name: "String" } }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail" - } - } - } - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + description: { + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo" - } - } + name: "String" } } } } }; -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { +export const Properties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorAdditionalInfo", + className: "Properties", modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - info: { - serializedName: "info", - readOnly: true, + serviceSpecification: { + serializedName: "serviceSpecification", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Composite", + className: "ServiceSpecification" } } } } }; -export const MediaServiceCollection: coreClient.CompositeMapper = { +export const ServiceSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MediaServiceCollection", + className: "ServiceSpecification", modelProperties: { - value: { - serializedName: "value", + logSpecifications: { + serializedName: "logSpecifications", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MediaService" + className: "LogSpecification" } } } }, - odataNextLink: { - serializedName: "@odata\\.nextLink", + metricSpecifications: { + serializedName: "metricSpecifications", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } } } } } }; -export const StorageAccount: coreClient.CompositeMapper = { +export const LogSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageAccount", + className: "LogSpecification", modelProperties: { - id: { - serializedName: "id", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", - required: true, + displayName: { + serializedName: "displayName", + readOnly: true, type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ResourceIdentity" - } - }, - status: { - serializedName: "status", + blobDuration: { + serializedName: "blobDuration", readOnly: true, type: { name: "String" @@ -490,52 +504,254 @@ export const StorageAccount: coreClient.CompositeMapper = { } }; -export const ResourceIdentity: coreClient.CompositeMapper = { +export const MetricSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceIdentity", + className: "MetricSpecification", modelProperties: { - userAssignedIdentity: { - serializedName: "userAssignedIdentity", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - useSystemAssignedIdentity: { - serializedName: "useSystemAssignedIdentity", - required: true, + displayName: { + serializedName: "displayName", + readOnly: true, type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const AccountEncryption: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AccountEncryption", - modelProperties: { - type: { - serializedName: "type", - required: true, + }, + displayDescription: { + serializedName: "displayDescription", + readOnly: true, type: { name: "String" } }, - keyVaultProperties: { - serializedName: "keyVaultProperties", + unit: { + serializedName: "unit", + readOnly: true, type: { - name: "Composite", - className: "KeyVaultProperties" + name: "String" } }, - identity: { - serializedName: "identity", + aggregationType: { + serializedName: "aggregationType", + readOnly: true, type: { - name: "Composite", - className: "ResourceIdentity" + name: "String" + } + }, + lockAggregationType: { + serializedName: "lockAggregationType", + readOnly: true, + nullable: true, + type: { + name: "String" + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dimensions: { + serializedName: "dimensions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + readOnly: true, + type: { + name: "Boolean" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + readOnly: true, + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + readOnly: true, + type: { + name: "String" + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MetricDimension: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetricDimension", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + readOnly: true, + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const MediaServiceCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MediaServiceCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaService" + } + } + } + }, + odataNextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StorageAccount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageAccount", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + type: { + name: "String" + } + }, + useSystemAssignedIdentity: { + serializedName: "useSystemAssignedIdentity", + required: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const AccountEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountEncryption", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" } }, status: { @@ -682,128 +898,53 @@ export const UserAssignedManagedIdentity: coreClient.CompositeMapper = { } }; -export const SystemData: coreClient.CompositeMapper = { +export const MediaServiceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "MediaServiceUpdate", modelProperties: { - createdBy: { - serializedName: "createdBy", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - createdByType: { - serializedName: "createdByType", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "MediaServiceIdentity" } }, - createdAt: { - serializedName: "createdAt", + mediaServiceId: { + serializedName: "properties.mediaServiceId", + readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + storageAccounts: { + serializedName: "properties.storageAccounts", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageAccount" + } + } } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + storageAuthentication: { + serializedName: "properties.storageAuthentication", + nullable: true, type: { name: "String" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } - } - } - } -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const MediaServiceUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MediaServiceUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "MediaServiceIdentity" - } - }, - mediaServiceId: { - serializedName: "properties.mediaServiceId", - readOnly: true, - type: { - name: "Uuid" - } - }, - storageAccounts: { - serializedName: "properties.storageAccounts", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccount" - } - } - } - }, - storageAuthentication: { - serializedName: "properties.storageAuthentication", - nullable: true, - type: { - name: "String" - } - }, - encryption: { - serializedName: "properties.encryption", + encryption: { + serializedName: "properties.encryption", type: { name: "Composite", className: "AccountEncryption" @@ -822,6 +963,20 @@ export const MediaServiceUpdate: coreClient.CompositeMapper = { type: { name: "String" } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "any" + } } } } @@ -1068,140 +1223,48 @@ export const EntityNameAvailabilityCheckOutput: coreClient.CompositeMapper = { } }; -export const AccountFilterCollection: coreClient.CompositeMapper = { +export const MediaServiceOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AccountFilterCollection", + className: "MediaServiceOperationStatus", modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccountFilter" - } - } - } - }, - odataNextLink: { - serializedName: "@odata\\.nextLink", + name: { + serializedName: "name", + required: true, type: { name: "String" } - } - } - } -}; - -export const PresentationTimeRange: coreClient.CompositeMapper = { - 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", + id: { + serializedName: "id", type: { - name: "Number" + name: "String" } }, - timescale: { - serializedName: "timescale", + startTime: { + serializedName: "startTime", type: { - name: "Number" + name: "DateTime" } }, - forceEndTimestamp: { - serializedName: "forceEndTimestamp", - type: { - name: "Boolean" - } - } - } - } -}; - -export const FirstQuality: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FirstQuality", - modelProperties: { - bitrate: { - serializedName: "bitrate", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const FilterTrackSelection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FilterTrackSelection", - modelProperties: { - trackSelections: { - serializedName: "trackSelections", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterTrackPropertyCondition" - } - } - } - } - } - } -}; - -export const FilterTrackPropertyCondition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FilterTrackPropertyCondition", - modelProperties: { - property: { - serializedName: "property", - required: true, + endTime: { + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - value: { - serializedName: "value", + status: { + serializedName: "status", required: true, type: { name: "String" } }, - operation: { - serializedName: "operation", - required: true, + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorDetail" } } } @@ -1445,10 +1508,10 @@ export const AssetFilterCollection: coreClient.CompositeMapper = { } }; -export const ContentKeyPolicyCollection: coreClient.CompositeMapper = { +export const AssetTrackCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContentKeyPolicyCollection", + className: "AssetTrackCollection", modelProperties: { value: { serializedName: "value", @@ -1457,13 +1520,28 @@ export const ContentKeyPolicyCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContentKeyPolicy" + className: "AssetTrack" } } } - }, - odataNextLink: { - serializedName: "@odata\\.nextLink", + } + } + } +}; + +export const TrackBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackBase", + uberParent: "TrackBase", + polymorphicDiscriminator: { + serializedName: "@odata\\.type", + clientName: "odataType" + }, + modelProperties: { + odataType: { + serializedName: "@odata\\.type", + required: true, type: { name: "String" } @@ -1472,16 +1550,91 @@ export const ContentKeyPolicyCollection: coreClient.CompositeMapper = { } }; -export const ContentKeyPolicyProperties: coreClient.CompositeMapper = { +export const AssetTrackOperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContentKeyPolicyProperties", + className: "AssetTrackOperationStatus", modelProperties: { - policyId: { - serializedName: "policyId", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { - name: "Uuid" + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", + required: true, + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const ContentKeyPolicyCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContentKeyPolicyCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContentKeyPolicy" + } + } + } + }, + odataNextLink: { + serializedName: "@odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ContentKeyPolicyProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContentKeyPolicyProperties", + modelProperties: { + policyId: { + serializedName: "policyId", + readOnly: true, + type: { + name: "Uuid" } }, created: { @@ -3009,6 +3162,128 @@ export const AkamaiSignatureHeaderAuthenticationKey: coreClient.CompositeMapper } }; +export const ArmStreamingEndpointCurrentSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmStreamingEndpointCurrentSku", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const StreamingEndpointSkuInfoListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StreamingEndpointSkuInfoListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArmStreamingEndpointSkuInfo" + } + } + } + } + } + } +}; + +export const ArmStreamingEndpointSkuInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmStreamingEndpointSkuInfo", + modelProperties: { + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Composite", + className: "ArmStreamingEndpointCapacity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ArmStreamingEndpointSku" + } + } + } + } +}; + +export const ArmStreamingEndpointCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmStreamingEndpointCapacity", + modelProperties: { + scaleType: { + serializedName: "scaleType", + readOnly: true, + type: { + name: "String" + } + }, + default: { + serializedName: "default", + type: { + name: "Number" + } + }, + minimum: { + serializedName: "minimum", + type: { + name: "Number" + } + }, + maximum: { + serializedName: "maximum", + type: { + name: "Number" + } + } + } + } +}; + +export const ArmStreamingEndpointSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ArmStreamingEndpointSku", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const StreamingEntityScaleUnit: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3024,6 +3299,33 @@ export const StreamingEntityScaleUnit: coreClient.CompositeMapper = { } }; +export const HlsSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HlsSettings", + modelProperties: { + default: { + serializedName: "default", + type: { + name: "Boolean" + } + }, + forced: { + serializedName: "forced", + type: { + name: "Boolean" + } + }, + characteristics: { + serializedName: "characteristics", + type: { + name: "String" + } + } + } + } +}; + export const ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3331,19 +3633,7 @@ export const Layer: coreClient.CompositeMapper = { type: { name: "Composite", className: "Layer", - uberParent: "Layer", - polymorphicDiscriminator: { - serializedName: "@odata\\.type", - clientName: "odataType" - }, modelProperties: { - odataType: { - serializedName: "@odata\\.type", - required: true, - type: { - name: "String" - } - }, width: { serializedName: "width", type: { @@ -3700,6 +3990,16 @@ export const ClipTime: coreClient.CompositeMapper = { } }; +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3795,12 +4095,73 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const AudioTrack: coreClient.CompositeMapper = { + serializedName: "#Microsoft.Media.AudioTrack", type: { name: "Composite", - className: "ProxyResource", + className: "AudioTrack", + uberParent: "TrackBase", + polymorphicDiscriminator: TrackBase.type.polymorphicDiscriminator, modelProperties: { - ...Resource.type.modelProperties + ...TrackBase.type.modelProperties + } + } +}; + +export const VideoTrack: coreClient.CompositeMapper = { + serializedName: "#Microsoft.Media.VideoTrack", + type: { + name: "Composite", + className: "VideoTrack", + uberParent: "TrackBase", + polymorphicDiscriminator: TrackBase.type.polymorphicDiscriminator, + modelProperties: { + ...TrackBase.type.modelProperties + } + } +}; + +export const TextTrack: coreClient.CompositeMapper = { + serializedName: "#Microsoft.Media.TextTrack", + type: { + name: "Composite", + className: "TextTrack", + uberParent: "TrackBase", + polymorphicDiscriminator: TrackBase.type.polymorphicDiscriminator, + modelProperties: { + ...TrackBase.type.modelProperties, + fileName: { + serializedName: "fileName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + languageCode: { + serializedName: "languageCode", + readOnly: true, + type: { + name: "String" + } + }, + playerVisibility: { + serializedName: "playerVisibility", + type: { + name: "String" + } + }, + hlsSettings: { + serializedName: "hlsSettings", + type: { + name: "Composite", + className: "HlsSettings" + } + } } } }; @@ -4528,15 +4889,9 @@ export const CopyAudio: coreClient.CompositeMapper = { }; export const H265VideoLayer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.H265VideoLayer", type: { name: "Composite", className: "H265VideoLayer", - uberParent: "Layer", - polymorphicDiscriminator: { - serializedName: "@odata\\.type", - clientName: "odataType" - }, modelProperties: { ...Layer.type.modelProperties, bitrate: { @@ -4581,15 +4936,9 @@ export const H265VideoLayer: coreClient.CompositeMapper = { }; export const VideoLayer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.VideoLayer", type: { name: "Composite", className: "VideoLayer", - uberParent: "Layer", - polymorphicDiscriminator: { - serializedName: "@odata\\.type", - clientName: "odataType" - }, modelProperties: { ...Layer.type.modelProperties, bitrate: { @@ -4634,12 +4983,9 @@ export const VideoLayer: coreClient.CompositeMapper = { }; export const JpgLayer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.JpgLayer", type: { name: "Composite", className: "JpgLayer", - uberParent: "Layer", - polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, modelProperties: { ...Layer.type.modelProperties, quality: { @@ -4653,12 +4999,9 @@ export const JpgLayer: coreClient.CompositeMapper = { }; export const PngLayer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.PngLayer", type: { name: "Composite", className: "PngLayer", - uberParent: "Layer", - polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, modelProperties: { ...Layer.type.modelProperties } @@ -4878,69 +5221,110 @@ export const UtcClipTime: coreClient.CompositeMapper = { } }; -export const MediaService: coreClient.CompositeMapper = { +export const AccountFilter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MediaService", + className: "AccountFilter", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "MediaServiceIdentity" + className: "SystemData" } }, - systemData: { - serializedName: "systemData", + presentationTimeRange: { + serializedName: "properties.presentationTimeRange", type: { name: "Composite", - className: "SystemData" + className: "PresentationTimeRange" } }, - mediaServiceId: { - serializedName: "properties.mediaServiceId", - readOnly: true, + firstQuality: { + serializedName: "properties.firstQuality", type: { - name: "Uuid" + name: "Composite", + className: "FirstQuality" } }, - storageAccounts: { - serializedName: "properties.storageAccounts", + tracks: { + serializedName: "properties.tracks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "StorageAccount" + className: "FilterTrackSelection" } } } + } + } + } +}; + +export const Asset: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Asset", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } }, - storageAuthentication: { - serializedName: "properties.storageAuthentication", - nullable: true, + assetId: { + serializedName: "properties.assetId", + readOnly: true, + type: { + name: "Uuid" + } + }, + created: { + serializedName: "properties.created", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastModified: { + serializedName: "properties.lastModified", + readOnly: true, + type: { + name: "DateTime" + } + }, + alternateId: { + serializedName: "properties.alternateId", type: { name: "String" } }, - encryption: { - serializedName: "properties.encryption", + description: { + serializedName: "properties.description", type: { - name: "Composite", - className: "AccountEncryption" + name: "String" } }, - keyDelivery: { - serializedName: "properties.keyDelivery", + container: { + serializedName: "properties.container", type: { - name: "Composite", - className: "KeyDelivery" + name: "String" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - nullable: true, + storageAccountName: { + serializedName: "properties.storageAccountName", + type: { + name: "String" + } + }, + storageEncryptionFormat: { + serializedName: "properties.storageEncryptionFormat", + readOnly: true, type: { name: "String" } @@ -4949,12 +5333,12 @@ export const MediaService: coreClient.CompositeMapper = { } }; -export const LiveEvent: coreClient.CompositeMapper = { +export const AssetFilter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LiveEvent", + className: "AssetFilter", modelProperties: { - ...TrackedResource.type.modelProperties, + ...ProxyResource.type.modelProperties, systemData: { serializedName: "systemData", type: { @@ -4962,44 +5346,48 @@ export const LiveEvent: coreClient.CompositeMapper = { className: "SystemData" } }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - input: { - serializedName: "properties.input", - type: { - name: "Composite", - className: "LiveEventInput" - } - }, - preview: { - serializedName: "properties.preview", + presentationTimeRange: { + serializedName: "properties.presentationTimeRange", type: { name: "Composite", - className: "LiveEventPreview" + className: "PresentationTimeRange" } }, - encoding: { - serializedName: "properties.encoding", + firstQuality: { + serializedName: "properties.firstQuality", type: { name: "Composite", - className: "LiveEventEncoding" + className: "FirstQuality" } }, - transcriptions: { - serializedName: "properties.transcriptions", + tracks: { + serializedName: "properties.tracks", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LiveEventTranscription" + className: "FilterTrackSelection" } } } + } + } + } +}; + +export const AssetTrack: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AssetTrack", + modelProperties: { + ...ProxyResource.type.modelProperties, + track: { + serializedName: "properties.track", + type: { + name: "Composite", + className: "TrackBase" + } }, provisioningState: { serializedName: "properties.provisioningState", @@ -5007,43 +5395,79 @@ export const LiveEvent: coreClient.CompositeMapper = { type: { name: "String" } + } + } + } +}; + +export const ContentKeyPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContentKeyPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } }, - resourceState: { - serializedName: "properties.resourceState", + policyId: { + serializedName: "properties.policyId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - crossSiteAccessPolicies: { - serializedName: "properties.crossSiteAccessPolicies", + created: { + serializedName: "properties.created", + readOnly: true, type: { - name: "Composite", - className: "CrossSiteAccessPolicies" + name: "DateTime" } }, - useStaticHostname: { - serializedName: "properties.useStaticHostname", + lastModified: { + serializedName: "properties.lastModified", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - hostnamePrefix: { - serializedName: "properties.hostnamePrefix", + description: { + serializedName: "properties.description", type: { name: "String" } }, - streamOptions: { - serializedName: "properties.streamOptions", + options: { + serializedName: "properties.options", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ContentKeyPolicyOption" } } } + } + } + } +}; + +export const Transform: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Transform", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } }, created: { serializedName: "properties.created", @@ -5052,23 +5476,41 @@ export const LiveEvent: coreClient.CompositeMapper = { name: "DateTime" } }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, lastModified: { serializedName: "properties.lastModified", readOnly: true, type: { name: "DateTime" } + }, + outputs: { + serializedName: "properties.outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransformOutput" + } + } + } } } } }; -export const StreamingEndpoint: coreClient.CompositeMapper = { +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StreamingEndpoint", + className: "Job", modelProperties: { - ...TrackedResource.type.modelProperties, + ...ProxyResource.type.modelProperties, systemData: { serializedName: "systemData", type: { @@ -5076,111 +5518,77 @@ export const StreamingEndpoint: coreClient.CompositeMapper = { className: "SystemData" } }, - description: { - serializedName: "properties.description", + created: { + serializedName: "properties.created", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - scaleUnits: { - serializedName: "properties.scaleUnits", + state: { + serializedName: "properties.state", + readOnly: true, type: { - name: "Number" + name: "String" } }, - availabilitySetName: { - serializedName: "properties.availabilitySetName", + description: { + serializedName: "properties.description", type: { name: "String" } }, - accessControl: { - serializedName: "properties.accessControl", + input: { + serializedName: "properties.input", type: { name: "Composite", - className: "StreamingEndpointAccessControl" + className: "JobInput" } }, - maxCacheAge: { - serializedName: "properties.maxCacheAge", + lastModified: { + serializedName: "properties.lastModified", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - customHostNames: { - serializedName: "properties.customHostNames", + outputs: { + serializedName: "properties.outputs", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "JobOutput" } } } }, - hostName: { - serializedName: "properties.hostName", - readOnly: true, - 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: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, + priority: { + serializedName: "properties.priority", type: { name: "String" } }, - crossSiteAccessPolicies: { - serializedName: "properties.crossSiteAccessPolicies", - type: { - name: "Composite", - className: "CrossSiteAccessPolicies" - } - }, - freeTrialEndTime: { - serializedName: "properties.freeTrialEndTime", - readOnly: true, + correlationData: { + serializedName: "properties.correlationData", type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } }, - created: { - serializedName: "properties.created", + startTime: { + serializedName: "properties.startTime", readOnly: true, + nullable: true, type: { name: "DateTime" } }, - lastModified: { - serializedName: "properties.lastModified", + endTime: { + serializedName: "properties.endTime", readOnly: true, + nullable: true, type: { name: "DateTime" } @@ -5189,10 +5597,10 @@ export const StreamingEndpoint: coreClient.CompositeMapper = { } }; -export const AccountFilter: coreClient.CompositeMapper = { +export const StreamingPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AccountFilter", + className: "StreamingPolicy", modelProperties: { ...ProxyResource.type.modelProperties, systemData: { @@ -5202,40 +5610,55 @@ export const AccountFilter: coreClient.CompositeMapper = { className: "SystemData" } }, - presentationTimeRange: { - serializedName: "properties.presentationTimeRange", + created: { + serializedName: "properties.created", + readOnly: true, + type: { + name: "DateTime" + } + }, + defaultContentKeyPolicyName: { + serializedName: "properties.defaultContentKeyPolicyName", + type: { + name: "String" + } + }, + envelopeEncryption: { + serializedName: "properties.envelopeEncryption", type: { name: "Composite", - className: "PresentationTimeRange" + className: "EnvelopeEncryption" } }, - firstQuality: { - serializedName: "properties.firstQuality", + commonEncryptionCenc: { + serializedName: "properties.commonEncryptionCenc", type: { name: "Composite", - className: "FirstQuality" + className: "CommonEncryptionCenc" } }, - tracks: { - serializedName: "properties.tracks", + commonEncryptionCbcs: { + serializedName: "properties.commonEncryptionCbcs", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterTrackSelection" - } - } + name: "Composite", + className: "CommonEncryptionCbcs" + } + }, + noEncryption: { + serializedName: "properties.noEncryption", + type: { + name: "Composite", + className: "NoEncryption" } } } } }; -export const Asset: coreClient.CompositeMapper = { +export const StreamingLocator: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Asset", + className: "StreamingLocator", modelProperties: { ...ProxyResource.type.modelProperties, systemData: { @@ -5245,11 +5668,10 @@ export const Asset: coreClient.CompositeMapper = { className: "SystemData" } }, - assetId: { - serializedName: "properties.assetId", - readOnly: true, + assetName: { + serializedName: "properties.assetName", type: { - name: "Uuid" + name: "String" } }, created: { @@ -5259,83 +5681,61 @@ export const Asset: coreClient.CompositeMapper = { name: "DateTime" } }, - lastModified: { - serializedName: "properties.lastModified", - readOnly: true, + startTime: { + serializedName: "properties.startTime", type: { name: "DateTime" } }, - alternateId: { - serializedName: "properties.alternateId", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", + endTime: { + serializedName: "properties.endTime", type: { - name: "String" + name: "DateTime" } }, - container: { - serializedName: "properties.container", + streamingLocatorId: { + serializedName: "properties.streamingLocatorId", type: { - name: "String" + name: "Uuid" } }, - storageAccountName: { - serializedName: "properties.storageAccountName", + streamingPolicyName: { + serializedName: "properties.streamingPolicyName", type: { name: "String" } }, - storageEncryptionFormat: { - serializedName: "properties.storageEncryptionFormat", - readOnly: true, + defaultContentKeyPolicyName: { + serializedName: "properties.defaultContentKeyPolicyName", type: { name: "String" } - } - } - } -}; - -export const AssetFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssetFilter", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } }, - presentationTimeRange: { - serializedName: "properties.presentationTimeRange", + contentKeys: { + serializedName: "properties.contentKeys", type: { - name: "Composite", - className: "PresentationTimeRange" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StreamingLocatorContentKey" + } + } } }, - firstQuality: { - serializedName: "properties.firstQuality", + alternativeMediaId: { + serializedName: "properties.alternativeMediaId", type: { - name: "Composite", - className: "FirstQuality" + name: "String" } }, - tracks: { - serializedName: "properties.tracks", + filters: { + serializedName: "properties.filters", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "FilterTrackSelection" + name: "String" } } } @@ -5344,10 +5744,10 @@ export const AssetFilter: coreClient.CompositeMapper = { } }; -export const ContentKeyPolicy: coreClient.CompositeMapper = { +export const LiveOutput: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContentKeyPolicy", + className: "LiveOutput", modelProperties: { ...ProxyResource.type.modelProperties, systemData: { @@ -5357,60 +5757,41 @@ export const ContentKeyPolicy: coreClient.CompositeMapper = { className: "SystemData" } }, - policyId: { - serializedName: "properties.policyId", - readOnly: true, + description: { + serializedName: "properties.description", type: { - name: "Uuid" + name: "String" } }, - created: { - serializedName: "properties.created", - readOnly: true, + assetName: { + serializedName: "properties.assetName", type: { - name: "DateTime" + name: "String" } }, - lastModified: { - serializedName: "properties.lastModified", - readOnly: true, + archiveWindowLength: { + serializedName: "properties.archiveWindowLength", type: { - name: "DateTime" + name: "TimeSpan" } }, - description: { - serializedName: "properties.description", + manifestName: { + serializedName: "properties.manifestName", type: { name: "String" } }, - options: { - serializedName: "properties.options", + hls: { + serializedName: "properties.hls", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContentKeyPolicyOption" - } - } + name: "Composite", + className: "Hls" } - } - } - } -}; - -export const Transform: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Transform", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + }, + outputSnapTime: { + serializedName: "properties.outputSnapTime", type: { - name: "Composite", - className: "SystemData" + name: "Number" } }, created: { @@ -5420,12 +5801,6 @@ export const Transform: coreClient.CompositeMapper = { name: "DateTime" } }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, lastModified: { serializedName: "properties.lastModified", readOnly: true, @@ -5433,28 +5808,30 @@ export const Transform: coreClient.CompositeMapper = { name: "DateTime" } }, - outputs: { - serializedName: "properties.outputs", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TransformOutput" - } - } + name: "String" + } + }, + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, + type: { + name: "String" } } } } }; -export const Job: coreClient.CompositeMapper = { +export const MediaService: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Job", + className: "MediaService", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, systemData: { serializedName: "systemData", type: { @@ -5462,91 +5839,84 @@ export const Job: coreClient.CompositeMapper = { className: "SystemData" } }, - created: { - serializedName: "properties.created", - readOnly: true, - type: { - name: "DateTime" - } - }, - state: { - serializedName: "properties.state", - readOnly: true, - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - input: { - serializedName: "properties.input", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "JobInput" + className: "MediaServiceIdentity" } }, - lastModified: { - serializedName: "properties.lastModified", + mediaServiceId: { + serializedName: "properties.mediaServiceId", readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - outputs: { - serializedName: "properties.outputs", + storageAccounts: { + serializedName: "properties.storageAccounts", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobOutput" + className: "StorageAccount" } } } }, - priority: { - serializedName: "properties.priority", + storageAuthentication: { + serializedName: "properties.storageAuthentication", + nullable: true, type: { name: "String" } }, - correlationData: { - serializedName: "properties.correlationData", + encryption: { + serializedName: "properties.encryption", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Composite", + className: "AccountEncryption" } }, - startTime: { - serializedName: "properties.startTime", - readOnly: true, + keyDelivery: { + serializedName: "properties.keyDelivery", + type: { + name: "Composite", + className: "KeyDelivery" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", nullable: true, type: { - name: "DateTime" + name: "String" } }, - endTime: { - serializedName: "properties.endTime", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - nullable: true, type: { - name: "DateTime" + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "any" } } } } }; -export const StreamingPolicy: coreClient.CompositeMapper = { +export const LiveEvent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StreamingPolicy", + className: "LiveEvent", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, systemData: { serializedName: "systemData", type: { @@ -5554,70 +5924,89 @@ export const StreamingPolicy: coreClient.CompositeMapper = { className: "SystemData" } }, - created: { - serializedName: "properties.created", - readOnly: true, + description: { + serializedName: "properties.description", type: { - name: "DateTime" + name: "String" } }, - defaultContentKeyPolicyName: { - serializedName: "properties.defaultContentKeyPolicyName", + input: { + serializedName: "properties.input", type: { - name: "String" + name: "Composite", + className: "LiveEventInput" } }, - envelopeEncryption: { - serializedName: "properties.envelopeEncryption", + preview: { + serializedName: "properties.preview", type: { name: "Composite", - className: "EnvelopeEncryption" + className: "LiveEventPreview" } }, - commonEncryptionCenc: { - serializedName: "properties.commonEncryptionCenc", + encoding: { + serializedName: "properties.encoding", type: { name: "Composite", - className: "CommonEncryptionCenc" + className: "LiveEventEncoding" } }, - commonEncryptionCbcs: { - serializedName: "properties.commonEncryptionCbcs", + transcriptions: { + serializedName: "properties.transcriptions", type: { - name: "Composite", - className: "CommonEncryptionCbcs" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventTranscription" + } + } } }, - noEncryption: { - serializedName: "properties.noEncryption", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "NoEncryption" + name: "String" } - } - } - } -}; - -export const StreamingLocator: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StreamingLocator", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + }, + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, + type: { + name: "String" + } + }, + crossSiteAccessPolicies: { + serializedName: "properties.crossSiteAccessPolicies", type: { name: "Composite", - className: "SystemData" + className: "CrossSiteAccessPolicies" } }, - assetName: { - serializedName: "properties.assetName", + useStaticHostname: { + serializedName: "properties.useStaticHostname", + type: { + name: "Boolean" + } + }, + hostnamePrefix: { + serializedName: "properties.hostnamePrefix", type: { name: "String" } }, + streamOptions: { + serializedName: "properties.streamOptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, created: { serializedName: "properties.created", readOnly: true, @@ -5625,117 +6014,130 @@ export const StreamingLocator: coreClient.CompositeMapper = { name: "DateTime" } }, - startTime: { - serializedName: "properties.startTime", + lastModified: { + serializedName: "properties.lastModified", + readOnly: true, type: { name: "DateTime" } - }, - endTime: { - serializedName: "properties.endTime", + } + } + } +}; + +export const StreamingEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StreamingEndpoint", + modelProperties: { + ...TrackedResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "DateTime" + name: "Composite", + className: "SystemData" } }, - streamingLocatorId: { - serializedName: "properties.streamingLocatorId", + sku: { + serializedName: "sku", type: { - name: "Uuid" + name: "Composite", + className: "ArmStreamingEndpointCurrentSku" } }, - streamingPolicyName: { - serializedName: "properties.streamingPolicyName", + description: { + serializedName: "properties.description", type: { name: "String" } }, - defaultContentKeyPolicyName: { - serializedName: "properties.defaultContentKeyPolicyName", + scaleUnits: { + serializedName: "properties.scaleUnits", + type: { + name: "Number" + } + }, + availabilitySetName: { + serializedName: "properties.availabilitySetName", type: { name: "String" } }, - contentKeys: { - serializedName: "properties.contentKeys", + accessControl: { + serializedName: "properties.accessControl", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StreamingLocatorContentKey" - } - } + name: "Composite", + className: "StreamingEndpointAccessControl" } }, - alternativeMediaId: { - serializedName: "properties.alternativeMediaId", + maxCacheAge: { + serializedName: "properties.maxCacheAge", type: { - name: "String" + name: "Number" } }, - filters: { - serializedName: "properties.filters", + customHostNames: { + serializedName: "properties.customHostNames", type: { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } -}; - -export const LiveOutput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveOutput", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + name: "String" + } + } + } + }, + hostName: { + serializedName: "properties.hostName", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "String" } }, - description: { - serializedName: "properties.description", + cdnEnabled: { + serializedName: "properties.cdnEnabled", + type: { + name: "Boolean" + } + }, + cdnProvider: { + serializedName: "properties.cdnProvider", type: { name: "String" } }, - assetName: { - serializedName: "properties.assetName", + cdnProfile: { + serializedName: "properties.cdnProfile", type: { name: "String" } }, - archiveWindowLength: { - serializedName: "properties.archiveWindowLength", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "TimeSpan" + name: "String" } }, - manifestName: { - serializedName: "properties.manifestName", + resourceState: { + serializedName: "properties.resourceState", + readOnly: true, type: { name: "String" } }, - hls: { - serializedName: "properties.hls", + crossSiteAccessPolicies: { + serializedName: "properties.crossSiteAccessPolicies", type: { name: "Composite", - className: "Hls" + className: "CrossSiteAccessPolicies" } }, - outputSnapTime: { - serializedName: "properties.outputSnapTime", + freeTrialEndTime: { + serializedName: "properties.freeTrialEndTime", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, created: { @@ -5751,20 +6153,6 @@ export const LiveOutput: coreClient.CompositeMapper = { type: { name: "DateTime" } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - resourceState: { - serializedName: "properties.resourceState", - readOnly: true, - type: { - name: "String" - } } } } @@ -5928,12 +6316,6 @@ export const H264Video: coreClient.CompositeMapper = { polymorphicDiscriminator: Codec.type.polymorphicDiscriminator, modelProperties: { ...Video.type.modelProperties, - sceneChangeDetection: { - serializedName: "sceneChangeDetection", - type: { - name: "Boolean" - } - }, complexity: { serializedName: "complexity", type: { @@ -5951,18 +6333,27 @@ export const H264Video: coreClient.CompositeMapper = { } } } + }, + rateControlMode: { + serializedName: "rateControlMode", + type: { + name: "String" + } + }, + sceneChangeDetection: { + serializedName: "sceneChangeDetection", + type: { + name: "Boolean" + } } } } }; export const H265Layer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.H265Layer", type: { name: "Composite", className: "H265Layer", - uberParent: "Layer", - polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, modelProperties: { ...H265VideoLayer.type.modelProperties, profile: { @@ -5983,6 +6374,12 @@ export const H265Layer: coreClient.CompositeMapper = { name: "TimeSpan" } }, + crf: { + serializedName: "crf", + type: { + name: "Number" + } + }, referenceFrames: { serializedName: "referenceFrames", type: { @@ -5994,12 +6391,9 @@ export const H265Layer: coreClient.CompositeMapper = { }; export const H264Layer: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Media.H264Layer", type: { name: "Composite", className: "H264Layer", - uberParent: "Layer", - polymorphicDiscriminator: Layer.type.polymorphicDiscriminator, modelProperties: { ...VideoLayer.type.modelProperties, profile: { @@ -6020,6 +6414,12 @@ export const H264Layer: coreClient.CompositeMapper = { name: "TimeSpan" } }, + crf: { + serializedName: "crf", + type: { + name: "Number" + } + }, referenceFrames: { serializedName: "referenceFrames", type: { @@ -6250,7 +6650,224 @@ export const PngImage: coreClient.CompositeMapper = { } }; +export const MediaservicesCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MediaservicesCreateOrUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const MediaservicesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MediaservicesUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const MediaServiceOperationResultsGetHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MediaServiceOperationResultsGetHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TracksCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TracksCreateOrUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TracksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TracksDeleteHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TracksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TracksUpdateHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TracksUpdateTrackDataHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TracksUpdateTrackDataHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const OperationResultsGetHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationResultsGetHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { + TrackBase: TrackBase, ContentKeyPolicyConfiguration: ContentKeyPolicyConfiguration, ContentKeyPolicyRestriction: ContentKeyPolicyRestriction, Preset: Preset, @@ -6259,12 +6876,14 @@ export let discriminators = { ContentKeyPolicyPlayReadyContentKeyLocation: ContentKeyPolicyPlayReadyContentKeyLocation, ContentKeyPolicyRestrictionTokenKey: ContentKeyPolicyRestrictionTokenKey, Codec: Codec, - Layer: Layer, TrackDescriptor: TrackDescriptor, InputDefinition: InputDefinition, Overlay: Overlay, Format: Format, ClipTime: ClipTime, + "TrackBase.#Microsoft.Media.AudioTrack": AudioTrack, + "TrackBase.#Microsoft.Media.VideoTrack": VideoTrack, + "TrackBase.#Microsoft.Media.TextTrack": TextTrack, "ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyClearKeyConfiguration": ContentKeyPolicyClearKeyConfiguration, "ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyUnknownConfiguration": ContentKeyPolicyUnknownConfiguration, "ContentKeyPolicyConfiguration.#Microsoft.Media.ContentKeyPolicyWidevineConfiguration": ContentKeyPolicyWidevineConfiguration, @@ -6290,10 +6909,6 @@ export let discriminators = { "Codec.#Microsoft.Media.Video": Video, "Codec.#Microsoft.Media.CopyVideo": CopyVideo, "Codec.#Microsoft.Media.CopyAudio": CopyAudio, - "Layer.#Microsoft.Media.H265VideoLayer": H265VideoLayer, - "Layer.#Microsoft.Media.VideoLayer": VideoLayer, - "Layer.#Microsoft.Media.JpgLayer": JpgLayer, - "Layer.#Microsoft.Media.PngLayer": PngLayer, "TrackDescriptor.#Microsoft.Media.AudioTrackDescriptor": AudioTrackDescriptor, "TrackDescriptor.#Microsoft.Media.VideoTrackDescriptor": VideoTrackDescriptor, "InputDefinition.#Microsoft.Media.FromAllInputFile": FromAllInputFile, @@ -6312,8 +6927,6 @@ export let discriminators = { "Codec.#Microsoft.Media.H265Video": H265Video, "Codec.#Microsoft.Media.Image": Image, "Codec.#Microsoft.Media.H264Video": H264Video, - "Layer.#Microsoft.Media.H265Layer": H265Layer, - "Layer.#Microsoft.Media.H264Layer": H264Layer, "TrackDescriptor.#Microsoft.Media.SelectAudioTrackByAttribute": SelectAudioTrackByAttribute, "TrackDescriptor.#Microsoft.Media.SelectAudioTrackById": SelectAudioTrackById, "TrackDescriptor.#Microsoft.Media.SelectVideoTrackByAttribute": SelectVideoTrackByAttribute, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts index f91dfc906d06..4e65ba76b313 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts @@ -12,16 +12,17 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + AccountFilter as AccountFilterMapper, MediaService as MediaServiceMapper, MediaServiceUpdate as MediaServiceUpdateMapper, SyncStorageKeysInput as SyncStorageKeysInputMapper, ListEdgePoliciesInput as ListEdgePoliciesInputMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, CheckNameAvailabilityInput as CheckNameAvailabilityInputMapper, - AccountFilter as AccountFilterMapper, Asset as AssetMapper, ListContainerSasInput as ListContainerSasInputMapper, AssetFilter as AssetFilterMapper, + AssetTrack as AssetTrackMapper, ContentKeyPolicy as ContentKeyPolicyMapper, Transform as TransformMapper, Job as JobMapper, @@ -58,18 +59,6 @@ export const $host: OperationURLParameter = { skipEncoding: true }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-06-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -103,6 +92,29 @@ export const accountName: OperationURLParameter = { } }; +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-11-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const filterName: OperationURLParameter = { + parameterPath: "filterName", + mapper: { + serializedName: "filterName", + required: true, + type: { + name: "String" + } + } +}; + export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], mapper: { @@ -117,34 +129,39 @@ export const contentType: OperationParameter = { export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: MediaServiceMapper + mapper: AccountFilterMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true }; export const parameters1: OperationParameter = { parameterPath: "parameters", - mapper: MediaServiceUpdateMapper + mapper: MediaServiceMapper }; export const parameters2: OperationParameter = { parameterPath: "parameters", - mapper: SyncStorageKeysInputMapper + mapper: MediaServiceUpdateMapper }; export const parameters3: OperationParameter = { parameterPath: "parameters", - mapper: ListEdgePoliciesInputMapper + mapper: SyncStorageKeysInputMapper }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true +export const parameters4: OperationParameter = { + parameterPath: "parameters", + mapper: ListEdgePoliciesInputMapper }; export const name: OperationURLParameter = { @@ -158,12 +175,12 @@ export const name: OperationURLParameter = { } }; -export const parameters4: OperationParameter = { +export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: PrivateEndpointConnectionMapper }; -export const parameters5: OperationParameter = { +export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: CheckNameAvailabilityInputMapper }; @@ -179,10 +196,10 @@ export const locationName: OperationURLParameter = { } }; -export const filterName: OperationURLParameter = { - parameterPath: "filterName", +export const operationId: OperationURLParameter = { + parameterPath: "operationId", mapper: { - serializedName: "filterName", + serializedName: "operationId", required: true, type: { name: "String" @@ -190,11 +207,6 @@ export const filterName: OperationURLParameter = { } }; -export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: AccountFilterMapper -}; - export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { @@ -251,6 +263,22 @@ export const parameters9: OperationParameter = { mapper: AssetFilterMapper }; +export const trackName: OperationURLParameter = { + parameterPath: "trackName", + mapper: { + serializedName: "trackName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: AssetTrackMapper +}; + export const contentKeyPolicyName: OperationURLParameter = { parameterPath: "contentKeyPolicyName", mapper: { @@ -262,7 +290,7 @@ export const contentKeyPolicyName: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", mapper: ContentKeyPolicyMapper }; @@ -278,7 +306,7 @@ export const transformName: OperationURLParameter = { } }; -export const parameters11: OperationParameter = { +export const parameters12: OperationParameter = { parameterPath: "parameters", mapper: TransformMapper }; @@ -294,7 +322,7 @@ export const jobName: OperationURLParameter = { } }; -export const parameters12: OperationParameter = { +export const parameters13: OperationParameter = { parameterPath: "parameters", mapper: JobMapper }; @@ -310,7 +338,7 @@ export const streamingPolicyName: OperationURLParameter = { } }; -export const parameters13: OperationParameter = { +export const parameters14: OperationParameter = { parameterPath: "parameters", mapper: StreamingPolicyMapper }; @@ -326,7 +354,7 @@ export const streamingLocatorName: OperationURLParameter = { } }; -export const parameters14: OperationParameter = { +export const parameters15: OperationParameter = { parameterPath: "parameters", mapper: StreamingLocatorMapper }; @@ -347,7 +375,7 @@ export const liveEventName: OperationURLParameter = { } }; -export const parameters15: OperationParameter = { +export const parameters16: OperationParameter = { parameterPath: "parameters", mapper: LiveEventMapper }; @@ -362,7 +390,7 @@ export const autoStart: OperationQueryParameter = { } }; -export const parameters16: OperationParameter = { +export const parameters17: OperationParameter = { parameterPath: "parameters", mapper: LiveEventActionInputMapper }; @@ -383,7 +411,7 @@ export const liveOutputName: OperationURLParameter = { } }; -export const parameters17: OperationParameter = { +export const parameters18: OperationParameter = { parameterPath: "parameters", mapper: LiveOutputMapper }; @@ -404,12 +432,12 @@ export const streamingEndpointName: OperationURLParameter = { } }; -export const parameters18: OperationParameter = { +export const parameters19: OperationParameter = { parameterPath: "parameters", mapper: StreamingEndpointMapper }; -export const parameters19: OperationParameter = { +export const parameters20: OperationParameter = { parameterPath: "parameters", mapper: StreamingEntityScaleUnitMapper }; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts b/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts index 371a85ebaccd..f7e6b0066517 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/accountFilters.ts @@ -278,7 +278,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -325,7 +325,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, + requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts b/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts index cbf35bfff927..976c90abb56e 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/contentKeyPolicies.ts @@ -316,7 +316,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -363,7 +363,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, + requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/index.ts b/sdk/mediaservices/arm-mediaservices/src/operations/index.ts index 2e1437cd59ee..88496fe72530 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/index.ts @@ -6,14 +6,19 @@ * 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 "./privateLinkResources"; export * from "./privateEndpointConnections"; export * from "./locations"; -export * from "./accountFilters"; +export * from "./mediaServiceOperationStatuses"; +export * from "./mediaServiceOperationResults"; export * from "./assets"; export * from "./assetFilters"; +export * from "./tracks"; +export * from "./operationStatuses"; +export * from "./operationResults"; export * from "./contentKeyPolicies"; export * from "./transforms"; export * from "./jobs"; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts index 47c73b68e63c..a867df61ad20 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/jobs.ts @@ -351,7 +351,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -400,7 +400,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters12, + requestBody: Parameters.parameters13, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts index 69790b9783b6..3ef0ae2d9fc0 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts @@ -856,7 +856,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters15, + requestBody: Parameters.parameters16, queryParameters: [Parameters.apiVersion, Parameters.autoStart], urlParameters: [ Parameters.$host, @@ -890,7 +890,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters15, + requestBody: Parameters.parameters16, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -988,7 +988,7 @@ const stopOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters16, + requestBody: Parameters.parameters17, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts index 1aab9207757f..f1acaeb40875 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts @@ -463,7 +463,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters17, + requestBody: Parameters.parameters18, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts b/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts index 00752a99e901..f167708200d2 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/locations.ts @@ -31,7 +31,7 @@ export class LocationsImpl implements Locations { /** * Checks whether the Media Service resource name is available. - * @param locationName The name of the location + * @param locationName Location name. * @param parameters The request parameters * @param options The options parameters. */ @@ -61,7 +61,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters5, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationResults.ts b/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationResults.ts new file mode 100644 index 000000000000..1110c539663f --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationResults.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { MediaServiceOperationResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServices } from "../azureMediaServices"; +import { + MediaServiceOperationResultsGetOptionalParams, + MediaServiceOperationResultsGetResponse +} from "../models"; + +/** Class containing MediaServiceOperationResults operations. */ +export class MediaServiceOperationResultsImpl + implements MediaServiceOperationResults { + private readonly client: AzureMediaServices; + + /** + * Initialize a new instance of the class MediaServiceOperationResults class. + * @param client Reference to the service client + */ + constructor(client: AzureMediaServices) { + this.client = client; + } + + /** + * Get media service operation result. + * @param locationName Location name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + locationName: string, + operationId: string, + options?: MediaServiceOperationResultsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/mediaServiceOperationResults/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MediaService + }, + 202: { + headersMapper: Mappers.MediaServiceOperationResultsGetHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationStatuses.ts b/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationStatuses.ts new file mode 100644 index 000000000000..fc39dc16f19c --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operations/mediaServiceOperationStatuses.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { MediaServiceOperationStatuses } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServices } from "../azureMediaServices"; +import { + MediaServiceOperationStatusesGetOptionalParams, + MediaServiceOperationStatusesGetResponse +} from "../models"; + +/** Class containing MediaServiceOperationStatuses operations. */ +export class MediaServiceOperationStatusesImpl + implements MediaServiceOperationStatuses { + private readonly client: AzureMediaServices; + + /** + * Initialize a new instance of the class MediaServiceOperationStatuses class. + * @param client Reference to the service client + */ + constructor(client: AzureMediaServices) { + this.client = client; + } + + /** + * Get media service operation status. + * @param locationName Location name. + * @param operationId Operation ID. + * @param options The options parameters. + */ + get( + locationName: string, + operationId: string, + options?: MediaServiceOperationStatusesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, operationId, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/mediaServiceOperationStatuses/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MediaServiceOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.locationName, + Parameters.operationId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts index 527bca6503d7..eda6c193d524 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/mediaservices.ts @@ -12,6 +12,8 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureMediaServices } from "../azureMediaServices"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; import { MediaService, MediaservicesListNextOptionalParams, @@ -181,16 +183,87 @@ export class MediaservicesImpl implements Mediaservices { * @param parameters The request parameters * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, accountName: string, parameters: MediaService, options?: MediaservicesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike< + PollOperationState, + MediaservicesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, parameters, options }, createOrUpdateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Creates or updates 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 options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + parameters: MediaService, + options?: MediaservicesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + parameters, + options + ); + return poller.pollUntilDone(); } /** @@ -217,16 +290,87 @@ export class MediaservicesImpl implements Mediaservices { * @param parameters The request parameters * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, accountName: string, parameters: MediaServiceUpdate, options?: MediaservicesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike< + PollOperationState, + MediaservicesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, accountName, parameters, options }, updateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Updates an existing 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 options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + parameters: MediaServiceUpdate, + options?: MediaservicesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + parameters, + options + ); + return poller.pollUntilDone(); } /** @@ -249,7 +393,7 @@ export class MediaservicesImpl implements Mediaservices { } /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the 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 @@ -364,16 +508,26 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.MediaService + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesCreateOrUpdateHeaders }, 201: { - bodyMapper: Mappers.MediaService + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesCreateOrUpdateHeaders }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters, + requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -412,13 +566,26 @@ const updateOperationSpec: coreClient.OperationSpec = { httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.MediaService + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesUpdateHeaders + }, + 201: { + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesUpdateHeaders + }, + 202: { + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesUpdateHeaders + }, + 204: { + bodyMapper: Mappers.MediaService, + headersMapper: Mappers.MediaservicesUpdateHeaders }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -440,7 +607,7 @@ const syncStorageKeysOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters2, + requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -464,7 +631,7 @@ const listEdgePoliciesOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters3, + requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/operationResults.ts b/sdk/mediaservices/arm-mediaservices/src/operations/operationResults.ts new file mode 100644 index 000000000000..906bad92d420 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operations/operationResults.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { OperationResults } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServices } from "../azureMediaServices"; +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse +} from "../models"; + +/** Class containing OperationResults operations. */ +export class OperationResultsImpl implements OperationResults { + private readonly client: AzureMediaServices; + + /** + * Initialize a new instance of the class OperationResults class. + * @param client Reference to the service client + */ + constructor(client: AzureMediaServices) { + this.client = client; + } + + /** + * Get asset track operation result. + * @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 trackName The Asset Track name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + operationId: string, + options?: OperationResultsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + options + }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/operationResults/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AssetTrack + }, + 202: { + headersMapper: Mappers.OperationResultsGetHeaders + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/operationStatuses.ts b/sdk/mediaservices/arm-mediaservices/src/operations/operationStatuses.ts new file mode 100644 index 000000000000..3f72de69bfb0 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operations/operationStatuses.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { OperationStatuses } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServices } from "../azureMediaServices"; +import { + OperationStatusesGetOptionalParams, + OperationStatusesGetResponse +} from "../models"; + +/** Class containing OperationStatuses operations. */ +export class OperationStatusesImpl implements OperationStatuses { + private readonly client: AzureMediaServices; + + /** + * Initialize a new instance of the class OperationStatuses class. + * @param client Reference to the service client + */ + constructor(client: AzureMediaServices) { + this.client = client; + } + + /** + * Get asset track operation status. + * @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 trackName The Asset Track name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + operationId: string, + options?: OperationStatusesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + assetName, + trackName, + operationId, + options + }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/operationStatuses/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AssetTrackOperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.operationId, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts b/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts index 41d258a56d16..aa557e7bdecb 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/privateEndpointConnections.ts @@ -36,7 +36,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Get all private endpoint connections. + * List all private endpoint connections. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param options The options parameters. @@ -53,7 +53,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name @@ -72,7 +72,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name @@ -93,7 +93,7 @@ export class PrivateEndpointConnectionsImpl } /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name @@ -171,7 +171,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters4, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts b/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts index 14a79a73e95d..182ad828259c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/privateLinkResources.ts @@ -31,7 +31,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { } /** - * Get list of group IDs. + * List supported group IDs. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param options The options parameters. @@ -48,7 +48,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { } /** - * Get group ID. + * Get details of a group ID. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts index 2f85effd064f..c190248cb99d 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts @@ -26,6 +26,8 @@ import { StreamingEndpointsUpdateOptionalParams, StreamingEndpointsUpdateResponse, StreamingEndpointsDeleteOptionalParams, + StreamingEndpointsSkusOptionalParams, + StreamingEndpointsSkusResponse, StreamingEndpointsStartOptionalParams, StreamingEndpointsStopOptionalParams, StreamingEntityScaleUnit, @@ -428,6 +430,25 @@ export class StreamingEndpointsImpl implements StreamingEndpoints { return poller.pollUntilDone(); } + /** + * List streaming endpoint supported skus. + * @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 streaming endpoint, maximum length is 24. + * @param options The options parameters. + */ + skus( + resourceGroupName: string, + accountName: string, + streamingEndpointName: string, + options?: StreamingEndpointsSkusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, streamingEndpointName, options }, + skusOperationSpec + ); + } + /** * Starts an existing streaming endpoint. * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -782,7 +803,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters18, + requestBody: Parameters.parameters19, queryParameters: [Parameters.apiVersion, Parameters.autoStart], urlParameters: [ Parameters.$host, @@ -816,7 +837,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters18, + requestBody: Parameters.parameters19, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -853,6 +874,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const skusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/skus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StreamingEndpointSkuInfoListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.streamingEndpointName + ], + headerParameters: [Parameters.accept], + serializer +}; const startOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/start", @@ -914,7 +958,7 @@ const scaleOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters19, + requestBody: Parameters.parameters20, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts index 85baee87cc54..6e8d47a1f1fe 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingLocators.ts @@ -305,7 +305,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters14, + requestBody: Parameters.parameters15, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts index 81b7a4c1bdf6..2ed5c44dcd34 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingPolicies.ts @@ -263,7 +263,7 @@ const createOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters13, + requestBody: Parameters.parameters14, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/tracks.ts b/sdk/mediaservices/arm-mediaservices/src/operations/tracks.ts new file mode 100644 index 000000000000..6c0bf9b6d1ed --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operations/tracks.ts @@ -0,0 +1,753 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Tracks } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AzureMediaServices } from "../azureMediaServices"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + AssetTrack, + TracksListOptionalParams, + TracksListResponse, + TracksGetOptionalParams, + TracksGetResponse, + TracksCreateOrUpdateOptionalParams, + TracksCreateOrUpdateResponse, + TracksDeleteOptionalParams, + TracksDeleteResponse, + TracksUpdateOptionalParams, + TracksUpdateResponse, + TracksUpdateTrackDataOptionalParams, + TracksUpdateTrackDataResponse +} from "../models"; + +/// +/** Class containing Tracks operations. */ +export class TracksImpl implements Tracks { + private readonly client: AzureMediaServices; + + /** + * Initialize a new instance of the class Tracks class. + * @param client Reference to the service client + */ + constructor(client: AzureMediaServices) { + this.client = client; + } + + /** + * Lists the Tracks in the 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 options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + assetName: string, + options?: TracksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + accountName, + assetName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + accountName, + assetName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + assetName: string, + options?: TracksListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + accountName, + assetName, + options + ); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + assetName: string, + options?: TracksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + assetName, + options + )) { + yield* page; + } + } + + /** + * Lists the Tracks in the 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 options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + assetName: string, + options?: TracksListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, assetName, options }, + listOperationSpec + ); + } + + /** + * Get the details of a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, assetName, trackName, options }, + getOperationSpec + ); + } + + /** + * Create or update a Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TracksCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + assetName, + trackName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Create or update a Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + accountName, + assetName, + trackName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksDeleteOptionalParams + ): Promise< + PollerLike, TracksDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, assetName, trackName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Deletes a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + accountName, + assetName, + trackName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates an existing Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksUpdateOptionalParams + ): Promise< + PollerLike, TracksUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + assetName, + trackName, + parameters, + options + }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Updates an existing Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + accountName, + assetName, + trackName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the + * asset container. For example, you have modified the WebVTT captions file in the Azure blob storage + * container for the asset, viewers will not see the new version of the captions unless this API is + * called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if + * applicable. + * @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 trackName The Asset Track name. + * @param options The options parameters. + */ + async beginUpdateTrackData( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksUpdateTrackDataOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TracksUpdateTrackDataResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, assetName, trackName, options }, + updateTrackDataOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Update the track data. Call this API after any changes are made to the track data stored in the + * asset container. For example, you have modified the WebVTT captions file in the Azure blob storage + * container for the asset, viewers will not see the new version of the captions unless this API is + * called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if + * applicable. + * @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 trackName The Asset Track name. + * @param options The options parameters. + */ + async beginUpdateTrackDataAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksUpdateTrackDataOptionalParams + ): Promise { + const poller = await this.beginUpdateTrackData( + resourceGroupName, + accountName, + assetName, + trackName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AssetTrackCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AssetTrack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksCreateOrUpdateHeaders + }, + 202: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksCreateOrUpdateHeaders + }, + 204: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.TracksDeleteHeaders + }, + 201: { + headersMapper: Mappers.TracksDeleteHeaders + }, + 202: { + headersMapper: Mappers.TracksDeleteHeaders + }, + 204: { + headersMapper: Mappers.TracksDeleteHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksUpdateHeaders + }, + 201: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksUpdateHeaders + }, + 202: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksUpdateHeaders + }, + 204: { + bodyMapper: Mappers.AssetTrack, + headersMapper: Mappers.TracksUpdateHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTrackDataOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}/tracks/{trackName}/updateTrackData", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.TracksUpdateTrackDataHeaders + }, + 201: { + headersMapper: Mappers.TracksUpdateTrackDataHeaders + }, + 202: { + headersMapper: Mappers.TracksUpdateTrackDataHeaders + }, + 204: { + headersMapper: Mappers.TracksUpdateTrackDataHeaders + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.assetName, + Parameters.trackName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts b/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts index f556129c34b9..fc95387390c9 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/transforms.ts @@ -282,7 +282,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -329,7 +329,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/index.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/index.ts index 2e1437cd59ee..88496fe72530 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/index.ts @@ -6,14 +6,19 @@ * 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 "./privateLinkResources"; export * from "./privateEndpointConnections"; export * from "./locations"; -export * from "./accountFilters"; +export * from "./mediaServiceOperationStatuses"; +export * from "./mediaServiceOperationResults"; export * from "./assets"; export * from "./assetFilters"; +export * from "./tracks"; +export * from "./operationStatuses"; +export * from "./operationResults"; export * from "./contentKeyPolicies"; export * from "./transforms"; export * from "./jobs"; diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/locations.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/locations.ts index a0136428a5fb..a1cbf30d755a 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/locations.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/locations.ts @@ -16,7 +16,7 @@ import { export interface Locations { /** * Checks whether the Media Service resource name is available. - * @param locationName The name of the location + * @param locationName Location name. * @param parameters The request parameters * @param options The options parameters. */ diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationResults.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationResults.ts new file mode 100644 index 000000000000..a6907e02cff2 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationResults.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + MediaServiceOperationResultsGetOptionalParams, + MediaServiceOperationResultsGetResponse +} from "../models"; + +/** Interface representing a MediaServiceOperationResults. */ +export interface MediaServiceOperationResults { + /** + * Get media service operation result. + * @param locationName Location name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + locationName: string, + operationId: string, + options?: MediaServiceOperationResultsGetOptionalParams + ): Promise; +} diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationStatuses.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationStatuses.ts new file mode 100644 index 000000000000..a1b129d8b17e --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaServiceOperationStatuses.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + MediaServiceOperationStatusesGetOptionalParams, + MediaServiceOperationStatusesGetResponse +} from "../models"; + +/** Interface representing a MediaServiceOperationStatuses. */ +export interface MediaServiceOperationStatuses { + /** + * Get media service operation status. + * @param locationName Location name. + * @param operationId Operation ID. + * @param options The options parameters. + */ + get( + locationName: string, + operationId: string, + options?: MediaServiceOperationStatusesGetOptionalParams + ): Promise; +} diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaservices.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaservices.ts index 2e9a6601680b..d619e85c1d59 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaservices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/mediaservices.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; import { MediaService, MediaservicesListOptionalParams, @@ -63,7 +64,25 @@ export interface Mediaservices { * @param parameters The request parameters * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + parameters: MediaService, + options?: MediaservicesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MediaservicesCreateOrUpdateResponse + > + >; + /** + * Creates or updates 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 options parameters. + */ + beginCreateOrUpdateAndWait( resourceGroupName: string, accountName: string, parameters: MediaService, @@ -87,7 +106,25 @@ export interface Mediaservices { * @param parameters The request parameters * @param options The options parameters. */ - update( + beginUpdate( + resourceGroupName: string, + accountName: string, + parameters: MediaServiceUpdate, + options?: MediaservicesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MediaservicesUpdateResponse + > + >; + /** + * Updates an existing 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 options parameters. + */ + beginUpdateAndWait( resourceGroupName: string, accountName: string, parameters: MediaServiceUpdate, @@ -107,7 +144,7 @@ export interface Mediaservices { options?: MediaservicesSyncStorageKeysOptionalParams ): Promise; /** - * List the media edge policies associated with the Media Services account. + * List all the media edge policies associated with the 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 diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationResults.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationResults.ts new file mode 100644 index 000000000000..ed04240a327a --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationResults.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationResultsGetOptionalParams, + OperationResultsGetResponse +} from "../models"; + +/** Interface representing a OperationResults. */ +export interface OperationResults { + /** + * Get asset track operation result. + * @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 trackName The Asset Track name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + operationId: string, + options?: OperationResultsGetOptionalParams + ): Promise; +} diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationStatuses.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationStatuses.ts new file mode 100644 index 000000000000..47eea9ad59c2 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/operationStatuses.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationStatusesGetOptionalParams, + OperationStatusesGetResponse +} from "../models"; + +/** Interface representing a OperationStatuses. */ +export interface OperationStatuses { + /** + * Get asset track operation status. + * @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 trackName The Asset Track name. + * @param operationId Operation Id. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + operationId: string, + options?: OperationStatusesGetOptionalParams + ): Promise; +} diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateEndpointConnections.ts index a3c10ed2afbf..677777ba1c9c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateEndpointConnections.ts @@ -20,7 +20,7 @@ import { /** Interface representing a PrivateEndpointConnections. */ export interface PrivateEndpointConnections { /** - * Get all private endpoint connections. + * List all private endpoint connections. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param options The options parameters. @@ -31,7 +31,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsListOptionalParams ): Promise; /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name @@ -44,7 +44,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsGetOptionalParams ): Promise; /** - * Update private endpoint connection. + * Update an existing private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name @@ -59,7 +59,7 @@ export interface PrivateEndpointConnections { options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise; /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateLinkResources.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateLinkResources.ts index 15a6530d6f4d..756adfc7a560 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/privateLinkResources.ts @@ -16,7 +16,7 @@ import { /** Interface representing a PrivateLinkResources. */ export interface PrivateLinkResources { /** - * Get list of group IDs. + * List supported group IDs. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param options The options parameters. @@ -27,7 +27,7 @@ export interface PrivateLinkResources { options?: PrivateLinkResourcesListOptionalParams ): Promise; /** - * Get group ID. + * Get details of a group ID. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts index cf0b466f640d..e0a55177ba9f 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/streamingEndpoints.ts @@ -18,6 +18,8 @@ import { StreamingEndpointsUpdateOptionalParams, StreamingEndpointsUpdateResponse, StreamingEndpointsDeleteOptionalParams, + StreamingEndpointsSkusOptionalParams, + StreamingEndpointsSkusResponse, StreamingEndpointsStartOptionalParams, StreamingEndpointsStopOptionalParams, StreamingEntityScaleUnit, @@ -147,6 +149,19 @@ export interface StreamingEndpoints { streamingEndpointName: string, options?: StreamingEndpointsDeleteOptionalParams ): Promise; + /** + * List streaming endpoint supported skus. + * @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 streaming endpoint, maximum length is 24. + * @param options The options parameters. + */ + skus( + resourceGroupName: string, + accountName: string, + streamingEndpointName: string, + options?: StreamingEndpointsSkusOptionalParams + ): Promise; /** * Starts an existing streaming endpoint. * @param resourceGroupName The name of the resource group within the Azure subscription. diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/tracks.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/tracks.ts new file mode 100644 index 000000000000..afc5fe40bd37 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/tracks.ts @@ -0,0 +1,207 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + AssetTrack, + TracksListOptionalParams, + TracksGetOptionalParams, + TracksGetResponse, + TracksCreateOrUpdateOptionalParams, + TracksCreateOrUpdateResponse, + TracksDeleteOptionalParams, + TracksDeleteResponse, + TracksUpdateOptionalParams, + TracksUpdateResponse, + TracksUpdateTrackDataOptionalParams, + TracksUpdateTrackDataResponse +} from "../models"; + +/// +/** Interface representing a Tracks. */ +export interface Tracks { + /** + * Lists the Tracks in the 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 options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + assetName: string, + options?: TracksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the details of a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksGetOptionalParams + ): Promise; + /** + * Create or update a Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TracksCreateOrUpdateResponse + > + >; + /** + * Create or update a Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksDeleteOptionalParams + ): Promise< + PollerLike, TracksDeleteResponse> + >; + /** + * Deletes a Track in the 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 trackName The Asset Track name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksDeleteOptionalParams + ): Promise; + /** + * Updates an existing Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksUpdateOptionalParams + ): Promise< + PollerLike, TracksUpdateResponse> + >; + /** + * Updates an existing Track in the 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 trackName The Asset Track name. + * @param parameters The request parameters + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + parameters: AssetTrack, + options?: TracksUpdateOptionalParams + ): Promise; + /** + * Update the track data. Call this API after any changes are made to the track data stored in the + * asset container. For example, you have modified the WebVTT captions file in the Azure blob storage + * container for the asset, viewers will not see the new version of the captions unless this API is + * called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if + * applicable. + * @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 trackName The Asset Track name. + * @param options The options parameters. + */ + beginUpdateTrackData( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksUpdateTrackDataOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TracksUpdateTrackDataResponse + > + >; + /** + * Update the track data. Call this API after any changes are made to the track data stored in the + * asset container. For example, you have modified the WebVTT captions file in the Azure blob storage + * container for the asset, viewers will not see the new version of the captions unless this API is + * called. Note, the changes may not be reflected immediately. CDN cache may also need to be purged if + * applicable. + * @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 trackName The Asset Track name. + * @param options The options parameters. + */ + beginUpdateTrackDataAndWait( + resourceGroupName: string, + accountName: string, + assetName: string, + trackName: string, + options?: TracksUpdateTrackDataOptionalParams + ): Promise; +} diff --git a/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/mediaservices/arm-mediaservices/tsconfig.json b/sdk/mediaservices/arm-mediaservices/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/mediaservices/arm-mediaservices/tsconfig.json +++ b/sdk/mediaservices/arm-mediaservices/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file