import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { CertificateOrdersDiagnostics } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { WebSiteManagementClient } from "../webSiteManagementClient" ; import { DetectorResponse , CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseNextOptionalParams , CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseOptionalParams , CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseResponse , CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseOptionalParams , CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseResponse , CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseNextResponse } from "../models" ; /** Class containing CertificateOrdersDiagnostics operations. */ export class CertificateOrdersDiagnosticsImpl implements CertificateOrdersDiagnostics { private readonly client : WebSiteManagementClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param certificateOrderName param options public listAppServiceCertificateOrderDetectorResponse ( resourceGroupName , certificateOrderName , options ? ) { const iter = this . listAppServiceCertificateOrderDetectorResponsePagingAll ( resourceGroupName , certificateOrderName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listAppServiceCertificateOrderDetectorResponsePagingPage ( resourceGroupName , certificateOrderName , options ) ; } } ; } private async * listAppServiceCertificateOrderDetectorResponsePagingPage ( resourceGroupName , certificateOrderName , options ? ) { let result = await this . _listAppServiceCertificateOrderDetectorResponse ( resourceGroupName , certificateOrderName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listAppServiceCertificateOrderDetectorResponseNext ( resourceGroupName , certificateOrderName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listAppServiceCertificateOrderDetectorResponsePagingAll ( resourceGroupName , certificateOrderName , options ? ) { for await ( const page of this . listAppServiceCertificateOrderDetectorResponsePagingPage ( resourceGroupName , certificateOrderName , options ) ) { yield * page ; } } param resourceGroupName param certificateOrderName param options private _listAppServiceCertificateOrderDetectorResponse ( resourceGroupName , certificateOrderName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , certificateOrderName , options } , listAppServiceCertificateOrderDetectorResponseOperationSpec ) ; } param resourceGroupName param certificateOrderName param detectorName param options getAppServiceCertificateOrderDetectorResponse ( resourceGroupName , certificateOrderName , detectorName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , certificateOrderName , detectorName , options } , getAppServiceCertificateOrderDetectorResponseOperationSpec ) ; } param resourceGroupName param certificateOrderName param nextLink param options private _listAppServiceCertificateOrderDetectorResponseNext ( resourceGroupName , certificateOrderName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , certificateOrderName , nextLink , options } , listAppServiceCertificateOrderDetectorResponseNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const listAppServiceCertificateOrderDetectorResponseOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . DetectorResponseCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . certificateOrderName ] , headerParameters : [ Parameters . accept ] , serializer } ; const getAppServiceCertificateOrderDetectorResponseOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . DetectorResponse } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion , Parameters . startTime , Parameters . endTime , Parameters . timeGrain ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . certificateOrderName , Parameters . detectorName ] , headerParameters : [ Parameters . accept ] , serializer } ; const listAppServiceCertificateOrderDetectorResponseNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . DetectorResponseCollection } , default : { bodyMapper : Mappers . DefaultErrorResponse } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . resourceGroupName , Parameters . certificateOrderName , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ;