/* * 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 { PrivateLinkResources } 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 { PrivateLinkResourcesListOptionalParams, PrivateLinkResourcesListResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse } from "../models"; /** Class containing PrivateLinkResources operations. */ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private readonly client: AzureMediaServices; /** * Initialize a new instance of the class PrivateLinkResources class. * @param client Reference to the service client */ constructor(client: AzureMediaServices) { this.client = client; } /** * List supported group IDs. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param options The options parameters. */ list( resourceGroupName: string, accountName: string, options?: PrivateLinkResourcesListOptionalParams ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, options }, listOperationSpec ); } /** * Get details of a group ID. * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param name * @param options The options parameters. */ get( resourceGroupName: string, accountName: string, name: string, options?: PrivateLinkResourcesGetOptionalParams ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, name, options }, getOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}/privateLinkResources", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PrivateLinkResourceListResult }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion1], 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}/privateLinkResources/{name}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PrivateLinkResource }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, Parameters.name ], headerParameters: [Parameters.accept], serializer };