/*
* 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, PageSettings } from "@azure/core-paging";
import { setContinuationToken } from "../pagingHelper";
import { StreamingEndpoints } 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 {
StreamingEndpoint,
StreamingEndpointsListNextOptionalParams,
StreamingEndpointsListOptionalParams,
StreamingEndpointsListResponse,
StreamingEndpointsGetOptionalParams,
StreamingEndpointsGetResponse,
StreamingEndpointsCreateOptionalParams,
StreamingEndpointsCreateResponse,
StreamingEndpointsUpdateOptionalParams,
StreamingEndpointsUpdateResponse,
StreamingEndpointsDeleteOptionalParams,
StreamingEndpointsSkusOptionalParams,
StreamingEndpointsSkusResponse,
StreamingEndpointsStartOptionalParams,
StreamingEndpointsStopOptionalParams,
StreamingEntityScaleUnit,
StreamingEndpointsScaleOptionalParams,
StreamingEndpointsAsyncOperationOptionalParams,
StreamingEndpointsAsyncOperationResponse,
StreamingEndpointsOperationLocationOptionalParams,
StreamingEndpointsOperationLocationResponse,
StreamingEndpointsListNextResponse
} from "../models";
///
/** Class containing StreamingEndpoints operations. */
export class StreamingEndpointsImpl implements StreamingEndpoints {
private readonly client: AzureMediaServices;
/**
* Initialize a new instance of the class StreamingEndpoints class.
* @param client Reference to the service client
*/
constructor(client: AzureMediaServices) {
this.client = client;
}
/**
* Lists the streaming endpoints in the account.
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param options The options parameters.
*/
public list(
resourceGroupName: string,
accountName: string,
options?: StreamingEndpointsListOptionalParams
): PagedAsyncIterableIterator {
const iter = this.listPagingAll(resourceGroupName, accountName, 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.listPagingPage(
resourceGroupName,
accountName,
options,
settings
);
}
};
}
private async *listPagingPage(
resourceGroupName: string,
accountName: string,
options?: StreamingEndpointsListOptionalParams,
settings?: PageSettings
): AsyncIterableIterator {
let result: StreamingEndpointsListResponse;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._list(resourceGroupName, accountName, options);
let page = result.value || [];
continuationToken = result.odataNextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listNext(
resourceGroupName,
accountName,
continuationToken,
options
);
continuationToken = result.odataNextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
private async *listPagingAll(
resourceGroupName: string,
accountName: string,
options?: StreamingEndpointsListOptionalParams
): AsyncIterableIterator {
for await (const page of this.listPagingPage(
resourceGroupName,
accountName,
options
)) {
yield* page;
}
}
/**
* Lists the streaming endpoints in the account.
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param options The options parameters.
*/
private _list(
resourceGroupName: string,
accountName: string,
options?: StreamingEndpointsListOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, accountName, options },
listOperationSpec
);
}
/**
* Gets a streaming endpoint.
* @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.
*/
get(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsGetOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, accountName, streamingEndpointName, options },
getOperationSpec
);
}
/**
* Creates a streaming endpoint.
* @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 parameters Streaming endpoint properties needed for creation.
* @param options The options parameters.
*/
async beginCreate(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEndpoint,
options?: StreamingEndpointsCreateOptionalParams
): Promise<
PollerLike<
PollOperationState,
StreamingEndpointsCreateResponse
>
> {
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,
streamingEndpointName,
parameters,
options
},
createOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Creates a streaming endpoint.
* @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 parameters Streaming endpoint properties needed for creation.
* @param options The options parameters.
*/
async beginCreateAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEndpoint,
options?: StreamingEndpointsCreateOptionalParams
): Promise {
const poller = await this.beginCreate(
resourceGroupName,
accountName,
streamingEndpointName,
parameters,
options
);
return poller.pollUntilDone();
}
/**
* Updates a existing streaming endpoint.
* @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 parameters Streaming endpoint properties needed for creation.
* @param options The options parameters.
*/
async beginUpdate(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEndpoint,
options?: StreamingEndpointsUpdateOptionalParams
): Promise<
PollerLike<
PollOperationState,
StreamingEndpointsUpdateResponse
>
> {
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,
streamingEndpointName,
parameters,
options
},
updateOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Updates a existing streaming endpoint.
* @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 parameters Streaming endpoint properties needed for creation.
* @param options The options parameters.
*/
async beginUpdateAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEndpoint,
options?: StreamingEndpointsUpdateOptionalParams
): Promise {
const poller = await this.beginUpdate(
resourceGroupName,
accountName,
streamingEndpointName,
parameters,
options
);
return poller.pollUntilDone();
}
/**
* Deletes a streaming endpoint.
* @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.
*/
async beginDelete(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsDeleteOptionalParams
): Promise, void>> {
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, streamingEndpointName, options },
deleteOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Deletes a streaming endpoint.
* @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.
*/
async beginDeleteAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsDeleteOptionalParams
): Promise {
const poller = await this.beginDelete(
resourceGroupName,
accountName,
streamingEndpointName,
options
);
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.
* @param accountName The Media Services account name.
* @param streamingEndpointName The name of the streaming endpoint, maximum length is 24.
* @param options The options parameters.
*/
async beginStart(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsStartOptionalParams
): Promise, void>> {
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, streamingEndpointName, options },
startOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Starts an existing streaming endpoint.
* @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.
*/
async beginStartAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsStartOptionalParams
): Promise {
const poller = await this.beginStart(
resourceGroupName,
accountName,
streamingEndpointName,
options
);
return poller.pollUntilDone();
}
/**
* Stops an existing streaming endpoint.
* @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.
*/
async beginStop(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsStopOptionalParams
): Promise, void>> {
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, streamingEndpointName, options },
stopOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Stops an existing streaming endpoint.
* @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.
*/
async beginStopAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
options?: StreamingEndpointsStopOptionalParams
): Promise {
const poller = await this.beginStop(
resourceGroupName,
accountName,
streamingEndpointName,
options
);
return poller.pollUntilDone();
}
/**
* Scales an existing streaming endpoint.
* @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 parameters Streaming endpoint scale parameters
* @param options The options parameters.
*/
async beginScale(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEntityScaleUnit,
options?: StreamingEndpointsScaleOptionalParams
): Promise, void>> {
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,
streamingEndpointName,
parameters,
options
},
scaleOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Scales an existing streaming endpoint.
* @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 parameters Streaming endpoint scale parameters
* @param options The options parameters.
*/
async beginScaleAndWait(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
parameters: StreamingEntityScaleUnit,
options?: StreamingEndpointsScaleOptionalParams
): Promise {
const poller = await this.beginScale(
resourceGroupName,
accountName,
streamingEndpointName,
parameters,
options
);
return poller.pollUntilDone();
}
/**
* Get a streaming endpoint operation status.
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param operationId The ID of an ongoing async operation.
* @param options The options parameters.
*/
asyncOperation(
resourceGroupName: string,
accountName: string,
operationId: string,
options?: StreamingEndpointsAsyncOperationOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, accountName, operationId, options },
asyncOperationOperationSpec
);
}
/**
* Get a streaming endpoint operation status.
* @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 operationId The ID of an ongoing async operation.
* @param options The options parameters.
*/
operationLocation(
resourceGroupName: string,
accountName: string,
streamingEndpointName: string,
operationId: string,
options?: StreamingEndpointsOperationLocationOptionalParams
): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
accountName,
streamingEndpointName,
operationId,
options
},
operationLocationOperationSpec
);
}
/**
* ListNext
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext(
resourceGroupName: string,
accountName: string,
nextLink: string,
options?: StreamingEndpointsListNextOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, accountName, nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpointListResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName
],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpoint
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept],
serializer
};
const createOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpoint
},
201: {
bodyMapper: Mappers.StreamingEndpoint
},
202: {
bodyMapper: Mappers.StreamingEndpoint
},
204: {
bodyMapper: Mappers.StreamingEndpoint
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
requestBody: Parameters.parameters19,
queryParameters: [Parameters.apiVersion, Parameters.autoStart],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const updateOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpoint
},
201: {
bodyMapper: Mappers.StreamingEndpoint
},
202: {
bodyMapper: Mappers.StreamingEndpoint
},
204: {
bodyMapper: Mappers.StreamingEndpoint
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
requestBody: Parameters.parameters19,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}",
httpMethod: "DELETE",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
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",
httpMethod: "POST",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept],
serializer
};
const stopOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/stop",
httpMethod: "POST",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept],
serializer
};
const scaleOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/scale",
httpMethod: "POST",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
requestBody: Parameters.parameters20,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const asyncOperationOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpointOperations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AsyncOperationResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.operationId1
],
headerParameters: [Parameters.accept],
serializer
};
const operationLocationOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/streamingEndpoints/{streamingEndpointName}/operationLocations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpoint
},
202: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.operationId1,
Parameters.streamingEndpointName
],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.StreamingEndpointListResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.nextLink
],
headerParameters: [Parameters.accept],
serializer
};