import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { AzureFirewallFqdnTags } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { NetworkManagementClient } from "../networkManagementClient" ; import { AzureFirewallFqdnTag , AzureFirewallFqdnTagsListAllNextOptionalParams , AzureFirewallFqdnTagsListAllOptionalParams , AzureFirewallFqdnTagsListAllResponse , AzureFirewallFqdnTagsListAllNextResponse } from "../models" ; /** Class containing AzureFirewallFqdnTags operations. */ export class AzureFirewallFqdnTagsImpl implements AzureFirewallFqdnTags { private readonly client : NetworkManagementClient ; param client constructor ( client ) { this . client = client ; } param options public listAll ( options ? ) { const iter = this . listAllPagingAll ( options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listAllPagingPage ( options ) ; } } ; } private async * listAllPagingPage ( options ? ) { let result = await this . _listAll ( options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listAllNext ( continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listAllPagingAll ( options ? ) { for await ( const page of this . listAllPagingPage ( options ) ) { yield * page ; } } param options private _listAll ( options ? ) { return this . client . sendOperationRequest ( { options } , listAllOperationSpec ) ; } param nextLink param options private _listAllNext ( nextLink , options ? ) { return this . client . sendOperationRequest ( { nextLink , options } , listAllNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const listAllOperationSpec = { path : "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AzureFirewallFqdnTagListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId ] , headerParameters : [ Parameters . accept ] , serializer } ; const listAllNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . AzureFirewallFqdnTagListResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . subscriptionId , Parameters . nextLink ] , headerParameters : [ Parameters . accept ] , serializer } ;