@azure/arm-hybridcontainerservice 1.0.1-alpha.20250718.1 → 1.0.1-alpha.20250730.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/hybridContainerServiceClient.js +64 -29
- package/dist/browser/hybridContainerServiceClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +67 -26
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/agentPoolOperations.js +45 -52
- package/dist/browser/operations/agentPoolOperations.js.map +1 -1
- package/dist/browser/operations/hybridIdentityMetadataOperations.js +34 -46
- package/dist/browser/operations/hybridIdentityMetadataOperations.js.map +1 -1
- package/dist/browser/operations/kubernetesVersions.js +23 -40
- package/dist/browser/operations/kubernetesVersions.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/provisionedClusterInstances.js +67 -64
- package/dist/browser/operations/provisionedClusterInstances.js.map +1 -1
- package/dist/browser/operations/vMSkus.js +23 -40
- package/dist/browser/operations/vMSkus.js.map +1 -1
- package/dist/browser/operations/virtualNetworks.js +78 -97
- package/dist/browser/operations/virtualNetworks.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/hybridContainerServiceClient.js +64 -29
- package/dist/commonjs/hybridContainerServiceClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +67 -26
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/agentPoolOperations.js +45 -51
- package/dist/commonjs/operations/agentPoolOperations.js.map +1 -1
- package/dist/commonjs/operations/hybridIdentityMetadataOperations.js +34 -45
- package/dist/commonjs/operations/hybridIdentityMetadataOperations.js.map +1 -1
- package/dist/commonjs/operations/kubernetesVersions.js +23 -39
- package/dist/commonjs/operations/kubernetesVersions.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/provisionedClusterInstances.js +67 -63
- package/dist/commonjs/operations/provisionedClusterInstances.js.map +1 -1
- package/dist/commonjs/operations/vMSkus.js +23 -39
- package/dist/commonjs/operations/vMSkus.js.map +1 -1
- package/dist/commonjs/operations/virtualNetworks.js +78 -96
- package/dist/commonjs/operations/virtualNetworks.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/hybridContainerServiceClient.js +64 -29
- package/dist/esm/hybridContainerServiceClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +67 -26
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/agentPoolOperations.js +45 -52
- package/dist/esm/operations/agentPoolOperations.js.map +1 -1
- package/dist/esm/operations/hybridIdentityMetadataOperations.js +34 -46
- package/dist/esm/operations/hybridIdentityMetadataOperations.js.map +1 -1
- package/dist/esm/operations/kubernetesVersions.js +23 -40
- package/dist/esm/operations/kubernetesVersions.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/provisionedClusterInstances.js +67 -64
- package/dist/esm/operations/provisionedClusterInstances.js.map +1 -1
- package/dist/esm/operations/vMSkus.js +23 -40
- package/dist/esm/operations/vMSkus.js.map +1 -1
- package/dist/esm/operations/virtualNetworks.js +78 -97
- package/dist/esm/operations/virtualNetworks.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/hybridContainerServiceClient.js +64 -29
- package/dist/react-native/hybridContainerServiceClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +67 -26
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/agentPoolOperations.js +45 -52
- package/dist/react-native/operations/agentPoolOperations.js.map +1 -1
- package/dist/react-native/operations/hybridIdentityMetadataOperations.js +34 -46
- package/dist/react-native/operations/hybridIdentityMetadataOperations.js.map +1 -1
- package/dist/react-native/operations/kubernetesVersions.js +23 -40
- package/dist/react-native/operations/kubernetesVersions.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/provisionedClusterInstances.js +67 -64
- package/dist/react-native/operations/provisionedClusterInstances.js.map +1 -1
- package/dist/react-native/operations/vMSkus.js +23 -40
- package/dist/react-native/operations/vMSkus.js.map +1 -1
- package/dist/react-native/operations/virtualNetworks.js +78 -97
- package/dist/react-native/operations/virtualNetworks.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentPoolOperations.js","sourceRoot":"","sources":["../../../src/operations/agentPoolOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,uDAAuD;AACvD,MAAa,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAC7B,2BAAmC,EACnC,OAAyD;QAEzD,MAAM,IAAI,GAAG,IAAI,CAAC,iCAAiC,CACjD,2BAA2B,EAC3B,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO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C,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,2BAA2B;QACtC,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,IAAI,EACF,0HAA0H;IAC5H,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACzE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,yCAAyC,GAA6B;IAC1E,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,2BAA2B;QACtC,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AgentPoolOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AgentPool,\n AgentPoolListByProvisionedClusterNextOptionalParams,\n AgentPoolListByProvisionedClusterOptionalParams,\n AgentPoolListByProvisionedClusterResponse,\n AgentPoolGetOptionalParams,\n AgentPoolGetResponse,\n AgentPoolCreateOrUpdateOptionalParams,\n AgentPoolCreateOrUpdateResponse,\n AgentPoolDeleteOptionalParams,\n AgentPoolDeleteResponse,\n AgentPoolListByProvisionedClusterNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AgentPoolOperations operations. */\nexport class AgentPoolOperationsImpl implements AgentPoolOperations {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class AgentPoolOperations class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of agent pools in the specified provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n public listByProvisionedCluster(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): PagedAsyncIterableIterator<AgentPool> {\n const iter = this.listByProvisionedClusterPagingAll(\n connectedClusterResourceUri,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByProvisionedClusterPagingPage(\n connectedClusterResourceUri,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByProvisionedClusterPagingPage(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<AgentPool[]> {\n let result: AgentPoolListByProvisionedClusterResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProvisionedCluster(\n connectedClusterResourceUri,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByProvisionedClusterNext(\n connectedClusterResourceUri,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByProvisionedClusterPagingAll(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): AsyncIterableIterator<AgentPool> {\n for await (const page of this.listByProvisionedClusterPagingPage(\n connectedClusterResourceUri,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n get(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolGetOptionalParams\n ): Promise<AgentPoolGetResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, agentPoolName, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates the agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param agentPool Agent Pool resource definition\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n agentPool: AgentPool,\n options?: AgentPoolCreateOrUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<AgentPoolCreateOrUpdateResponse>,\n AgentPoolCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<AgentPoolCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, agentPoolName, agentPool, options },\n spec: createOrUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n AgentPoolCreateOrUpdateResponse,\n OperationState<AgentPoolCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates the agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param agentPool Agent Pool resource definition\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n agentPool: AgentPool,\n options?: AgentPoolCreateOrUpdateOptionalParams\n ): Promise<AgentPoolCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n connectedClusterResourceUri,\n agentPoolName,\n agentPool,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n async beginDelete(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolDeleteOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<AgentPoolDeleteResponse>,\n AgentPoolDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<AgentPoolDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, agentPoolName, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<\n AgentPoolDeleteResponse,\n OperationState<AgentPoolDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolDeleteOptionalParams\n ): Promise<AgentPoolDeleteResponse> {\n const poller = await this.beginDelete(\n connectedClusterResourceUri,\n agentPoolName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the list of agent pools in the specified provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n private _listByProvisionedCluster(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): Promise<AgentPoolListByProvisionedClusterResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n listByProvisionedClusterOperationSpec\n );\n }\n\n /**\n * ListByProvisionedClusterNext\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param nextLink The nextLink from the previous successful call to the ListByProvisionedCluster\n * method.\n * @param options The options parameters.\n */\n private _listByProvisionedClusterNext(\n connectedClusterResourceUri: string,\n nextLink: string,\n options?: AgentPoolListByProvisionedClusterNextOptionalParams\n ): Promise<AgentPoolListByProvisionedClusterNextResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, nextLink, options },\n listByProvisionedClusterNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPool\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPool\n },\n 201: {\n bodyMapper: Mappers.AgentPool\n },\n 202: {\n bodyMapper: Mappers.AgentPool\n },\n 204: {\n bodyMapper: Mappers.AgentPool\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.agentPool,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 201: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 202: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 204: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByProvisionedClusterOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPoolListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByProvisionedClusterNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPoolListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"agentPoolOperations.js","sourceRoot":"","sources":["../../../src/operations/agentPoolOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,uDAAuD;AACvD,MAAa,uBAAuB;IACjB,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAC7B,2BAAmC,EACnC,OAAyD;QAEzD,MAAM,IAAI,GAAG,IAAI,CAAC,iCAAiC,CACjD,2BAA2B,EAC3B,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,kCAAkC,CAC5C,2BAA2B,EAC3B,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;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E,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,2BAA2B;QACtC,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AgentPoolOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AgentPool,\n AgentPoolListByProvisionedClusterNextOptionalParams,\n AgentPoolListByProvisionedClusterOptionalParams,\n AgentPoolListByProvisionedClusterResponse,\n AgentPoolGetOptionalParams,\n AgentPoolGetResponse,\n AgentPoolCreateOrUpdateOptionalParams,\n AgentPoolCreateOrUpdateResponse,\n AgentPoolDeleteOptionalParams,\n AgentPoolDeleteResponse,\n AgentPoolListByProvisionedClusterNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AgentPoolOperations operations. */\nexport class AgentPoolOperationsImpl implements AgentPoolOperations {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class AgentPoolOperations class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of agent pools in the specified provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n public listByProvisionedCluster(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): PagedAsyncIterableIterator<AgentPool> {\n const iter = this.listByProvisionedClusterPagingAll(\n connectedClusterResourceUri,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByProvisionedClusterPagingPage(\n connectedClusterResourceUri,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByProvisionedClusterPagingPage(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<AgentPool[]> {\n let result: AgentPoolListByProvisionedClusterResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProvisionedCluster(\n connectedClusterResourceUri,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByProvisionedClusterNext(\n connectedClusterResourceUri,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByProvisionedClusterPagingAll(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): AsyncIterableIterator<AgentPool> {\n for await (const page of this.listByProvisionedClusterPagingPage(\n connectedClusterResourceUri,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n get(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolGetOptionalParams\n ): Promise<AgentPoolGetResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, agentPoolName, options },\n getOperationSpec\n );\n }\n\n /**\n * Creates or updates the agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param agentPool Agent Pool resource definition\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n agentPool: AgentPool,\n options?: AgentPoolCreateOrUpdateOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<AgentPoolCreateOrUpdateResponse>,\n AgentPoolCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<AgentPoolCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, agentPoolName, agentPool, options },\n spec: createOrUpdateOperationSpec\n });\n const poller = await createHttpPoller<\n AgentPoolCreateOrUpdateResponse,\n OperationState<AgentPoolCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates or updates the agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param agentPool Agent Pool resource definition\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n agentPool: AgentPool,\n options?: AgentPoolCreateOrUpdateOptionalParams\n ): Promise<AgentPoolCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n connectedClusterResourceUri,\n agentPoolName,\n agentPool,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n async beginDelete(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolDeleteOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<AgentPoolDeleteResponse>,\n AgentPoolDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<AgentPoolDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, agentPoolName, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<\n AgentPoolDeleteResponse,\n OperationState<AgentPoolDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the specified agent pool in the provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param agentPoolName Parameter for the name of the agent pool in the provisioned cluster.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n connectedClusterResourceUri: string,\n agentPoolName: string,\n options?: AgentPoolDeleteOptionalParams\n ): Promise<AgentPoolDeleteResponse> {\n const poller = await this.beginDelete(\n connectedClusterResourceUri,\n agentPoolName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets the list of agent pools in the specified provisioned cluster\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n private _listByProvisionedCluster(\n connectedClusterResourceUri: string,\n options?: AgentPoolListByProvisionedClusterOptionalParams\n ): Promise<AgentPoolListByProvisionedClusterResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n listByProvisionedClusterOperationSpec\n );\n }\n\n /**\n * ListByProvisionedClusterNext\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param nextLink The nextLink from the previous successful call to the ListByProvisionedCluster\n * method.\n * @param options The options parameters.\n */\n private _listByProvisionedClusterNext(\n connectedClusterResourceUri: string,\n nextLink: string,\n options?: AgentPoolListByProvisionedClusterNextOptionalParams\n ): Promise<AgentPoolListByProvisionedClusterNextResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, nextLink, options },\n listByProvisionedClusterNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPool\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPool\n },\n 201: {\n bodyMapper: Mappers.AgentPool\n },\n 202: {\n bodyMapper: Mappers.AgentPool\n },\n 204: {\n bodyMapper: Mappers.AgentPool\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.agentPool,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 201: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 202: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n 204: {\n headersMapper: Mappers.AgentPoolDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.agentPoolName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByProvisionedClusterOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPoolListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByProvisionedClusterNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AgentPoolListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing HybridIdentityMetadataOperations operations. */
|
|
20
20
|
class HybridIdentityMetadataOperationsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class HybridIdentityMetadataOperations class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -41,52 +42,35 @@ class HybridIdentityMetadataOperationsImpl {
|
|
|
41
42
|
return this;
|
|
42
43
|
},
|
|
43
44
|
byPage: (settings) => {
|
|
44
|
-
if (settings
|
|
45
|
+
if (settings?.maxPageSize) {
|
|
45
46
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
46
47
|
}
|
|
47
48
|
return this.listByClusterPagingPage(connectedClusterResourceUri, options, settings);
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
listByClusterPagingPage(connectedClusterResourceUri, options, settings) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
});
|
|
52
|
+
async *listByClusterPagingPage(connectedClusterResourceUri, options, settings) {
|
|
53
|
+
let result;
|
|
54
|
+
let continuationToken = settings?.continuationToken;
|
|
55
|
+
if (!continuationToken) {
|
|
56
|
+
result = await this._listByCluster(connectedClusterResourceUri, options);
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
60
|
+
yield page;
|
|
61
|
+
}
|
|
62
|
+
while (continuationToken) {
|
|
63
|
+
result = await this._listByClusterNext(connectedClusterResourceUri, continuationToken, options);
|
|
64
|
+
continuationToken = result.nextLink;
|
|
65
|
+
let page = result.value || [];
|
|
66
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
67
|
+
yield page;
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
listByClusterPagingAll(connectedClusterResourceUri, options) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByClusterPagingPage(connectedClusterResourceUri, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
76
|
-
_c = _f.value;
|
|
77
|
-
_d = false;
|
|
78
|
-
const page = _c;
|
|
79
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
});
|
|
70
|
+
async *listByClusterPagingAll(connectedClusterResourceUri, options) {
|
|
71
|
+
for await (const page of this.listByClusterPagingPage(connectedClusterResourceUri, options)) {
|
|
72
|
+
yield* page;
|
|
73
|
+
}
|
|
90
74
|
}
|
|
91
75
|
/**
|
|
92
76
|
* Creates the hybrid identity metadata proxy resource that facilitates the managed identity
|
|
@@ -119,14 +103,19 @@ class HybridIdentityMetadataOperationsImpl {
|
|
|
119
103
|
return this.client.sendOperationRequest(args, spec);
|
|
120
104
|
};
|
|
121
105
|
const sendOperationFn = async (args, spec) => {
|
|
122
|
-
var _a;
|
|
123
106
|
let currentRawResponse = undefined;
|
|
124
|
-
const providedCallback =
|
|
107
|
+
const providedCallback = args.options?.onResponse;
|
|
125
108
|
const callback = (rawResponse, flatResponse) => {
|
|
126
109
|
currentRawResponse = rawResponse;
|
|
127
|
-
providedCallback
|
|
110
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
111
|
+
};
|
|
112
|
+
const updatedArgs = {
|
|
113
|
+
...args,
|
|
114
|
+
options: {
|
|
115
|
+
...args.options,
|
|
116
|
+
onResponse: callback
|
|
117
|
+
}
|
|
128
118
|
};
|
|
129
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
130
119
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
131
120
|
return {
|
|
132
121
|
flatResponse,
|
|
@@ -143,8 +132,8 @@ class HybridIdentityMetadataOperationsImpl {
|
|
|
143
132
|
spec: deleteOperationSpec
|
|
144
133
|
});
|
|
145
134
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
146
|
-
restoreFrom: options
|
|
147
|
-
intervalInMs: options
|
|
135
|
+
restoreFrom: options?.resumeFrom,
|
|
136
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
148
137
|
resourceLocationConfig: "azure-async-operation"
|
|
149
138
|
});
|
|
150
139
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybridIdentityMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/hybridIdentityMetadataOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,oEAAoE;AACpE,MAAa,oCAAoC;IAI/C;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAClB,2BAAmC,EACnC,OAA2D;QAE3D,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,2BAA2B,EAC3B,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,uBAAuB,CACjC,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AC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { HybridIdentityMetadataOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n HybridIdentityMetadata,\n HybridIdentityMetadataListByClusterNextOptionalParams,\n HybridIdentityMetadataListByClusterOptionalParams,\n HybridIdentityMetadataListByClusterResponse,\n HybridIdentityMetadataPutOptionalParams,\n HybridIdentityMetadataPutResponse,\n HybridIdentityMetadataGetOptionalParams,\n HybridIdentityMetadataGetResponse,\n HybridIdentityMetadataDeleteOptionalParams,\n HybridIdentityMetadataDeleteResponse,\n HybridIdentityMetadataListByClusterNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing HybridIdentityMetadataOperations operations. */\nexport class HybridIdentityMetadataOperationsImpl\n implements HybridIdentityMetadataOperations {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class HybridIdentityMetadataOperations class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n public listByCluster(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): PagedAsyncIterableIterator<HybridIdentityMetadata> {\n const iter = this.listByClusterPagingAll(\n connectedClusterResourceUri,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByClusterPagingPage(\n connectedClusterResourceUri,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByClusterPagingPage(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<HybridIdentityMetadata[]> {\n let result: HybridIdentityMetadataListByClusterResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByCluster(connectedClusterResourceUri, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByClusterNext(\n connectedClusterResourceUri,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByClusterPagingAll(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): AsyncIterableIterator<HybridIdentityMetadata> {\n for await (const page of this.listByClusterPagingPage(\n connectedClusterResourceUri,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates the hybrid identity metadata proxy resource that facilitates the managed identity\n * provisioning.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param body Hybrid Identity Metadata resource definition\n * @param options The options parameters.\n */\n put(\n connectedClusterResourceUri: string,\n body: HybridIdentityMetadata,\n options?: HybridIdentityMetadataPutOptionalParams\n ): Promise<HybridIdentityMetadataPutResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, body, options },\n putOperationSpec\n );\n }\n\n /**\n * Get the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n get(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataGetOptionalParams\n ): Promise<HybridIdentityMetadataGetResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n async beginDelete(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataDeleteOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<HybridIdentityMetadataDeleteResponse>,\n HybridIdentityMetadataDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<HybridIdentityMetadataDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<\n HybridIdentityMetadataDeleteResponse,\n OperationState<HybridIdentityMetadataDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataDeleteOptionalParams\n ): Promise<HybridIdentityMetadataDeleteResponse> {\n const poller = await this.beginDelete(connectedClusterResourceUri, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n private _listByCluster(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): Promise<HybridIdentityMetadataListByClusterResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n listByClusterOperationSpec\n );\n }\n\n /**\n * ListByClusterNext\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param nextLink The nextLink from the previous successful call to the ListByCluster method.\n * @param options The options parameters.\n */\n private _listByClusterNext(\n connectedClusterResourceUri: string,\n nextLink: string,\n options?: HybridIdentityMetadataListByClusterNextOptionalParams\n ): Promise<HybridIdentityMetadataListByClusterNextResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, nextLink, options },\n listByClusterNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst putOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n 201: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 201: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 202: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 204: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByClusterOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadataList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByClusterNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadataList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"hybridIdentityMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/hybridIdentityMetadataOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAe9C,4CAA4C;AAC5C,oEAAoE;AACpE,MAAa,oCAAoC;IAE9B,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAClB,2BAAmC,EACnC,OAA2D;QAE3D,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,2BAA2B,EAC3B,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,uBAAuB,CACjC,2BAA2B,EAC3B,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CA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E;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACzE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,sIAAsI;IACxI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACzE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,8BAA8B,GAA6B;IAC/D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,2BAA2B;QACtC,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { HybridIdentityMetadataOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n HybridIdentityMetadata,\n HybridIdentityMetadataListByClusterNextOptionalParams,\n HybridIdentityMetadataListByClusterOptionalParams,\n HybridIdentityMetadataListByClusterResponse,\n HybridIdentityMetadataPutOptionalParams,\n HybridIdentityMetadataPutResponse,\n HybridIdentityMetadataGetOptionalParams,\n HybridIdentityMetadataGetResponse,\n HybridIdentityMetadataDeleteOptionalParams,\n HybridIdentityMetadataDeleteResponse,\n HybridIdentityMetadataListByClusterNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing HybridIdentityMetadataOperations operations. */\nexport class HybridIdentityMetadataOperationsImpl\n implements HybridIdentityMetadataOperations {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class HybridIdentityMetadataOperations class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n public listByCluster(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): PagedAsyncIterableIterator<HybridIdentityMetadata> {\n const iter = this.listByClusterPagingAll(\n connectedClusterResourceUri,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByClusterPagingPage(\n connectedClusterResourceUri,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByClusterPagingPage(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<HybridIdentityMetadata[]> {\n let result: HybridIdentityMetadataListByClusterResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByCluster(connectedClusterResourceUri, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByClusterNext(\n connectedClusterResourceUri,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByClusterPagingAll(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): AsyncIterableIterator<HybridIdentityMetadata> {\n for await (const page of this.listByClusterPagingPage(\n connectedClusterResourceUri,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates the hybrid identity metadata proxy resource that facilitates the managed identity\n * provisioning.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param body Hybrid Identity Metadata resource definition\n * @param options The options parameters.\n */\n put(\n connectedClusterResourceUri: string,\n body: HybridIdentityMetadata,\n options?: HybridIdentityMetadataPutOptionalParams\n ): Promise<HybridIdentityMetadataPutResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, body, options },\n putOperationSpec\n );\n }\n\n /**\n * Get the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n get(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataGetOptionalParams\n ): Promise<HybridIdentityMetadataGetResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n async beginDelete(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataDeleteOptionalParams\n ): Promise<\n SimplePollerLike<\n OperationState<HybridIdentityMetadataDeleteResponse>,\n HybridIdentityMetadataDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<HybridIdentityMetadataDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { connectedClusterResourceUri, options },\n spec: deleteOperationSpec\n });\n const poller = await createHttpPoller<\n HybridIdentityMetadataDeleteResponse,\n OperationState<HybridIdentityMetadataDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes the hybrid identity metadata proxy resource.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataDeleteOptionalParams\n ): Promise<HybridIdentityMetadataDeleteResponse> {\n const poller = await this.beginDelete(connectedClusterResourceUri, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Lists the hybrid identity metadata proxy resource in a provisioned cluster instance.\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param options The options parameters.\n */\n private _listByCluster(\n connectedClusterResourceUri: string,\n options?: HybridIdentityMetadataListByClusterOptionalParams\n ): Promise<HybridIdentityMetadataListByClusterResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, options },\n listByClusterOperationSpec\n );\n }\n\n /**\n * ListByClusterNext\n * @param connectedClusterResourceUri The fully qualified Azure Resource Manager identifier of the\n * connected cluster resource.\n * @param nextLink The nextLink from the previous successful call to the ListByCluster method.\n * @param options The options parameters.\n */\n private _listByClusterNext(\n connectedClusterResourceUri: string,\n nextLink: string,\n options?: HybridIdentityMetadataListByClusterNextOptionalParams\n ): Promise<HybridIdentityMetadataListByClusterNextResponse> {\n return this.client.sendOperationRequest(\n { connectedClusterResourceUri, nextLink, options },\n listByClusterNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst putOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n 201: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata/default\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 201: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 202: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n 204: {\n headersMapper: Mappers.HybridIdentityMetadataDeleteHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByClusterOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/hybridIdentityMetadata\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadataList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.connectedClusterResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByClusterNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HybridIdentityMetadataList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.connectedClusterResourceUri,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing KubernetesVersions operations. */
|
|
18
18
|
class KubernetesVersionsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class KubernetesVersions class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -39,52 +40,35 @@ class KubernetesVersionsImpl {
|
|
|
39
40
|
return this;
|
|
40
41
|
},
|
|
41
42
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
43
|
+
if (settings?.maxPageSize) {
|
|
43
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
45
|
}
|
|
45
46
|
return this.listPagingPage(customLocationResourceUri, options, settings);
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
listPagingPage(customLocationResourceUri, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
50
|
+
async *listPagingPage(customLocationResourceUri, options, settings) {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings?.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = await this._list(customLocationResourceUri, options);
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield page;
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = await this._listNext(customLocationResourceUri, continuationToken, options);
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
68
67
|
}
|
|
69
|
-
listPagingAll(customLocationResourceUri, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(customLocationResourceUri, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
68
|
+
async *listPagingAll(customLocationResourceUri, options) {
|
|
69
|
+
for await (const page of this.listPagingPage(customLocationResourceUri, options)) {
|
|
70
|
+
yield* page;
|
|
71
|
+
}
|
|
88
72
|
}
|
|
89
73
|
/**
|
|
90
74
|
* Lists the supported kubernetes versions for the specified custom location
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kubernetesVersions.js","sourceRoot":"","sources":["../../../src/operations/kubernetesVersions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"kubernetesVersions.js","sourceRoot":"","sources":["../../../src/operations/kubernetesVersions.ts"],"names":[],"mapp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AE,OAAO,CAAC,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,yBAAyB,CAAC;IACvE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,4BAA4B;SACjD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,yBAAyB;KACrC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { KubernetesVersions } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n KubernetesVersionProfile,\n KubernetesVersionsListNextOptionalParams,\n KubernetesVersionsListOptionalParams,\n KubernetesVersionsListResponse,\n KubernetesVersionsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing KubernetesVersions operations. */\nexport class KubernetesVersionsImpl implements KubernetesVersions {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class KubernetesVersions class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Lists the supported kubernetes versions for the specified custom location\n * @param customLocationResourceUri The fully qualified Azure Resource Manager identifier of the custom\n * location resource.\n * @param options The options parameters.\n */\n public list(\n customLocationResourceUri: string,\n options?: KubernetesVersionsListOptionalParams\n ): PagedAsyncIterableIterator<KubernetesVersionProfile> {\n const iter = this.listPagingAll(customLocationResourceUri, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n customLocationResourceUri,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n customLocationResourceUri: string,\n options?: KubernetesVersionsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<KubernetesVersionProfile[]> {\n let result: KubernetesVersionsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(customLocationResourceUri, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n customLocationResourceUri,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n customLocationResourceUri: string,\n options?: KubernetesVersionsListOptionalParams\n ): AsyncIterableIterator<KubernetesVersionProfile> {\n for await (const page of this.listPagingPage(\n customLocationResourceUri,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists the supported kubernetes versions for the specified custom location\n * @param customLocationResourceUri The fully qualified Azure Resource Manager identifier of the custom\n * location resource.\n * @param options The options parameters.\n */\n private _list(\n customLocationResourceUri: string,\n options?: KubernetesVersionsListOptionalParams\n ): Promise<KubernetesVersionsListResponse> {\n return this.client.sendOperationRequest(\n { customLocationResourceUri, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param customLocationResourceUri The fully qualified Azure Resource Manager identifier of the custom\n * location resource.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n customLocationResourceUri: string,\n nextLink: string,\n options?: KubernetesVersionsListNextOptionalParams\n ): Promise<KubernetesVersionsListNextResponse> {\n return this.client.sendOperationRequest(\n { customLocationResourceUri, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{customLocationResourceUri}/providers/Microsoft.HybridContainerService/kubernetesVersions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KubernetesVersionProfileList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.customLocationResourceUri],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KubernetesVersionProfileList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.customLocationResourceUri\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing Operations operations. */
|
|
18
18
|
class OperationsImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class Operations class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -37,52 +38,35 @@ class OperationsImpl {
|
|
|
37
38
|
return this;
|
|
38
39
|
},
|
|
39
40
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
43
|
}
|
|
43
44
|
return this.listPagingPage(options, settings);
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
listPagingPage(options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
48
|
+
async *listPagingPage(options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
66
65
|
}
|
|
67
|
-
listPagingAll(options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
66
|
+
async *listPagingAll(options) {
|
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
86
70
|
}
|
|
87
71
|
/**
|
|
88
72
|
* Lists the supported operations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,C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ed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { HybridContainerServiceClient } from \"../hybridContainerServiceClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: HybridContainerServiceClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: HybridContainerServiceClient) {\n this.client = client;\n }\n\n /**\n * Lists the supported operations\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists the supported operations\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.HybridContainerService/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|