diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7b9af74c3d6a..0344546defcc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -13047,16 +13047,16 @@ packages: dev: false file:projects/arm-mediaservices.tgz: - resolution: {integrity: sha512-3vPFRFsz90cMM1lYGfnNxMwfNw4UXzIijCoejkgG1yEhV1iYTRNWUwsz3de7BbfoAOGmt0a8K2oEYo4ZCTBp/g==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-e7tH2i0JEu29LhgsAbx9oqfLu+4xms2No7ZkjDTrNKJtwd4RGNhEOIFGQj352L/JugxEBmbiIbIMtD5Lqz86aQ==, tarball: file:projects/arm-mediaservices.tgz} name: '@rush-temp/arm-mediaservices' version: 0.0.0 dependencies: '@azure/arm-storage': 17.2.1 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.3_@types+node@14.18.36 - '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 - '@rollup/plugin-json': 6.0.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.36 @@ -17893,7 +17893,7 @@ packages: dev: false file:projects/monitor-ingestion.tgz: - resolution: {integrity: sha512-CtEBzCs8gADc56AozIehMF2iu7e7R/8YroShdvL2gjK6Hol5Tz+LRfNo4m9XoM17Mwsm1VtZe6Di0vA+WdiJ3g==, tarball: file:projects/monitor-ingestion.tgz} + resolution: {integrity: sha512-zodipV0pcRnzrfWjHYqvU42+E4V7E6TqdSYdrmqk/W9isTlZ3lW7OQXvblPPmjo2gTxDBbq+MUcDJ1Bu4FPPYA==, tarball: file:projects/monitor-ingestion.tgz} name: '@rush-temp/monitor-ingestion' version: 0.0.0 dependencies: diff --git a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md index c9c842a37c3a..031d0e1d2249 100644 --- a/sdk/mediaservices/arm-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/arm-mediaservices/CHANGELOG.md @@ -1,15 +1,58 @@ # Release History + +## 13.2.0 (2023-02-15) + +**Features** -## 13.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation LiveEvents.beginListGetStatusAndWait + - Added operation LiveEvents.beginListGetStreamEventsAndWait + - Added operation LiveEvents.beginListGetTrackIngestHeartbeatsAndWait + - Added Interface LiveEventGetStatusResult + - Added Interface LiveEventGetStreamEventsResult + - Added Interface LiveEventGetTrackIngestHeartbeatsResult + - Added Interface LiveEventIngestInterruption + - Added Interface LiveEventIngestion + - Added Interface LiveEventsListGetStatusHeaders + - Added Interface LiveEventsListGetStatusOptionalParams + - Added Interface LiveEventsListGetStreamEventsHeaders + - Added Interface LiveEventsListGetStreamEventsOptionalParams + - Added Interface LiveEventsListGetTrackIngestHeartbeatsHeaders + - Added Interface LiveEventsListGetTrackIngestHeartbeatsOptionalParams + - Added Interface LiveEventStatus + - Added Interface LiveEventStreamEvent + - Added Interface LiveEventStreamEventData + - Added Interface LiveEventTimedMetadataEndpoint + - Added Interface LiveEventTrackEvent + - Added Interface LiveEventTrackEventData + - Added Interface LiveEventTrackStatus + - Added Type Alias LiveEventHealthStatus + - Added Type Alias LiveEventsListGetStatusResponse + - Added Type Alias LiveEventsListGetStreamEventsResponse + - Added Type Alias LiveEventsListGetTrackIngestHeartbeatsResponse + - Added Type Alias LiveEventState + - Added Type Alias LiveEventStreamEventLevel + - Added Type Alias LiveEventStreamEventMaxTimeMediaType + - Added Type Alias LiveEventStreamEventMediaType + - Added Type Alias LiveEventStreamEventMinTimeMediaType + - Added Type Alias LiveEventStreamEventType + - Added Type Alias LiveEventTrackEventType + - Added Type Alias LiveEventTrackType + - Added Type Alias MinimumTlsVersion + - Interface LiveEventInput has a new optional parameter timedMetadataEndpoints + - Interface MediaService has a new optional parameter minimumTlsVersion + - Interface MediaServiceUpdate has a new optional parameter minimumTlsVersion + - Added Enum KnownLiveEventHealthStatus + - Added Enum KnownLiveEventState + - Added Enum KnownLiveEventStreamEventLevel + - Added Enum KnownLiveEventStreamEventMaxTimeMediaType + - Added Enum KnownLiveEventStreamEventMediaType + - Added Enum KnownLiveEventStreamEventMinTimeMediaType + - Added Enum KnownLiveEventStreamEventType + - Added Enum KnownLiveEventTrackEventType + - Added Enum KnownLiveEventTrackType + - Added Enum KnownMinimumTlsVersion + + ## 13.1.0 (2023-01-16) **Features** diff --git a/sdk/mediaservices/arm-mediaservices/_meta.json b/sdk/mediaservices/arm-mediaservices/_meta.json index caa616755932..1677a8db6199 100644 --- a/sdk/mediaservices/arm-mediaservices/_meta.json +++ b/sdk/mediaservices/arm-mediaservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "4359ee079cc0f0d7c596cafeb8b363466d2d95f6", + "commit": "468999c7da0748c858be41ca2750d24e8d0ad053", "readme": "specification/mediaservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\mediaservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/mediaservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.7" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/mediaservices/arm-mediaservices/package.json b/sdk/mediaservices/arm-mediaservices/package.json index 9665825504e7..27378b3b2d94 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": "13.1.1", + "version": "13.2.0", "engines": { "node": ">=14.0.0" }, @@ -29,9 +29,9 @@ "types": "./types/arm-mediaservices.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^1.0.4", "rollup": "^2.66.1", @@ -39,7 +39,6 @@ "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", - "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -48,9 +47,9 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/arm-storage": "^17.2.1" + "@azure/dev-tool": "^1.0.0" }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mediaservices/arm-mediaservices", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,14 +110,5 @@ } ] }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mediaservices/arm-mediaservices", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-mediaservices?view=azure-node-preview" - } -} + "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 3f8d4cb3f058..8b2c5568baf5 100644 --- a/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md +++ b/sdk/mediaservices/arm-mediaservices/review/arm-mediaservices.api.md @@ -1665,6 +1665,13 @@ export enum KnownLiveEventEncodingType { Standard = "Standard" } +// @public +export enum KnownLiveEventHealthStatus { + Excellent = "Excellent", + Good = "Good", + Poor = "Poor" +} + // @public export enum KnownLiveEventInputProtocol { FragmentedMP4 = "FragmentedMP4", @@ -1682,6 +1689,61 @@ export enum KnownLiveEventResourceState { Stopping = "Stopping" } +// @public +export enum KnownLiveEventState { + Running = "Running", + Stopped = "Stopped" +} + +// @public +export enum KnownLiveEventStreamEventLevel { + Critical = "Critical", + Error = "Error", + Information = "Information", + Warning = "Warning" +} + +// @public +export enum KnownLiveEventStreamEventMaxTimeMediaType { + Audio = "Audio", + Video = "Video" +} + +// @public +export enum KnownLiveEventStreamEventMediaType { + Audio = "audio", + Video = "video" +} + +// @public +export enum KnownLiveEventStreamEventMinTimeMediaType { + Audio = "Audio", + Video = "Video" +} + +// @public +export enum KnownLiveEventStreamEventType { + StreamEventBeginIngest = "StreamEvent/BeginIngest", + StreamEventChunkDropped = "StreamEvent/ChunkDropped", + StreamEventDiscontinuity = "StreamEvent/Discontinuity", + StreamEventEndIngest = "StreamEvent/EndIngest", + StreamEventFirstChunkReceived = "StreamEvent/FirstChunkReceived", + StreamEventInvalidConnection = "StreamEvent/InvalidConnection", + StreamEventUnalignedKeyFrames = "StreamEvent/UnalignedKeyFrames", + StreamEventUnalignedPresentation = "StreamEvent/UnalignedPresentation" +} + +// @public +export enum KnownLiveEventTrackEventType { + TrackEventIngestHeartbeat = "TrackEvent/IngestHeartbeat" +} + +// @public +export enum KnownLiveEventTrackType { + Audio = "audio", + Video = "video" +} + // @public export enum KnownLiveOutputResourceState { Creating = "Creating", @@ -1703,6 +1765,14 @@ export enum KnownMetricUnit { Milliseconds = "Milliseconds" } +// @public +export enum KnownMinimumTlsVersion { + Tls10 = "Tls10", + Tls11 = "Tls11", + Tls12 = "Tls12", + Tls13 = "Tls13" +} + // @public export enum KnownOnErrorType { ContinueJob = "ContinueJob", @@ -1919,6 +1989,41 @@ export interface LiveEventEndpoint { url?: string; } +// @public +export interface LiveEventGetStatusResult { + value?: LiveEventStatus[]; +} + +// @public +export interface LiveEventGetStreamEventsResult { + value?: LiveEventStreamEvent[]; +} + +// @public +export interface LiveEventGetTrackIngestHeartbeatsResult { + value?: LiveEventTrackEvent[]; +} + +// @public +export type LiveEventHealthStatus = string; + +// @public +export interface LiveEventIngestInterruption { + begin?: Date; + duration?: string; + end?: Date; + reason?: string; +} + +// @public +export interface LiveEventIngestion { + begin?: Date; + end?: Date; + endReason?: string; + ingestInterruptions?: LiveEventIngestInterruption[]; + streamName?: string; +} + // @public export interface LiveEventInput { accessControl?: LiveEventInputAccessControl; @@ -1926,6 +2031,7 @@ export interface LiveEventInput { endpoints?: LiveEventEndpoint[]; keyFrameIntervalDuration?: string; streamingProtocol: LiveEventInputProtocol; + timedMetadataEndpoints?: LiveEventTimedMetadataEndpoint[]; } // @public @@ -1981,6 +2087,9 @@ export interface LiveEvents { beginCreateAndWait(resourceGroupName: string, accountName: string, liveEventName: string, parameters: LiveEvent, options?: LiveEventsCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsDeleteOptionalParams): Promise; + beginListGetStatusAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsListGetStatusOptionalParams): PagedAsyncIterableIterator; + beginListGetStreamEventsAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsListGetStreamEventsOptionalParams): PagedAsyncIterableIterator; + beginListGetTrackIngestHeartbeatsAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams): PagedAsyncIterableIterator; beginReset(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsResetOptionalParams): Promise, void>>; beginResetAndWait(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsResetOptionalParams): Promise; beginStart(resourceGroupName: string, accountName: string, liveEventName: string, options?: LiveEventsStartOptionalParams): Promise, void>>; @@ -2030,6 +2139,51 @@ export interface LiveEventsGetOptionalParams extends coreClient.OperationOptions // @public export type LiveEventsGetResponse = LiveEvent; +// @public +export interface LiveEventsListGetStatusHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface LiveEventsListGetStatusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LiveEventsListGetStatusResponse = LiveEventGetStatusResult; + +// @public +export interface LiveEventsListGetStreamEventsHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface LiveEventsListGetStreamEventsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LiveEventsListGetStreamEventsResponse = LiveEventGetStreamEventsResult; + +// @public +export interface LiveEventsListGetTrackIngestHeartbeatsHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface LiveEventsListGetTrackIngestHeartbeatsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type LiveEventsListGetTrackIngestHeartbeatsResponse = LiveEventGetTrackIngestHeartbeatsResult; + // @public export interface LiveEventsListNextOptionalParams extends coreClient.OperationOptions { } @@ -2069,6 +2223,75 @@ export interface LiveEventsStopOptionalParams extends coreClient.OperationOption updateIntervalInMs?: number; } +// @public +export type LiveEventState = string; + +// @public +export interface LiveEventStatus { + healthDescriptions?: string[]; + healthStatus?: LiveEventHealthStatus; + ingestion?: LiveEventIngestion; + lastUpdatedTime?: Date; + state?: LiveEventState; + trackStatus?: LiveEventTrackStatus[]; +} + +// @public +export interface LiveEventStreamEvent { + data?: LiveEventStreamEventData; + eventLevel?: LiveEventStreamEventLevel; + eventTime?: Date; + eventType?: LiveEventStreamEventType; +} + +// @public +export interface LiveEventStreamEventData { + bitrate?: number; + currentFragmentTimestamp?: string; + discontinuityGap?: number; + duration?: string; + fragmentDropReason?: string; + fragmentOneDuration?: string; + fragmentOneTimestamp?: string; + fragmentTwoDuration?: string; + fragmentTwoTimestamp?: string; + maxTime?: string; + maxTimeMediaType?: LiveEventStreamEventMaxTimeMediaType; + mediaTimestamp?: string; + mediaType?: LiveEventStreamEventMediaType; + minTime?: string; + minTimeMediaType?: LiveEventStreamEventMinTimeMediaType; + previousFragmentDuration?: string; + previousFragmentTimestamp?: string; + remoteIp?: string; + remotePort?: string; + resolution?: string; + resultCode?: string; + resultMessage?: string; + streamId?: string; + streamName?: string; + timescale?: string; + timescaleOfMaxTime?: string; + timescaleOfMinTime?: string; + trackId?: number; + trackName?: string; +} + +// @public +export type LiveEventStreamEventLevel = string; + +// @public +export type LiveEventStreamEventMaxTimeMediaType = string; + +// @public +export type LiveEventStreamEventMediaType = string; + +// @public +export type LiveEventStreamEventMinTimeMediaType = string; + +// @public +export type LiveEventStreamEventType = string; + // @public export interface LiveEventsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2078,6 +2301,54 @@ export interface LiveEventsUpdateOptionalParams extends coreClient.OperationOpti // @public export type LiveEventsUpdateResponse = LiveEvent; +// @public +export interface LiveEventTimedMetadataEndpoint { + url?: string; +} + +// @public +export interface LiveEventTrackEvent { + data?: LiveEventTrackEventData; + eventTime?: Date; + eventType?: LiveEventTrackEventType; +} + +// @public +export interface LiveEventTrackEventData { + bitrate?: number; + discontinuityCount?: number; + healthy?: boolean; + incomingBitrate?: number; + ingestDriftValue?: string; + lastFragmentArrivalTime?: Date; + lastTimestamp?: string; + nonincreasingCount?: number; + overlapCount?: number; + state?: string; + timescale?: string; + trackName?: string; + trackType?: LiveEventTrackType; + transcriptionLanguage?: string; + transcriptionState?: string; + unexpectedBitrate?: boolean; +} + +// @public +export type LiveEventTrackEventType = string; + +// @public +export interface LiveEventTrackStatus { + expectedBitrate?: number; + incomingBitrate?: number; + ingestDrift?: string; + requestReceived?: number; + requestSucceeded?: number; + trackId?: string; +} + +// @public +export type LiveEventTrackType = string; + // @public export interface LiveEventTranscription { inputTrackSelection?: LiveEventInputTrackSelection[]; @@ -2198,6 +2469,7 @@ export interface MediaService extends TrackedResource { identity?: MediaServiceIdentity; keyDelivery?: KeyDelivery; readonly mediaServiceId?: string; + minimumTlsVersion?: MinimumTlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; @@ -2366,6 +2638,7 @@ export interface MediaServiceUpdate { identity?: MediaServiceIdentity; keyDelivery?: KeyDelivery; readonly mediaServiceId?: string; + minimumTlsVersion?: MinimumTlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; @@ -2406,6 +2679,9 @@ export interface MetricSpecification { // @public export type MetricUnit = string; +// @public +export type MinimumTlsVersion = string; + // @public export interface Mp4Format extends MultiBitrateFormat { odataType: "#Microsoft.Media.Mp4Format"; diff --git a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts index 8f5759277aca..d4fcf6c56c9a 100644 --- a/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts +++ b/sdk/mediaservices/arm-mediaservices/src/azureMediaServices.ts @@ -88,7 +88,7 @@ export class AzureMediaServices extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-mediaservices/13.1.1`; + const packageDetails = `azsdk-js-arm-mediaservices/13.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/mediaservices/arm-mediaservices/src/models/index.ts b/sdk/mediaservices/arm-mediaservices/src/models/index.ts index ef617f5b2606..7900592a12d8 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/index.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/index.ts @@ -514,6 +514,8 @@ export interface MediaServiceUpdate { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used. */ + minimumTlsVersion?: MinimumTlsVersion; } /** The input to the sync storage keys request. */ @@ -1154,6 +1156,8 @@ export interface LiveEventInput { accessToken?: string; /** The input endpoints for the live event. */ endpoints?: LiveEventEndpoint[]; + /** The metadata endpoints for the live event. */ + timedMetadataEndpoints?: LiveEventTimedMetadataEndpoint[]; } /** The IP access control for live event input. */ @@ -1186,6 +1190,12 @@ export interface LiveEventEndpoint { url?: string; } +/** The live event metadata insertion endpoint. */ +export interface LiveEventTimedMetadataEndpoint { + /** The metadata endpoint URL. */ + url?: string; +} + /** Live event preview settings. */ export interface LiveEventPreview { /** The endpoints for preview. Do not share the preview URL with the live event audience. */ @@ -1258,6 +1268,202 @@ export interface LiveEventActionInput { removeOutputsOnStop?: boolean; } +/** Get live event status result. */ +export interface LiveEventGetStatusResult { + /** The result of the get live event status. */ + value?: LiveEventStatus[]; +} + +/** The live event status. */ +export interface LiveEventStatus { + /** Current state of the live event. See https://go.microsoft.com/fwlink/?linkid=2139012 for more information. */ + state?: LiveEventState; + /** Health status of last 20 seconds. */ + healthStatus?: LiveEventHealthStatus; + /** List of strings justifying the health status. */ + healthDescriptions?: string[]; + /** Last updated UTC time of this status. */ + lastUpdatedTime?: Date; + /** Live event ingestion entry. */ + ingestion?: LiveEventIngestion; + /** Track entry list. */ + trackStatus?: LiveEventTrackStatus[]; +} + +/** The live event ingestion telemetry data. */ +export interface LiveEventIngestion { + /** Ingestion stream name. */ + streamName?: string; + /** Ingestion begin time in UTC. */ + begin?: Date; + /** Ingestion end time in UTC. Empty if it's not stopped yet. */ + end?: Date; + /** Reason why ingestion stops. Empty if it's not stopped yet. E.g) Service Stopped. No Ingestion. */ + endReason?: string; + /** IngestInterruption entry list. */ + ingestInterruptions?: LiveEventIngestInterruption[]; +} + +/** The live event ingest interruption data. */ +export interface LiveEventIngestInterruption { + /** UTC time of interruption start, encoder disconnected. */ + begin?: Date; + /** UTC time of interruption end, encoder re-connected. */ + end?: Date; + /** Duration of interruption in ISO 8601 time. For example, use PT1H30M to indicate 1 hour and 30 minutes. */ + duration?: string; + /** Interruption reason. */ + reason?: string; +} + +/** The live event track status. */ +export interface LiveEventTrackStatus { + /** Track Id. */ + trackId?: string; + /** Expected bitrate for this track. */ + expectedBitrate?: number; + /** Average incoming bitrate for last 20 seconds when live event is running. */ + incomingBitrate?: number; + /** Current ingest drift value in seconds for last 1 minute. */ + ingestDrift?: string; + /** Total number of timed metadata request received. */ + requestReceived?: number; + /** Total number of successful timed metadata request received. */ + requestSucceeded?: number; +} + +/** Get live event stream events result. */ +export interface LiveEventGetStreamEventsResult { + /** The result of the get live event stream events. */ + value?: LiveEventStreamEvent[]; +} + +/** The live event stream event. */ +export interface LiveEventStreamEvent { + /** The type of the stream event. Format: StreamEvent/{eventType} */ + eventType?: LiveEventStreamEventType; + /** The time event raised. */ + eventTime?: Date; + /** Event level. */ + eventLevel?: LiveEventStreamEventLevel; + /** Event data based on event type. */ + data?: LiveEventStreamEventData; +} + +/** The live event stream event data. */ +export interface LiveEventStreamEventData { + /** Name of the track. */ + trackName?: string; + /** Stream ID in the format "trackName_bitrate" */ + streamId?: string; + /** Track index. */ + trackId?: number; + /** Type of the track. */ + mediaType?: LiveEventStreamEventMediaType; + /** Bitrate of the track. */ + bitrate?: number; + /** Fragment timestamp in timescale. */ + mediaTimestamp?: string; + /** Timescale in which timestamps are expressed. */ + timescale?: string; + /** Previous fragment timestamp in timescale. */ + previousFragmentTimestamp?: string; + /** Previous fragment duration in timescale. */ + previousFragmentDuration?: string; + /** Current fragment timestamp in timescale. */ + currentFragmentTimestamp?: string; + /** Timestamp of first fragment used to make a comparison, in timescale. */ + fragmentOneTimestamp?: string; + /** Duration of first fragment used to make a comparison, in timescale. */ + fragmentOneDuration?: string; + /** Timestamp of second fragment used to make a comparison, in timescale. */ + fragmentTwoTimestamp?: string; + /** Duration of second fragment used to make a comparison, in timescale. */ + fragmentTwoDuration?: string; + /** Reason the fragment was dropped. */ + fragmentDropReason?: string; + /** Length of the discontinuity gap in timescale. */ + discontinuityGap?: number; + /** Identifier of the stream or connection. Encoder or customer is responsible to add this ID in the ingest URL. */ + streamName?: string; + /** Result code. */ + resultCode?: string; + /** Result message. */ + resultMessage?: string; + /** Fragment duration. */ + duration?: string; + /** Width x Height for video, null otherwise. */ + resolution?: string; + /** The smaller timestamp of the two fragments compared. */ + minTime?: string; + /** The media type of the smaller timestamp of two fragments compared. */ + minTimeMediaType?: LiveEventStreamEventMinTimeMediaType; + /** The larger timestamp of the two fragments compared. */ + maxTime?: string; + /** The media type of the larger timestamp of two fragments compared. */ + maxTimeMediaType?: LiveEventStreamEventMaxTimeMediaType; + /** Timescale of the fragment with the smaller timestamp. */ + timescaleOfMinTime?: string; + /** Timescale of the fragment with the larger timestamp. */ + timescaleOfMaxTime?: string; + /** Truncated IP of the encoder. */ + remoteIp?: string; + /** Port of the encoder. */ + remotePort?: string; +} + +/** Get live event track ingest heart beats result. */ +export interface LiveEventGetTrackIngestHeartbeatsResult { + /** The result of the get live event track events. */ + value?: LiveEventTrackEvent[]; +} + +/** The live event track event. */ +export interface LiveEventTrackEvent { + /** The type of the track event. */ + eventType?: LiveEventTrackEventType; + /** The time event raised. */ + eventTime?: Date; + /** Event data. */ + data?: LiveEventTrackEventData; +} + +/** The live event track ingest heart beat event data. */ +export interface LiveEventTrackEventData { + /** Name of the track. */ + trackName?: string; + /** Type of the track. */ + trackType?: LiveEventTrackType; + /** Bitrate of the track. */ + bitrate?: number; + /** Calculated bitrate based on data chunks coming from encoder. */ + incomingBitrate?: number; + /** Latest timestamp received for a track in last 20 seconds. */ + lastTimestamp?: string; + /** Timescale in which timestamps are expressed. */ + timescale?: string; + /** Number of data chunks that had overlapped timestamps in last 20 seconds. */ + overlapCount?: number; + /** Number of discontinuities detected in the last 20 seconds. */ + discontinuityCount?: number; + /** Number of data chunks with timestamps in the past that were received in last 20 seconds. */ + nonincreasingCount?: number; + /** If expected and actual bitrates differ by more than allowed limit in last 20 seconds. */ + unexpectedBitrate?: boolean; + /** State of the live event. */ + state?: string; + /** Indicates whether ingest is healthy. */ + healthy?: boolean; + /** The last timestamp in UTC that a fragment arrived at the ingest endpoint. */ + lastFragmentArrivalTime?: Date; + /** Indicates the speed of delay, in seconds-per-minute, of the incoming audio or video data during the last minute. The value is greater than zero if data is arriving to the live event slower than expected in the last minute; zero if data arrived with no delay; and "n/a" if no audio or video data was received. For example, if you have a contribution encoder sending in live content, and it is slowing down due to processing issues, or network latency, it may be only able to deliver a total of 58 seconds of audio or video in a one-minute period. This would be reported as two seconds-per-minute of drift. If the encoder is able to catch up and send all 60 seconds or more of data every minute, you will see this value reported as 0. If there was a disconnection or discontinuity from the encoder, this value may still display as 0, as it does not account for breaks in the data - only data that is delayed in timestamps. */ + ingestDriftValue?: string; + /** This value is "On" for audio track heartbeats if live transcription is turned on, otherwise you will see an empty string. This state is only applicable to track type of "audio" for Live transcription. All other tracks will have an empty value. */ + transcriptionState?: string; + /** The language code (in BCP-47 format) of the transcription language. For example, "de-de" indicates German (Germany). The value is empty for the video track heartbeats, or when live transcription is turned off. */ + transcriptionLanguage?: string; +} + /** The status of an async operation. */ export interface AsyncOperationResult { /** The error object */ @@ -2446,6 +2652,8 @@ export interface MediaService extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** The minimum TLS version allowed for this account's requests. This is an optional property. If unspecified, a secure default value will be used. */ + minimumTlsVersion?: MinimumTlsVersion; } /** The live event. */ @@ -2827,6 +3035,30 @@ export interface OperationResultsGetHeaders { azureAsyncOperation?: string; } +/** Defines headers for LiveEvents_listGetStatus operation. */ +export interface LiveEventsListGetStatusHeaders { + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for LiveEvents_listGetStreamEvents operation. */ +export interface LiveEventsListGetStreamEventsHeaders { + /** The URI to poll for completion status. */ + location?: string; + /** The URI to poll for completion status. */ + azureAsyncOperation?: string; +} + +/** Defines headers for LiveEvents_listGetTrackIngestHeartbeats operation. */ +export interface LiveEventsListGetTrackIngestHeartbeatsHeaders { + /** 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. */ @@ -3112,6 +3344,30 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; +/** Known values of {@link MinimumTlsVersion} that the service accepts. */ +export enum KnownMinimumTlsVersion { + /** Minimum TLS version is TLS 1.0. */ + Tls10 = "Tls10", + /** Minimum TLS version is TLS 1.1. */ + Tls11 = "Tls11", + /** Minimum TLS version is TLS 1.2. */ + Tls12 = "Tls12", + /** Minimum TLS version is TLS 1.3. */ + Tls13 = "Tls13" +} + +/** + * Defines values for MinimumTlsVersion. \ + * {@link KnownMinimumTlsVersion} can be used interchangeably with MinimumTlsVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Tls10**: Minimum TLS version is TLS 1.0. \ + * **Tls11**: Minimum TLS version is TLS 1.1. \ + * **Tls12**: Minimum TLS version is TLS 1.2. \ + * **Tls13**: Minimum TLS version is TLS 1.3. + */ +export type MinimumTlsVersion = 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). */ @@ -3538,6 +3794,192 @@ export enum KnownStreamOptionsFlag { */ export type StreamOptionsFlag = string; +/** Known values of {@link LiveEventState} that the service accepts. */ +export enum KnownLiveEventState { + /** This is the initial state of the live event after creation (unless autostart was set to true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed. */ + Stopped = "Stopped", + /** The live event resources have been allocated, ingest and preview URLs have been generated, and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live event resource to halt further billing. */ + Running = "Running" +} + +/** + * Defines values for LiveEventState. \ + * {@link KnownLiveEventState} can be used interchangeably with LiveEventState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Stopped**: This is the initial state of the live event after creation (unless autostart was set to true.) No billing occurs in this state. In this state, the live event properties can be updated but streaming is not allowed. \ + * **Running**: The live event resources have been allocated, ingest and preview URLs have been generated, and it is capable of receiving live streams. At this point, billing is active. You must explicitly call Stop on the live event resource to halt further billing. + */ +export type LiveEventState = string; + +/** Known values of {@link LiveEventHealthStatus} that the service accepts. */ +export enum KnownLiveEventHealthStatus { + /** Incoming bitrate >= 75% of target bitrate AND no Ingest warning and error AND ABS(IngestDrift) is equal to 0. */ + Excellent = "Excellent", + /** Incoming bitrate >= 20% AND no Ingest Error or warning exception discontinuities which gap < 10 seconds. */ + Good = "Good", + /** Otherwise. */ + Poor = "Poor" +} + +/** + * Defines values for LiveEventHealthStatus. \ + * {@link KnownLiveEventHealthStatus} can be used interchangeably with LiveEventHealthStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Excellent**: Incoming bitrate >= 75% of target bitrate AND no Ingest warning and error AND ABS(IngestDrift) is equal to 0. \ + * **Good**: Incoming bitrate >= 20% AND no Ingest Error or warning exception discontinuities which gap < 10 seconds. \ + * **Poor**: Otherwise. + */ +export type LiveEventHealthStatus = string; + +/** Known values of {@link LiveEventStreamEventType} that the service accepts. */ +export enum KnownLiveEventStreamEventType { + /** Ingest session begins. */ + StreamEventBeginIngest = "StreamEvent/BeginIngest", + /** Ingest session ends. */ + StreamEventEndIngest = "StreamEvent/EndIngest", + /** First fragment received on ingest media track. */ + StreamEventFirstChunkReceived = "StreamEvent/FirstChunkReceived", + /** Fragment dropped. */ + StreamEventChunkDropped = "StreamEvent/ChunkDropped", + /** Unaligned video keyframes detected. */ + StreamEventUnalignedKeyFrames = "StreamEvent/UnalignedKeyFrames", + /** Unaligned presentation detected, meaning two fragments across two quality levels are not time aligned. */ + StreamEventUnalignedPresentation = "StreamEvent/UnalignedPresentation", + /** Timestamp discontinuity detected. */ + StreamEventDiscontinuity = "StreamEvent/Discontinuity", + /** Ingest session denied. */ + StreamEventInvalidConnection = "StreamEvent/InvalidConnection" +} + +/** + * Defines values for LiveEventStreamEventType. \ + * {@link KnownLiveEventStreamEventType} can be used interchangeably with LiveEventStreamEventType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **StreamEvent\/BeginIngest**: Ingest session begins. \ + * **StreamEvent\/EndIngest**: Ingest session ends. \ + * **StreamEvent\/FirstChunkReceived**: First fragment received on ingest media track. \ + * **StreamEvent\/ChunkDropped**: Fragment dropped. \ + * **StreamEvent\/UnalignedKeyFrames**: Unaligned video keyframes detected. \ + * **StreamEvent\/UnalignedPresentation**: Unaligned presentation detected, meaning two fragments across two quality levels are not time aligned. \ + * **StreamEvent\/Discontinuity**: Timestamp discontinuity detected. \ + * **StreamEvent\/InvalidConnection**: Ingest session denied. + */ +export type LiveEventStreamEventType = string; + +/** Known values of {@link LiveEventStreamEventLevel} that the service accepts. */ +export enum KnownLiveEventStreamEventLevel { + /** Critical */ + Critical = "Critical", + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", + /** Information */ + Information = "Information" +} + +/** + * Defines values for LiveEventStreamEventLevel. \ + * {@link KnownLiveEventStreamEventLevel} can be used interchangeably with LiveEventStreamEventLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Critical** \ + * **Error** \ + * **Warning** \ + * **Information** + */ +export type LiveEventStreamEventLevel = string; + +/** Known values of {@link LiveEventStreamEventMediaType} that the service accepts. */ +export enum KnownLiveEventStreamEventMediaType { + /** Audio */ + Audio = "audio", + /** Video */ + Video = "video" +} + +/** + * Defines values for LiveEventStreamEventMediaType. \ + * {@link KnownLiveEventStreamEventMediaType} can be used interchangeably with LiveEventStreamEventMediaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **audio** \ + * **video** + */ +export type LiveEventStreamEventMediaType = string; + +/** Known values of {@link LiveEventStreamEventMinTimeMediaType} that the service accepts. */ +export enum KnownLiveEventStreamEventMinTimeMediaType { + /** Audio */ + Audio = "Audio", + /** Video */ + Video = "Video" +} + +/** + * Defines values for LiveEventStreamEventMinTimeMediaType. \ + * {@link KnownLiveEventStreamEventMinTimeMediaType} can be used interchangeably with LiveEventStreamEventMinTimeMediaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Audio** \ + * **Video** + */ +export type LiveEventStreamEventMinTimeMediaType = string; + +/** Known values of {@link LiveEventStreamEventMaxTimeMediaType} that the service accepts. */ +export enum KnownLiveEventStreamEventMaxTimeMediaType { + /** Audio */ + Audio = "Audio", + /** Video */ + Video = "Video" +} + +/** + * Defines values for LiveEventStreamEventMaxTimeMediaType. \ + * {@link KnownLiveEventStreamEventMaxTimeMediaType} can be used interchangeably with LiveEventStreamEventMaxTimeMediaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Audio** \ + * **Video** + */ +export type LiveEventStreamEventMaxTimeMediaType = string; + +/** Known values of {@link LiveEventTrackEventType} that the service accepts. */ +export enum KnownLiveEventTrackEventType { + /** Track heartbeat received. */ + TrackEventIngestHeartbeat = "TrackEvent/IngestHeartbeat" +} + +/** + * Defines values for LiveEventTrackEventType. \ + * {@link KnownLiveEventTrackEventType} can be used interchangeably with LiveEventTrackEventType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TrackEvent\/IngestHeartbeat**: Track heartbeat received. + */ +export type LiveEventTrackEventType = string; + +/** Known values of {@link LiveEventTrackType} that the service accepts. */ +export enum KnownLiveEventTrackType { + /** Audio */ + Audio = "audio", + /** Video */ + Video = "video" +} + +/** + * Defines values for LiveEventTrackType. \ + * {@link KnownLiveEventTrackType} can be used interchangeably with LiveEventTrackType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **audio** \ + * **video** + */ +export type LiveEventTrackType = string; + /** Known values of {@link AsyncOperationStatus} that the service accepts. */ export enum KnownAsyncOperationStatus { /** Succeeded */ @@ -4978,6 +5420,42 @@ export interface LiveEventsResetOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface LiveEventsListGetStatusOptionalParams + 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 listGetStatus operation. */ +export type LiveEventsListGetStatusResponse = LiveEventGetStatusResult; + +/** Optional parameters. */ +export interface LiveEventsListGetStreamEventsOptionalParams + 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 listGetStreamEvents operation. */ +export type LiveEventsListGetStreamEventsResponse = LiveEventGetStreamEventsResult; + +/** Optional parameters. */ +export interface LiveEventsListGetTrackIngestHeartbeatsOptionalParams + 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 listGetTrackIngestHeartbeats operation. */ +export type LiveEventsListGetTrackIngestHeartbeatsResponse = LiveEventGetTrackIngestHeartbeatsResult; + /** Optional parameters. */ export interface LiveEventsAsyncOperationOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts index 50d3183382ed..3150136dbbf6 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/mappers.ts @@ -1026,6 +1026,13 @@ export const MediaServiceUpdate: coreClient.CompositeMapper = { } } } + }, + minimumTlsVersion: { + defaultValue: "Tls12", + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } } } } @@ -2747,6 +2754,18 @@ export const LiveEventInput: coreClient.CompositeMapper = { } } } + }, + timedMetadataEndpoints: { + serializedName: "timedMetadataEndpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventTimedMetadataEndpoint" + } + } + } } } } @@ -2827,219 +2846,827 @@ export const LiveEventEndpoint: coreClient.CompositeMapper = { name: "String" } }, - url: { - serializedName: "url", + url: { + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventTimedMetadataEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventTimedMetadataEndpoint", + modelProperties: { + url: { + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventPreview: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventPreview", + modelProperties: { + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventEndpoint" + } + } + } + }, + accessControl: { + serializedName: "accessControl", + type: { + name: "Composite", + className: "LiveEventPreviewAccessControl" + } + }, + previewLocator: { + serializedName: "previewLocator", + type: { + name: "String" + } + }, + streamingPolicyName: { + serializedName: "streamingPolicyName", + type: { + name: "String" + } + }, + alternativeMediaId: { + serializedName: "alternativeMediaId", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventPreviewAccessControl: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventPreviewAccessControl", + modelProperties: { + ip: { + serializedName: "ip", + type: { + name: "Composite", + className: "IPAccessControl" + } + } + } + } +}; + +export const LiveEventEncoding: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventEncoding", + modelProperties: { + encodingType: { + serializedName: "encodingType", + type: { + name: "String" + } + }, + presetName: { + serializedName: "presetName", + type: { + name: "String" + } + }, + stretchMode: { + serializedName: "stretchMode", + type: { + name: "String" + } + }, + keyFrameInterval: { + serializedName: "keyFrameInterval", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const LiveEventTranscription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventTranscription", + modelProperties: { + language: { + serializedName: "language", + type: { + name: "String" + } + }, + inputTrackSelection: { + serializedName: "inputTrackSelection", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventInputTrackSelection" + } + } + } + }, + outputTranscriptionTrack: { + serializedName: "outputTranscriptionTrack", + type: { + name: "Composite", + className: "LiveEventOutputTranscriptionTrack" + } + } + } + } +}; + +export const LiveEventInputTrackSelection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventInputTrackSelection", + modelProperties: { + property: { + serializedName: "property", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventOutputTranscriptionTrack: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventOutputTranscriptionTrack", + modelProperties: { + trackName: { + serializedName: "trackName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CrossSiteAccessPolicies: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CrossSiteAccessPolicies", + modelProperties: { + clientAccessPolicy: { + serializedName: "clientAccessPolicy", + type: { + name: "String" + } + }, + crossDomainPolicy: { + serializedName: "crossDomainPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventActionInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventActionInput", + modelProperties: { + removeOutputsOnStop: { + serializedName: "removeOutputsOnStop", + type: { + name: "Boolean" + } + } + } + } +}; + +export const LiveEventGetStatusResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventGetStatusResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventStatus" + } + } + } + } + } + } +}; + +export const LiveEventStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventStatus", + modelProperties: { + state: { + serializedName: "state", + type: { + name: "String" + } + }, + healthStatus: { + serializedName: "healthStatus", + type: { + name: "String" + } + }, + healthDescriptions: { + serializedName: "healthDescriptions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lastUpdatedTime: { + serializedName: "lastUpdatedTime", + type: { + name: "DateTime" + } + }, + ingestion: { + serializedName: "ingestion", + type: { + name: "Composite", + className: "LiveEventIngestion" + } + }, + trackStatus: { + serializedName: "trackStatus", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventTrackStatus" + } + } + } + } + } + } +}; + +export const LiveEventIngestion: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventIngestion", + modelProperties: { + streamName: { + serializedName: "streamName", + type: { + name: "String" + } + }, + begin: { + serializedName: "begin", + type: { + name: "DateTime" + } + }, + end: { + serializedName: "end", + type: { + name: "DateTime" + } + }, + endReason: { + serializedName: "endReason", + type: { + name: "String" + } + }, + ingestInterruptions: { + serializedName: "ingestInterruptions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventIngestInterruption" + } + } + } + } + } + } +}; + +export const LiveEventIngestInterruption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventIngestInterruption", + modelProperties: { + begin: { + serializedName: "begin", + type: { + name: "DateTime" + } + }, + end: { + serializedName: "end", + type: { + name: "DateTime" + } + }, + duration: { + serializedName: "duration", + type: { + name: "TimeSpan" + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventTrackStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventTrackStatus", + modelProperties: { + trackId: { + serializedName: "trackId", + type: { + name: "String" + } + }, + expectedBitrate: { + serializedName: "expectedBitrate", + type: { + name: "Number" + } + }, + incomingBitrate: { + serializedName: "incomingBitrate", + type: { + name: "Number" + } + }, + ingestDrift: { + serializedName: "ingestDrift", + type: { + name: "String" + } + }, + requestReceived: { + serializedName: "requestReceived", + type: { + name: "Number" + } + }, + requestSucceeded: { + serializedName: "requestSucceeded", + type: { + name: "Number" + } + } + } + } +}; + +export const LiveEventGetStreamEventsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventGetStreamEventsResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LiveEventStreamEvent" + } + } + } + } + } + } +}; + +export const LiveEventStreamEvent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventStreamEvent", + modelProperties: { + eventType: { + serializedName: "eventType", + type: { + name: "String" + } + }, + eventTime: { + serializedName: "eventTime", + type: { + name: "DateTime" + } + }, + eventLevel: { + serializedName: "eventLevel", + type: { + name: "String" + } + }, + data: { + serializedName: "data", + type: { + name: "Composite", + className: "LiveEventStreamEventData" + } + } + } + } +}; + +export const LiveEventStreamEventData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventStreamEventData", + modelProperties: { + trackName: { + serializedName: "trackName", + type: { + name: "String" + } + }, + streamId: { + serializedName: "streamId", + type: { + name: "String" + } + }, + trackId: { + serializedName: "trackId", + type: { + name: "Number" + } + }, + mediaType: { + serializedName: "mediaType", + type: { + name: "String" + } + }, + bitrate: { + serializedName: "bitrate", + type: { + name: "Number" + } + }, + mediaTimestamp: { + serializedName: "mediaTimestamp", + type: { + name: "String" + } + }, + timescale: { + serializedName: "timescale", + type: { + name: "String" + } + }, + previousFragmentTimestamp: { + serializedName: "previousFragmentTimestamp", + type: { + name: "String" + } + }, + previousFragmentDuration: { + serializedName: "previousFragmentDuration", + type: { + name: "String" + } + }, + currentFragmentTimestamp: { + serializedName: "currentFragmentTimestamp", + type: { + name: "String" + } + }, + fragmentOneTimestamp: { + serializedName: "fragmentOneTimestamp", + type: { + name: "String" + } + }, + fragmentOneDuration: { + serializedName: "fragmentOneDuration", + type: { + name: "String" + } + }, + fragmentTwoTimestamp: { + serializedName: "fragmentTwoTimestamp", + type: { + name: "String" + } + }, + fragmentTwoDuration: { + serializedName: "fragmentTwoDuration", + type: { + name: "String" + } + }, + fragmentDropReason: { + serializedName: "fragmentDropReason", + type: { + name: "String" + } + }, + discontinuityGap: { + serializedName: "discontinuityGap", + type: { + name: "Number" + } + }, + streamName: { + serializedName: "streamName", + type: { + name: "String" + } + }, + resultCode: { + serializedName: "resultCode", + type: { + name: "String" + } + }, + resultMessage: { + serializedName: "resultMessage", type: { name: "String" } - } - } - } -}; - -export const LiveEventPreview: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveEventPreview", - modelProperties: { - endpoints: { - serializedName: "endpoints", + }, + duration: { + serializedName: "duration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LiveEventEndpoint" - } - } + name: "String" } }, - accessControl: { - serializedName: "accessControl", + resolution: { + serializedName: "resolution", type: { - name: "Composite", - className: "LiveEventPreviewAccessControl" + name: "String" } }, - previewLocator: { - serializedName: "previewLocator", + minTime: { + serializedName: "minTime", type: { name: "String" } }, - streamingPolicyName: { - serializedName: "streamingPolicyName", + minTimeMediaType: { + serializedName: "minTimeMediaType", type: { name: "String" } }, - alternativeMediaId: { - serializedName: "alternativeMediaId", + maxTime: { + serializedName: "maxTime", type: { name: "String" } - } - } - } -}; - -export const LiveEventPreviewAccessControl: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveEventPreviewAccessControl", - modelProperties: { - ip: { - serializedName: "ip", + }, + maxTimeMediaType: { + serializedName: "maxTimeMediaType", type: { - name: "Composite", - className: "IPAccessControl" + name: "String" } - } - } - } -}; - -export const LiveEventEncoding: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveEventEncoding", - modelProperties: { - encodingType: { - serializedName: "encodingType", + }, + timescaleOfMinTime: { + serializedName: "timescaleOfMinTime", type: { name: "String" } }, - presetName: { - serializedName: "presetName", + timescaleOfMaxTime: { + serializedName: "timescaleOfMaxTime", type: { name: "String" } }, - stretchMode: { - serializedName: "stretchMode", + remoteIp: { + serializedName: "remoteIp", type: { name: "String" } }, - keyFrameInterval: { - serializedName: "keyFrameInterval", + remotePort: { + serializedName: "remotePort", type: { - name: "TimeSpan" + name: "String" } } } } }; -export const LiveEventTranscription: coreClient.CompositeMapper = { +export const LiveEventGetTrackIngestHeartbeatsResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LiveEventTranscription", + className: "LiveEventGetTrackIngestHeartbeatsResult", modelProperties: { - language: { - serializedName: "language", - type: { - name: "String" - } - }, - inputTrackSelection: { - serializedName: "inputTrackSelection", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LiveEventInputTrackSelection" + className: "LiveEventTrackEvent" } } } - }, - outputTranscriptionTrack: { - serializedName: "outputTranscriptionTrack", - type: { - name: "Composite", - className: "LiveEventOutputTranscriptionTrack" - } } } } }; -export const LiveEventInputTrackSelection: coreClient.CompositeMapper = { +export const LiveEventTrackEvent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LiveEventInputTrackSelection", + className: "LiveEventTrackEvent", modelProperties: { - property: { - serializedName: "property", + eventType: { + serializedName: "eventType", type: { name: "String" } }, - operation: { - serializedName: "operation", + eventTime: { + serializedName: "eventTime", type: { - name: "String" + name: "DateTime" } }, - value: { - serializedName: "value", + data: { + serializedName: "data", type: { - name: "String" + name: "Composite", + className: "LiveEventTrackEventData" } } } } }; -export const LiveEventOutputTranscriptionTrack: coreClient.CompositeMapper = { +export const LiveEventTrackEventData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LiveEventOutputTranscriptionTrack", + className: "LiveEventTrackEventData", modelProperties: { trackName: { serializedName: "trackName", - required: true, type: { name: "String" } - } - } - } -}; - -export const CrossSiteAccessPolicies: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CrossSiteAccessPolicies", - modelProperties: { - clientAccessPolicy: { - serializedName: "clientAccessPolicy", + }, + trackType: { + serializedName: "trackType", type: { name: "String" } }, - crossDomainPolicy: { - serializedName: "crossDomainPolicy", + bitrate: { + serializedName: "bitrate", + type: { + name: "Number" + } + }, + incomingBitrate: { + serializedName: "incomingBitrate", + type: { + name: "Number" + } + }, + lastTimestamp: { + serializedName: "lastTimestamp", type: { name: "String" } - } - } - } -}; - -export const LiveEventActionInput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LiveEventActionInput", - modelProperties: { - removeOutputsOnStop: { - serializedName: "removeOutputsOnStop", + }, + timescale: { + serializedName: "timescale", + type: { + name: "String" + } + }, + overlapCount: { + serializedName: "overlapCount", + type: { + name: "Number" + } + }, + discontinuityCount: { + serializedName: "discontinuityCount", + type: { + name: "Number" + } + }, + nonincreasingCount: { + serializedName: "nonincreasingCount", + type: { + name: "Number" + } + }, + unexpectedBitrate: { + serializedName: "unexpectedBitrate", + type: { + name: "Boolean" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + healthy: { + serializedName: "healthy", type: { name: "Boolean" } + }, + lastFragmentArrivalTime: { + serializedName: "lastFragmentArrivalTime", + type: { + name: "DateTime" + } + }, + ingestDriftValue: { + serializedName: "ingestDriftValue", + type: { + name: "String" + } + }, + transcriptionState: { + serializedName: "transcriptionState", + type: { + name: "String" + } + }, + transcriptionLanguage: { + serializedName: "transcriptionLanguage", + type: { + name: "String" + } } } } @@ -6098,6 +6725,13 @@ export const MediaService: coreClient.CompositeMapper = { } } } + }, + minimumTlsVersion: { + defaultValue: "Tls12", + serializedName: "properties.minimumTlsVersion", + type: { + name: "String" + } } } } @@ -7075,6 +7709,69 @@ export const OperationResultsGetHeaders: coreClient.CompositeMapper = { } }; +export const LiveEventsListGetStatusHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventsListGetStatusHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventsListGetStreamEventsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventsListGetStreamEventsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const LiveEventsListGetTrackIngestHeartbeatsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LiveEventsListGetTrackIngestHeartbeatsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { TrackBase: TrackBase, ContentKeyPolicyConfiguration: ContentKeyPolicyConfiguration, diff --git a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts index 20f265ef9557..369402392550 100644 --- a/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts +++ b/sdk/mediaservices/arm-mediaservices/src/models/parameters.ts @@ -147,7 +147,7 @@ export const nextLink: OperationURLParameter = { export const apiVersion1: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-11-01", + defaultValue: "2023-01-01", isConstant: true, serializedName: "api-version", type: { @@ -383,6 +383,18 @@ export const parameters15: OperationParameter = { mapper: StreamingLocatorMapper }; +export const apiVersion3: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-11-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const liveEventName: OperationURLParameter = { parameterPath: "liveEventName", mapper: { diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts index d505b03bb3c3..0922db52306c 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveEvents.ts @@ -20,6 +20,15 @@ import { LiveEventsListNextOptionalParams, LiveEventsListOptionalParams, LiveEventsListResponse, + LiveEventStatus, + LiveEventsListGetStatusOptionalParams, + LiveEventsListGetStatusResponse, + LiveEventStreamEvent, + LiveEventsListGetStreamEventsOptionalParams, + LiveEventsListGetStreamEventsResponse, + LiveEventTrackEvent, + LiveEventsListGetTrackIngestHeartbeatsOptionalParams, + LiveEventsListGetTrackIngestHeartbeatsResponse, LiveEventsGetOptionalParams, LiveEventsGetResponse, LiveEventsCreateOptionalParams, @@ -128,6 +137,231 @@ export class LiveEventsImpl implements LiveEvents { } } + /** + * Gets status telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + public beginListGetStatusAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStatusOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listGetStatusPagingAll( + resourceGroupName, + accountName, + liveEventName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listGetStatusPagingPage( + resourceGroupName, + accountName, + liveEventName, + options, + settings + ); + } + }; + } + + private async *listGetStatusPagingPage( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStatusOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: LiveEventsListGetStatusResponse; + const poller = await this._listGetStatus( + resourceGroupName, + accountName, + liveEventName, + options + ); + result = await poller.pollUntilDone(); + yield result.value || []; + } + + private async *listGetStatusPagingAll( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStatusOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listGetStatusPagingPage( + resourceGroupName, + accountName, + liveEventName, + options + )) { + yield* page; + } + } + + /** + * Get stream events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + public beginListGetStreamEventsAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStreamEventsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listGetStreamEventsPagingAll( + resourceGroupName, + accountName, + liveEventName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listGetStreamEventsPagingPage( + resourceGroupName, + accountName, + liveEventName, + options, + settings + ); + } + }; + } + + private async *listGetStreamEventsPagingPage( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStreamEventsOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: LiveEventsListGetStreamEventsResponse; + const poller = await this._listGetStreamEvents( + resourceGroupName, + accountName, + liveEventName, + options + ); + result = await poller.pollUntilDone(); + yield result.value || []; + } + + private async *listGetStreamEventsPagingAll( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStreamEventsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listGetStreamEventsPagingPage( + resourceGroupName, + accountName, + liveEventName, + options + )) { + yield* page; + } + } + + /** + * Get track ingest heartbeat events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + public beginListGetTrackIngestHeartbeatsAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listGetTrackIngestHeartbeatsPagingAll( + resourceGroupName, + accountName, + liveEventName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listGetTrackIngestHeartbeatsPagingPage( + resourceGroupName, + accountName, + liveEventName, + options, + settings + ); + } + }; + } + + private async *listGetTrackIngestHeartbeatsPagingPage( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams, + _settings?: PageSettings + ): AsyncIterableIterator { + let result: LiveEventsListGetTrackIngestHeartbeatsResponse; + const poller = await this._listGetTrackIngestHeartbeats( + resourceGroupName, + accountName, + liveEventName, + options + ); + result = await poller.pollUntilDone(); + yield result.value || []; + } + + private async *listGetTrackIngestHeartbeatsPagingAll( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listGetTrackIngestHeartbeatsPagingPage( + resourceGroupName, + accountName, + liveEventName, + options + )) { + yield* page; + } + } + /** * Lists all the live events in the account. * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -804,6 +1038,219 @@ export class LiveEventsImpl implements LiveEvents { return poller.pollUntilDone(); } + /** + * Gets status telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + private async _listGetStatus( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStatusOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LiveEventsListGetStatusResponse + > + > { + 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, liveEventName, options }, + listGetStatusOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get stream events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + private async _listGetStreamEvents( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStreamEventsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LiveEventsListGetStreamEventsResponse + > + > { + 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, liveEventName, options }, + listGetStreamEventsOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Get track ingest heartbeat events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + private async _listGetTrackIngestHeartbeats( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LiveEventsListGetTrackIngestHeartbeatsResponse + > + > { + 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, liveEventName, options }, + listGetTrackIngestHeartbeatsOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + /** * Get a live event operation status. * @param resourceGroupName The name of the resource group within the Azure subscription. @@ -878,7 +1325,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -900,7 +1347,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -933,7 +1380,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion, Parameters.autoStart], + queryParameters: [Parameters.apiVersion3, Parameters.autoStart], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -967,7 +1414,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -992,7 +1439,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1016,7 +1463,7 @@ const allocateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1040,7 +1487,7 @@ const startOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1065,7 +1512,7 @@ const stopOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1090,7 +1537,103 @@ const resetOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listGetStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStatus", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LiveEventGetStatusResult + }, + 201: { + bodyMapper: Mappers.LiveEventGetStatusResult + }, + 202: { + bodyMapper: Mappers.LiveEventGetStatusResult + }, + 204: { + bodyMapper: Mappers.LiveEventGetStatusResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listGetStreamEventsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getStreamEvents", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LiveEventGetStreamEventsResult + }, + 201: { + bodyMapper: Mappers.LiveEventGetStreamEventsResult + }, + 202: { + bodyMapper: Mappers.LiveEventGetStreamEventsResult + }, + 204: { + bodyMapper: Mappers.LiveEventGetStreamEventsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion3], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.liveEventName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listGetTrackIngestHeartbeatsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/liveEvents/{liveEventName}/getTrackIngestHeartbeats", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LiveEventGetTrackIngestHeartbeatsResult + }, + 201: { + bodyMapper: Mappers.LiveEventGetTrackIngestHeartbeatsResult + }, + 202: { + bodyMapper: Mappers.LiveEventGetTrackIngestHeartbeatsResult + }, + 204: { + bodyMapper: Mappers.LiveEventGetTrackIngestHeartbeatsResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1113,7 +1656,7 @@ const asyncOperationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1137,7 +1680,7 @@ const operationLocationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts index 6bd6c7742cb3..f0eba80084fd 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/liveOutputs.ts @@ -478,7 +478,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -501,7 +501,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -535,7 +535,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -561,7 +561,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -585,7 +585,7 @@ const asyncOperationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -609,7 +609,7 @@ const operationLocationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts index ab677fd3bc45..4ea103eb3b78 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operations/streamingEndpoints.ts @@ -829,7 +829,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -851,7 +851,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -884,7 +884,7 @@ const createOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion, Parameters.autoStart], + queryParameters: [Parameters.apiVersion3, Parameters.autoStart], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -918,7 +918,7 @@ const updateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -943,7 +943,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -966,7 +966,7 @@ const skusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -990,7 +990,7 @@ const startOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1014,7 +1014,7 @@ const stopOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1039,7 +1039,7 @@ const scaleOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1063,7 +1063,7 @@ const asyncOperationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1087,7 +1087,7 @@ const operationLocationOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts index 610dcbc60708..2925d7d6f61e 100644 --- a/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts +++ b/sdk/mediaservices/arm-mediaservices/src/operationsInterfaces/liveEvents.ts @@ -11,6 +11,12 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { LiveEvent, LiveEventsListOptionalParams, + LiveEventStatus, + LiveEventsListGetStatusOptionalParams, + LiveEventStreamEvent, + LiveEventsListGetStreamEventsOptionalParams, + LiveEventTrackEvent, + LiveEventsListGetTrackIngestHeartbeatsOptionalParams, LiveEventsGetOptionalParams, LiveEventsGetResponse, LiveEventsCreateOptionalParams, @@ -43,6 +49,45 @@ export interface LiveEvents { accountName: string, options?: LiveEventsListOptionalParams ): PagedAsyncIterableIterator; + /** + * Gets status telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + beginListGetStatusAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStatusOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get stream events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + beginListGetStreamEventsAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetStreamEventsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get track ingest heartbeat events telemetry of a live event. + * @param resourceGroupName The name of the resource group within the Azure subscription. + * @param accountName The Media Services account name. + * @param liveEventName The name of the live event, maximum length is 32. + * @param options The options parameters. + */ + beginListGetTrackIngestHeartbeatsAndWait( + resourceGroupName: string, + accountName: string, + liveEventName: string, + options?: LiveEventsListGetTrackIngestHeartbeatsOptionalParams + ): PagedAsyncIterableIterator; /** * Gets properties of a live event. * @param resourceGroupName The name of the resource group within the Azure subscription. diff --git a/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/mediaservices/arm-mediaservices/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + 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" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + 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 d8c4700a1028..3e6ae96443f3 100644 --- a/sdk/mediaservices/arm-mediaservices/tsconfig.json +++ b/sdk/mediaservices/arm-mediaservices/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-mediaservices": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"