import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { PrivateEndpointConnections } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { StorageManagementClient } from "../storageManagementClient" ; import { PrivateEndpointConnection , PrivateEndpointConnectionsListOptionalParams , PrivateEndpointConnectionsListResponse , PrivateEndpointConnectionsGetOptionalParams , PrivateEndpointConnectionsGetResponse , PrivateEndpointConnectionsPutOptionalParams , PrivateEndpointConnectionsPutResponse , PrivateEndpointConnectionsDeleteOptionalParams } from "../models" ; /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { private readonly client : StorageManagementClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param accountName param options public list ( resourceGroupName , accountName , options ? ) { const iter = this . listPagingAll ( resourceGroupName , accountName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listPagingPage ( resourceGroupName , accountName , options ) ; } } ; } private async * listPagingPage ( resourceGroupName , accountName , options ? ) { let result = await this . _list ( resourceGroupName , accountName , options ) ; yield result . value || [ ] ; } private async * listPagingAll ( resourceGroupName , accountName , options ? ) { for await ( const page of this . listPagingPage ( resourceGroupName , accountName , options ) ) { yield * page ; } } param resourceGroupName param accountName param options private _list ( resourceGroupName , accountName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , options } , listOperationSpec ) ; } param resourceGroupName param accountName param privateEndpointConnectionName param options get ( resourceGroupName , accountName , privateEndpointConnectionName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , privateEndpointConnectionName , options } , getOperationSpec ) ; } param resourceGroupName param accountName param privateEndpointConnectionName param properties param options put ( resourceGroupName , accountName , privateEndpointConnectionName , properties , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , privateEndpointConnectionName , properties , options } , putOperationSpec ) ; } param resourceGroupName param accountName param privateEndpointConnectionName param options delete ( resourceGroupName , accountName , privateEndpointConnectionName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , accountName , privateEndpointConnectionName , options } , deleteOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . PrivateEndpointConnectionListResult } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 ] , headerParameters : [ Parameters . accept ] , serializer } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . PrivateEndpointConnection } , default : { bodyMapper : Mappers . ErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . privateEndpointConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ; const putOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . PrivateEndpointConnection } , default : { bodyMapper : Mappers . ErrorResponse } } , requestBody : Parameters . properties2 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . privateEndpointConnectionName ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}" , httpMethod : "DELETE" , responses : { 200 : { } , 204 : { } , default : { bodyMapper : Mappers . ErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . accountName1 , Parameters . privateEndpointConnectionName ] , headerParameters : [ Parameters . accept ] , serializer } ;