@azure/arm-customerinsights 4.1.1-alpha.20250619.1 → 4.1.1-alpha.20250718.2
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/customerInsightsManagementClient.js +30 -5
- package/dist/browser/customerInsightsManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +479 -230
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/authorizationPolicies.js +23 -40
- package/dist/browser/operations/authorizationPolicies.js.map +1 -1
- package/dist/browser/operations/connectorMappings.js +23 -40
- package/dist/browser/operations/connectorMappings.js.map +1 -1
- package/dist/browser/operations/connectors.js +45 -52
- package/dist/browser/operations/connectors.js.map +1 -1
- package/dist/browser/operations/hubs.js +56 -85
- package/dist/browser/operations/hubs.js.map +1 -1
- package/dist/browser/operations/images.js +1 -0
- package/dist/browser/operations/images.js.map +1 -1
- package/dist/browser/operations/interactions.js +34 -46
- package/dist/browser/operations/interactions.js.map +1 -1
- package/dist/browser/operations/kpi.js +45 -52
- package/dist/browser/operations/kpi.js.map +1 -1
- package/dist/browser/operations/links.js +34 -46
- package/dist/browser/operations/links.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/predictions.js +45 -52
- package/dist/browser/operations/predictions.js.map +1 -1
- package/dist/browser/operations/profiles.js +45 -52
- package/dist/browser/operations/profiles.js.map +1 -1
- package/dist/browser/operations/relationshipLinks.js +45 -52
- package/dist/browser/operations/relationshipLinks.js.map +1 -1
- package/dist/browser/operations/relationships.js +45 -52
- package/dist/browser/operations/relationships.js.map +1 -1
- package/dist/browser/operations/roleAssignments.js +34 -46
- package/dist/browser/operations/roleAssignments.js.map +1 -1
- package/dist/browser/operations/roles.js +23 -40
- package/dist/browser/operations/roles.js.map +1 -1
- package/dist/browser/operations/views.js +23 -40
- package/dist/browser/operations/views.js.map +1 -1
- package/dist/browser/operations/widgetTypes.js +23 -40
- package/dist/browser/operations/widgetTypes.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/customerInsightsManagementClient.js +30 -5
- package/dist/commonjs/customerInsightsManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +479 -230
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/authorizationPolicies.js +23 -39
- package/dist/commonjs/operations/authorizationPolicies.js.map +1 -1
- package/dist/commonjs/operations/connectorMappings.js +23 -39
- package/dist/commonjs/operations/connectorMappings.js.map +1 -1
- package/dist/commonjs/operations/connectors.js +45 -51
- package/dist/commonjs/operations/connectors.js.map +1 -1
- package/dist/commonjs/operations/hubs.js +56 -84
- package/dist/commonjs/operations/hubs.js.map +1 -1
- package/dist/commonjs/operations/images.js +1 -0
- package/dist/commonjs/operations/images.js.map +1 -1
- package/dist/commonjs/operations/interactions.js +34 -45
- package/dist/commonjs/operations/interactions.js.map +1 -1
- package/dist/commonjs/operations/kpi.js +45 -51
- package/dist/commonjs/operations/kpi.js.map +1 -1
- package/dist/commonjs/operations/links.js +34 -45
- package/dist/commonjs/operations/links.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/predictions.js +45 -51
- package/dist/commonjs/operations/predictions.js.map +1 -1
- package/dist/commonjs/operations/profiles.js +45 -51
- package/dist/commonjs/operations/profiles.js.map +1 -1
- package/dist/commonjs/operations/relationshipLinks.js +45 -51
- package/dist/commonjs/operations/relationshipLinks.js.map +1 -1
- package/dist/commonjs/operations/relationships.js +45 -51
- package/dist/commonjs/operations/relationships.js.map +1 -1
- package/dist/commonjs/operations/roleAssignments.js +34 -45
- package/dist/commonjs/operations/roleAssignments.js.map +1 -1
- package/dist/commonjs/operations/roles.js +23 -39
- package/dist/commonjs/operations/roles.js.map +1 -1
- package/dist/commonjs/operations/views.js +23 -39
- package/dist/commonjs/operations/views.js.map +1 -1
- package/dist/commonjs/operations/widgetTypes.js +23 -39
- package/dist/commonjs/operations/widgetTypes.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 +11 -11
- package/dist/esm/customerInsightsManagementClient.js +30 -5
- package/dist/esm/customerInsightsManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +479 -230
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/authorizationPolicies.js +23 -40
- package/dist/esm/operations/authorizationPolicies.js.map +1 -1
- package/dist/esm/operations/connectorMappings.js +23 -40
- package/dist/esm/operations/connectorMappings.js.map +1 -1
- package/dist/esm/operations/connectors.js +45 -52
- package/dist/esm/operations/connectors.js.map +1 -1
- package/dist/esm/operations/hubs.js +56 -85
- package/dist/esm/operations/hubs.js.map +1 -1
- package/dist/esm/operations/images.js +1 -0
- package/dist/esm/operations/images.js.map +1 -1
- package/dist/esm/operations/interactions.js +34 -46
- package/dist/esm/operations/interactions.js.map +1 -1
- package/dist/esm/operations/kpi.js +45 -52
- package/dist/esm/operations/kpi.js.map +1 -1
- package/dist/esm/operations/links.js +34 -46
- package/dist/esm/operations/links.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/predictions.js +45 -52
- package/dist/esm/operations/predictions.js.map +1 -1
- package/dist/esm/operations/profiles.js +45 -52
- package/dist/esm/operations/profiles.js.map +1 -1
- package/dist/esm/operations/relationshipLinks.js +45 -52
- package/dist/esm/operations/relationshipLinks.js.map +1 -1
- package/dist/esm/operations/relationships.js +45 -52
- package/dist/esm/operations/relationships.js.map +1 -1
- package/dist/esm/operations/roleAssignments.js +34 -46
- package/dist/esm/operations/roleAssignments.js.map +1 -1
- package/dist/esm/operations/roles.js +23 -40
- package/dist/esm/operations/roles.js.map +1 -1
- package/dist/esm/operations/views.js +23 -40
- package/dist/esm/operations/views.js.map +1 -1
- package/dist/esm/operations/widgetTypes.js +23 -40
- package/dist/esm/operations/widgetTypes.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/customerInsightsManagementClient.js +30 -5
- package/dist/react-native/customerInsightsManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +479 -230
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/authorizationPolicies.js +23 -40
- package/dist/react-native/operations/authorizationPolicies.js.map +1 -1
- package/dist/react-native/operations/connectorMappings.js +23 -40
- package/dist/react-native/operations/connectorMappings.js.map +1 -1
- package/dist/react-native/operations/connectors.js +45 -52
- package/dist/react-native/operations/connectors.js.map +1 -1
- package/dist/react-native/operations/hubs.js +56 -85
- package/dist/react-native/operations/hubs.js.map +1 -1
- package/dist/react-native/operations/images.js +1 -0
- package/dist/react-native/operations/images.js.map +1 -1
- package/dist/react-native/operations/interactions.js +34 -46
- package/dist/react-native/operations/interactions.js.map +1 -1
- package/dist/react-native/operations/kpi.js +45 -52
- package/dist/react-native/operations/kpi.js.map +1 -1
- package/dist/react-native/operations/links.js +34 -46
- package/dist/react-native/operations/links.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/predictions.js +45 -52
- package/dist/react-native/operations/predictions.js.map +1 -1
- package/dist/react-native/operations/profiles.js +45 -52
- package/dist/react-native/operations/profiles.js.map +1 -1
- package/dist/react-native/operations/relationshipLinks.js +45 -52
- package/dist/react-native/operations/relationshipLinks.js.map +1 -1
- package/dist/react-native/operations/relationships.js +45 -52
- package/dist/react-native/operations/relationships.js.map +1 -1
- package/dist/react-native/operations/roleAssignments.js +34 -46
- package/dist/react-native/operations/roleAssignments.js.map +1 -1
- package/dist/react-native/operations/roles.js +23 -40
- package/dist/react-native/operations/roles.js.map +1 -1
- package/dist/react-native/operations/views.js +23 -40
- package/dist/react-native/operations/views.js.map +1 -1
- package/dist/react-native/operations/widgetTypes.js +23 -40
- package/dist/react-native/operations/widgetTypes.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
- /package/review/{arm-customerinsights.api.md → arm-customerinsights-node.api.md} +0 -0
|
@@ -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 AuthorizationPolicies operations. */
|
|
15
14
|
export class AuthorizationPoliciesImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class AuthorizationPolicies class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -36,52 +36,35 @@ export class AuthorizationPoliciesImpl {
|
|
|
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.listByHubPagingPage(resourceGroupName, hubName, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
46
|
+
async *listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
47
|
+
let result;
|
|
48
|
+
let continuationToken = settings?.continuationToken;
|
|
49
|
+
if (!continuationToken) {
|
|
50
|
+
result = await this._listByHub(resourceGroupName, hubName, 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._listByHubNext(resourceGroupName, hubName, continuationToken, options);
|
|
58
|
+
continuationToken = result.nextLink;
|
|
59
|
+
let page = result.value || [];
|
|
60
|
+
setContinuationToken(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
65
63
|
}
|
|
66
|
-
listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
for (var _d = true, _e = __asyncValues(this.listByHubPagingPage(resourceGroupName, hubName, 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 *listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
65
|
+
for await (const page of this.listByHubPagingPage(resourceGroupName, hubName, options)) {
|
|
66
|
+
yield* page;
|
|
67
|
+
}
|
|
85
68
|
}
|
|
86
69
|
/**
|
|
87
70
|
* Creates an authorization policy or updates an existing authorization policy.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorizationPolicies.js","sourceRoot":"","sources":["../../../src/operations/authorizationPolicies.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;AAkBtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1E,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,IAA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E,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,wBAAwB;KACpC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,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 { AuthorizationPolicies } 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 { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n AuthorizationPolicyResourceFormat,\n AuthorizationPoliciesListByHubNextOptionalParams,\n AuthorizationPoliciesListByHubOptionalParams,\n AuthorizationPoliciesListByHubResponse,\n AuthorizationPoliciesCreateOrUpdateOptionalParams,\n AuthorizationPoliciesCreateOrUpdateResponse,\n AuthorizationPoliciesGetOptionalParams,\n AuthorizationPoliciesGetResponse,\n AuthorizationPoliciesRegeneratePrimaryKeyOptionalParams,\n AuthorizationPoliciesRegeneratePrimaryKeyResponse,\n AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams,\n AuthorizationPoliciesRegenerateSecondaryKeyResponse,\n AuthorizationPoliciesListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AuthorizationPolicies operations. */\nexport class AuthorizationPoliciesImpl implements AuthorizationPolicies {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class AuthorizationPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the authorization policies in a specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): PagedAsyncIterableIterator<AuthorizationPolicyResourceFormat> {\n const iter = this.listByHubPagingAll(resourceGroupName, hubName, 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.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<AuthorizationPolicyResourceFormat[]> {\n let result: AuthorizationPoliciesListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(resourceGroupName, hubName, 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._listByHubNext(\n resourceGroupName,\n hubName,\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 *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): AsyncIterableIterator<AuthorizationPolicyResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates an authorization policy or updates an existing authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n parameters: AuthorizationPolicyResourceFormat,\n options?: AuthorizationPoliciesCreateOrUpdateOptionalParams\n ): Promise<AuthorizationPoliciesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n hubName,\n authorizationPolicyName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets an authorization policy in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesGetOptionalParams\n ): Promise<AuthorizationPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all the authorization policies in a specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): Promise<AuthorizationPoliciesListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Regenerates the primary policy key of the specified authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n regeneratePrimaryKey(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesRegeneratePrimaryKeyOptionalParams\n ): Promise<AuthorizationPoliciesRegeneratePrimaryKeyResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n regeneratePrimaryKeyOperationSpec\n );\n }\n\n /**\n * Regenerates the secondary policy key of the specified authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n regenerateSecondaryKey(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams\n ): Promise<AuthorizationPoliciesRegenerateSecondaryKeyResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n regenerateSecondaryKeyOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n nextLink: string,\n options?: AuthorizationPoliciesListByHubNextOptionalParams\n ): Promise<AuthorizationPoliciesListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n },\n 201: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n }\n },\n requestBody: Parameters.parameters5,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regeneratePrimaryKey\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicy\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regenerateSecondaryKey\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicy\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"authorizationPolicies.js","sourceRoot":"","sources":["../../../src/operations/authorizationPolicies.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;AAkBtD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IACnB,MAAM,CAAmC;IAE1D;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,C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AAC,QAAQ;QACnB,UAAU,CAAC,wBAAwB;KACpC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EACF,+LAA+L;IACjM,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,wBAAwB;KACpC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,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 { AuthorizationPolicies } 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 { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n AuthorizationPolicyResourceFormat,\n AuthorizationPoliciesListByHubNextOptionalParams,\n AuthorizationPoliciesListByHubOptionalParams,\n AuthorizationPoliciesListByHubResponse,\n AuthorizationPoliciesCreateOrUpdateOptionalParams,\n AuthorizationPoliciesCreateOrUpdateResponse,\n AuthorizationPoliciesGetOptionalParams,\n AuthorizationPoliciesGetResponse,\n AuthorizationPoliciesRegeneratePrimaryKeyOptionalParams,\n AuthorizationPoliciesRegeneratePrimaryKeyResponse,\n AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams,\n AuthorizationPoliciesRegenerateSecondaryKeyResponse,\n AuthorizationPoliciesListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AuthorizationPolicies operations. */\nexport class AuthorizationPoliciesImpl implements AuthorizationPolicies {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class AuthorizationPolicies class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the authorization policies in a specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): PagedAsyncIterableIterator<AuthorizationPolicyResourceFormat> {\n const iter = this.listByHubPagingAll(resourceGroupName, hubName, 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.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<AuthorizationPolicyResourceFormat[]> {\n let result: AuthorizationPoliciesListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(resourceGroupName, hubName, 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._listByHubNext(\n resourceGroupName,\n hubName,\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 *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): AsyncIterableIterator<AuthorizationPolicyResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates an authorization policy or updates an existing authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param parameters Parameters supplied to the CreateOrUpdate authorization policy operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n parameters: AuthorizationPolicyResourceFormat,\n options?: AuthorizationPoliciesCreateOrUpdateOptionalParams\n ): Promise<AuthorizationPoliciesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n hubName,\n authorizationPolicyName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets an authorization policy in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesGetOptionalParams\n ): Promise<AuthorizationPoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all the authorization policies in a specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: AuthorizationPoliciesListByHubOptionalParams\n ): Promise<AuthorizationPoliciesListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Regenerates the primary policy key of the specified authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n regeneratePrimaryKey(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesRegeneratePrimaryKeyOptionalParams\n ): Promise<AuthorizationPoliciesRegeneratePrimaryKeyResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n regeneratePrimaryKeyOperationSpec\n );\n }\n\n /**\n * Regenerates the secondary policy key of the specified authorization policy.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param authorizationPolicyName The name of the policy.\n * @param options The options parameters.\n */\n regenerateSecondaryKey(\n resourceGroupName: string,\n hubName: string,\n authorizationPolicyName: string,\n options?: AuthorizationPoliciesRegenerateSecondaryKeyOptionalParams\n ): Promise<AuthorizationPoliciesRegenerateSecondaryKeyResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, authorizationPolicyName, options },\n regenerateSecondaryKeyOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n nextLink: string,\n options?: AuthorizationPoliciesListByHubNextOptionalParams\n ): Promise<AuthorizationPoliciesListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n },\n 201: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n }\n },\n requestBody: Parameters.parameters5,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst regeneratePrimaryKeyOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regeneratePrimaryKey\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicy\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst regenerateSecondaryKeyOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regenerateSecondaryKey\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicy\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.authorizationPolicyName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AuthorizationPolicyListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\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 ConnectorMappings operations. */
|
|
15
14
|
export class ConnectorMappingsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class ConnectorMappings class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -37,52 +37,35 @@ export class ConnectorMappingsImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listByConnectorPagingPage(resourceGroupName, hubName, connectorName, options, settings);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listByConnectorPagingPage(resourceGroupName, hubName, connectorName, options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
47
|
+
async *listByConnectorPagingPage(resourceGroupName, hubName, connectorName, options, settings) {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings?.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = await this._listByConnector(resourceGroupName, hubName, connectorName, options);
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield page;
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = await this._listByConnectorNext(resourceGroupName, hubName, connectorName, continuationToken, options);
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
|
-
listByConnectorPagingAll(resourceGroupName, hubName, connectorName, options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = __asyncValues(this.listByConnectorPagingPage(resourceGroupName, hubName, connectorName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield __await(yield* __asyncDelegator(__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 __await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
65
|
+
async *listByConnectorPagingAll(resourceGroupName, hubName, connectorName, options) {
|
|
66
|
+
for await (const page of this.listByConnectorPagingPage(resourceGroupName, hubName, connectorName, options)) {
|
|
67
|
+
yield* page;
|
|
68
|
+
}
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* Creates a connector mapping or updates an existing connector mapping in the connector.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectorMappings.js","sourceRoot":"","sources":["../../../src/operations/connectorMappings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB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QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,4JAA4J;IAC9J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;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 { ConnectorMappings } 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 { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n ConnectorMappingResourceFormat,\n ConnectorMappingsListByConnectorNextOptionalParams,\n ConnectorMappingsListByConnectorOptionalParams,\n ConnectorMappingsListByConnectorResponse,\n ConnectorMappingsCreateOrUpdateOptionalParams,\n ConnectorMappingsCreateOrUpdateResponse,\n ConnectorMappingsGetOptionalParams,\n ConnectorMappingsGetResponse,\n ConnectorMappingsDeleteOptionalParams,\n ConnectorMappingsListByConnectorNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ConnectorMappings operations. */\nexport class ConnectorMappingsImpl implements ConnectorMappings {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class ConnectorMappings class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the connector mappings in the specified connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param options The options parameters.\n */\n public listByConnector(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): PagedAsyncIterableIterator<ConnectorMappingResourceFormat> {\n const iter = this.listByConnectorPagingAll(\n resourceGroupName,\n hubName,\n connectorName,\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.listByConnectorPagingPage(\n resourceGroupName,\n hubName,\n connectorName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConnectorPagingPage(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ConnectorMappingResourceFormat[]> {\n let result: ConnectorMappingsListByConnectorResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByConnector(\n resourceGroupName,\n hubName,\n connectorName,\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._listByConnectorNext(\n resourceGroupName,\n hubName,\n connectorName,\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 *listByConnectorPagingAll(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): AsyncIterableIterator<ConnectorMappingResourceFormat> {\n for await (const page of this.listByConnectorPagingPage(\n resourceGroupName,\n hubName,\n connectorName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a connector mapping or updates an existing connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n parameters: ConnectorMappingResourceFormat,\n options?: ConnectorMappingsCreateOrUpdateOptionalParams\n ): Promise<ConnectorMappingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n hubName,\n connectorName,\n mappingName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets a connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n options?: ConnectorMappingsGetOptionalParams\n ): Promise<ConnectorMappingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, mappingName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n options?: ConnectorMappingsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, mappingName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all the connector mappings in the specified connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param options The options parameters.\n */\n private _listByConnector(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): Promise<ConnectorMappingsListByConnectorResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, options },\n listByConnectorOperationSpec\n );\n }\n\n /**\n * ListByConnectorNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param nextLink The nextLink from the previous successful call to the ListByConnector method.\n * @param options The options parameters.\n */\n private _listByConnectorNext(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n nextLink: string,\n options?: ConnectorMappingsListByConnectorNextOptionalParams\n ): Promise<ConnectorMappingsListByConnectorNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, nextLink, options },\n listByConnectorNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n },\n 201: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n }\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 204: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName1\n ],\n serializer\n};\nconst listByConnectorOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConnectorNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"connectorMappings.js","sourceRoot":"","sources":["../../../src/operations/connectorMappings.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,4CAA4C;AAC5C,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IACf,MAAM,CAAmC;IAE1D;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CACpB,iBAAyB,EACzB,OAAe,EACf,aAAqB,EACrB,OAAwD;QAExD,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,OAAO,EACP,aAAa,EACb,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,MA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AU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;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 { ConnectorMappings } 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 { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n ConnectorMappingResourceFormat,\n ConnectorMappingsListByConnectorNextOptionalParams,\n ConnectorMappingsListByConnectorOptionalParams,\n ConnectorMappingsListByConnectorResponse,\n ConnectorMappingsCreateOrUpdateOptionalParams,\n ConnectorMappingsCreateOrUpdateResponse,\n ConnectorMappingsGetOptionalParams,\n ConnectorMappingsGetResponse,\n ConnectorMappingsDeleteOptionalParams,\n ConnectorMappingsListByConnectorNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ConnectorMappings operations. */\nexport class ConnectorMappingsImpl implements ConnectorMappings {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class ConnectorMappings class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the connector mappings in the specified connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param options The options parameters.\n */\n public listByConnector(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): PagedAsyncIterableIterator<ConnectorMappingResourceFormat> {\n const iter = this.listByConnectorPagingAll(\n resourceGroupName,\n hubName,\n connectorName,\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.listByConnectorPagingPage(\n resourceGroupName,\n hubName,\n connectorName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConnectorPagingPage(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ConnectorMappingResourceFormat[]> {\n let result: ConnectorMappingsListByConnectorResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByConnector(\n resourceGroupName,\n hubName,\n connectorName,\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._listByConnectorNext(\n resourceGroupName,\n hubName,\n connectorName,\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 *listByConnectorPagingAll(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): AsyncIterableIterator<ConnectorMappingResourceFormat> {\n for await (const page of this.listByConnectorPagingPage(\n resourceGroupName,\n hubName,\n connectorName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a connector mapping or updates an existing connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param parameters Parameters supplied to the CreateOrUpdate Connector Mapping operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n parameters: ConnectorMappingResourceFormat,\n options?: ConnectorMappingsCreateOrUpdateOptionalParams\n ): Promise<ConnectorMappingsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n hubName,\n connectorName,\n mappingName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets a connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n options?: ConnectorMappingsGetOptionalParams\n ): Promise<ConnectorMappingsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, mappingName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a connector mapping in the connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param mappingName The name of the connector mapping.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n mappingName: string,\n options?: ConnectorMappingsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, mappingName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all the connector mappings in the specified connector.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param options The options parameters.\n */\n private _listByConnector(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n options?: ConnectorMappingsListByConnectorOptionalParams\n ): Promise<ConnectorMappingsListByConnectorResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, options },\n listByConnectorOperationSpec\n );\n }\n\n /**\n * ListByConnectorNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param connectorName The name of the connector.\n * @param nextLink The nextLink from the previous successful call to the ListByConnector method.\n * @param options The options parameters.\n */\n private _listByConnectorNext(\n resourceGroupName: string,\n hubName: string,\n connectorName: string,\n nextLink: string,\n options?: ConnectorMappingsListByConnectorNextOptionalParams\n ): Promise<ConnectorMappingsListByConnectorNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, connectorName, nextLink, options },\n listByConnectorNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n },\n 201: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n }\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings/{mappingName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 204: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1,\n Parameters.mappingName1\n ],\n serializer\n};\nconst listByConnectorOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/connectors/{connectorName}/mappings\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConnectorNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ConnectorMappingListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.connectorName1\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 { LroImpl } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing Connectors operations. */
|
|
17
16
|
export class ConnectorsImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class Connectors class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class ConnectorsImpl {
|
|
|
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.listByHubPagingPage(resourceGroupName, hubName, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listByHub(resourceGroupName, hubName, 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._listByHubNext(resourceGroupName, hubName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByHubPagingPage(resourceGroupName, hubName, 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 *listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
67
|
+
for await (const page of this.listByHubPagingPage(resourceGroupName, hubName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Creates a connector or updates an existing connector in the hub.
|
|
@@ -98,14 +81,19 @@ export class ConnectorsImpl {
|
|
|
98
81
|
return this.client.sendOperationRequest(args, spec);
|
|
99
82
|
};
|
|
100
83
|
const sendOperation = async (args, spec) => {
|
|
101
|
-
var _a;
|
|
102
84
|
let currentRawResponse = undefined;
|
|
103
|
-
const providedCallback =
|
|
85
|
+
const providedCallback = args.options?.onResponse;
|
|
104
86
|
const callback = (rawResponse, flatResponse) => {
|
|
105
87
|
currentRawResponse = rawResponse;
|
|
106
|
-
providedCallback
|
|
88
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
89
|
+
};
|
|
90
|
+
const updatedArgs = {
|
|
91
|
+
...args,
|
|
92
|
+
options: {
|
|
93
|
+
...args.options,
|
|
94
|
+
onResponse: callback
|
|
95
|
+
}
|
|
107
96
|
};
|
|
108
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
109
97
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
110
98
|
return {
|
|
111
99
|
flatResponse,
|
|
@@ -118,8 +106,8 @@ export class ConnectorsImpl {
|
|
|
118
106
|
};
|
|
119
107
|
const lro = new LroImpl(sendOperation, { resourceGroupName, hubName, connectorName, parameters, options }, createOrUpdateOperationSpec);
|
|
120
108
|
const poller = new LroEngine(lro, {
|
|
121
|
-
resumeFrom: options
|
|
122
|
-
intervalInMs: options
|
|
109
|
+
resumeFrom: options?.resumeFrom,
|
|
110
|
+
intervalInMs: options?.updateIntervalInMs
|
|
123
111
|
});
|
|
124
112
|
await poller.poll();
|
|
125
113
|
return poller;
|
|
@@ -158,14 +146,19 @@ export class ConnectorsImpl {
|
|
|
158
146
|
return this.client.sendOperationRequest(args, spec);
|
|
159
147
|
};
|
|
160
148
|
const sendOperation = async (args, spec) => {
|
|
161
|
-
var _a;
|
|
162
149
|
let currentRawResponse = undefined;
|
|
163
|
-
const providedCallback =
|
|
150
|
+
const providedCallback = args.options?.onResponse;
|
|
164
151
|
const callback = (rawResponse, flatResponse) => {
|
|
165
152
|
currentRawResponse = rawResponse;
|
|
166
|
-
providedCallback
|
|
153
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
154
|
+
};
|
|
155
|
+
const updatedArgs = {
|
|
156
|
+
...args,
|
|
157
|
+
options: {
|
|
158
|
+
...args.options,
|
|
159
|
+
onResponse: callback
|
|
160
|
+
}
|
|
167
161
|
};
|
|
168
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
169
162
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
170
163
|
return {
|
|
171
164
|
flatResponse,
|
|
@@ -178,8 +171,8 @@ export class ConnectorsImpl {
|
|
|
178
171
|
};
|
|
179
172
|
const lro = new LroImpl(sendOperation, { resourceGroupName, hubName, connectorName, options }, deleteOperationSpec);
|
|
180
173
|
const poller = new LroEngine(lro, {
|
|
181
|
-
resumeFrom: options
|
|
182
|
-
intervalInMs: options
|
|
174
|
+
resumeFrom: options?.resumeFrom,
|
|
175
|
+
intervalInMs: options?.updateIntervalInMs
|
|
183
176
|
});
|
|
184
177
|
await poller.poll();
|
|
185
178
|
return poller;
|