@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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAe9C,4CAA4C;AAC5C,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,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aAAa,EAAE,OAAO,CAAC,sBAAsB;SAC9C;QACD,GAAG,EAAE;YACH,aAAa,EAAE,OAAO,CAAC,sBAAsB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,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,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAe9C,4CAA4C;AAC5C,uDAAuD;AACvD,MAAM,OAAO,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,C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ACxC;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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing HybridIdentityMetadataOperations operations. */
|
|
17
16
|
export class HybridIdentityMetadataOperationsImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class HybridIdentityMetadataOperations class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class HybridIdentityMetadataOperationsImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listByClusterPagingPage(connectedClusterResourceUri, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listByClusterPagingPage(connectedClusterResourceUri, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listByClusterPagingPage(connectedClusterResourceUri, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listByCluster(connectedClusterResourceUri, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listByClusterNext(connectedClusterResourceUri, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listByClusterPagingAll(connectedClusterResourceUri, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByClusterPagingPage(connectedClusterResourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listByClusterPagingAll(connectedClusterResourceUri, options) {
|
|
67
|
+
for await (const page of this.listByClusterPagingPage(connectedClusterResourceUri, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Creates the hybrid identity metadata proxy resource that facilitates the managed identity
|
|
@@ -116,14 +99,19 @@ export class HybridIdentityMetadataOperationsImpl {
|
|
|
116
99
|
return this.client.sendOperationRequest(args, spec);
|
|
117
100
|
};
|
|
118
101
|
const sendOperationFn = async (args, spec) => {
|
|
119
|
-
var _a;
|
|
120
102
|
let currentRawResponse = undefined;
|
|
121
|
-
const providedCallback =
|
|
103
|
+
const providedCallback = args.options?.onResponse;
|
|
122
104
|
const callback = (rawResponse, flatResponse) => {
|
|
123
105
|
currentRawResponse = rawResponse;
|
|
124
|
-
providedCallback
|
|
106
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
107
|
+
};
|
|
108
|
+
const updatedArgs = {
|
|
109
|
+
...args,
|
|
110
|
+
options: {
|
|
111
|
+
...args.options,
|
|
112
|
+
onResponse: callback
|
|
113
|
+
}
|
|
125
114
|
};
|
|
126
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
127
115
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
128
116
|
return {
|
|
129
117
|
flatResponse,
|
|
@@ -140,8 +128,8 @@ export class HybridIdentityMetadataOperationsImpl {
|
|
|
140
128
|
spec: deleteOperationSpec
|
|
141
129
|
});
|
|
142
130
|
const poller = await createHttpPoller(lro, {
|
|
143
|
-
restoreFrom: options
|
|
144
|
-
intervalInMs: options
|
|
131
|
+
restoreFrom: options?.resumeFrom,
|
|
132
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
145
133
|
resourceLocationConfig: "azure-async-operation"
|
|
146
134
|
});
|
|
147
135
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hybridIdentityMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/hybridIdentityMetadataOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,EACjB,MAAM,iBAAiB,C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xI,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"]}
|
|
1
|
+
{"version":3,"file":"hybridIdentityMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/hybridIdentityMetadataOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAA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AE;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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing KubernetesVersions operations. */
|
|
15
14
|
export class KubernetesVersionsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class KubernetesVersions class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -36,52 +36,35 @@ export class KubernetesVersionsImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listPagingPage(customLocationResourceUri, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listPagingPage(customLocationResourceUri, options, settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
46
|
+
async *listPagingPage(customLocationResourceUri, options, settings) {
|
|
47
|
+
let result;
|
|
48
|
+
let continuationToken = settings?.continuationToken;
|
|
49
|
+
if (!continuationToken) {
|
|
50
|
+
result = await this._list(customLocationResourceUri, options);
|
|
51
|
+
let page = result.value || [];
|
|
52
|
+
continuationToken = result.nextLink;
|
|
53
|
+
setContinuationToken(page, continuationToken);
|
|
54
|
+
yield page;
|
|
55
|
+
}
|
|
56
|
+
while (continuationToken) {
|
|
57
|
+
result = await this._listNext(customLocationResourceUri, continuationToken, options);
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
setContinuationToken(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
65
63
|
}
|
|
66
|
-
listPagingAll(customLocationResourceUri, options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(customLocationResourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
71
|
-
_c = _f.value;
|
|
72
|
-
_d = false;
|
|
73
|
-
const page = _c;
|
|
74
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
78
|
-
finally {
|
|
79
|
-
try {
|
|
80
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
81
|
-
}
|
|
82
|
-
finally { if (e_1) throw e_1.error; }
|
|
83
|
-
}
|
|
84
|
-
});
|
|
64
|
+
async *listPagingAll(customLocationResourceUri, options) {
|
|
65
|
+
for await (const page of this.listPagingPage(customLocationResourceUri, options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* 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
|
|
1
|
+
{"version":3,"file":"kubernetesVersions.js","sourceRoot":"","sources":["../../../src/operations/kubernetesVersions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAChB,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;Q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E,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"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Operations operations. */
|
|
15
14
|
export class OperationsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Operations class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -34,52 +34,35 @@ export class OperationsImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listPagingPage(options, settings);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listPagingPage(options, settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
44
|
+
async *listPagingPage(options, settings) {
|
|
45
|
+
let result;
|
|
46
|
+
let continuationToken = settings?.continuationToken;
|
|
47
|
+
if (!continuationToken) {
|
|
48
|
+
result = await this._list(options);
|
|
49
|
+
let page = result.value || [];
|
|
50
|
+
continuationToken = result.nextLink;
|
|
51
|
+
setContinuationToken(page, continuationToken);
|
|
52
|
+
yield page;
|
|
53
|
+
}
|
|
54
|
+
while (continuationToken) {
|
|
55
|
+
result = await this._listNext(continuationToken, options);
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
setContinuationToken(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
listPagingAll(options) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
69
|
-
_c = _f.value;
|
|
70
|
-
_d = false;
|
|
71
|
-
const page = _c;
|
|
72
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
79
|
-
}
|
|
80
|
-
finally { if (e_1) throw e_1.error; }
|
|
81
|
-
}
|
|
82
|
-
});
|
|
62
|
+
async *listPagingAll(options) {
|
|
63
|
+
for await (const page of this.listPagingPage(options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
83
66
|
}
|
|
84
67
|
/**
|
|
85
68
|
* Lists the supported operations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,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;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IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wDAAwD;IAC9D,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,CAAC;IACjC,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,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { 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"]}
|