@azure/arm-authorization-profile-2020-09-01-hybrid 2.1.1-alpha.20250717.1 → 2.1.1-alpha.20250729.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.
Files changed (59) hide show
  1. package/dist/browser/authorizationManagementClient.js +18 -5
  2. package/dist/browser/authorizationManagementClient.js.map +1 -1
  3. package/dist/browser/operations/globalAdministrator.js +1 -0
  4. package/dist/browser/operations/globalAdministrator.js.map +1 -1
  5. package/dist/browser/operations/permissions.js +45 -79
  6. package/dist/browser/operations/permissions.js.map +1 -1
  7. package/dist/browser/operations/providerOperationsMetadataOperations.js +23 -40
  8. package/dist/browser/operations/providerOperationsMetadataOperations.js.map +1 -1
  9. package/dist/browser/operations/roleAssignments.js +89 -157
  10. package/dist/browser/operations/roleAssignments.js.map +1 -1
  11. package/dist/browser/operations/roleDefinitions.js +23 -40
  12. package/dist/browser/operations/roleDefinitions.js.map +1 -1
  13. package/dist/browser/pagingHelper.js +2 -4
  14. package/dist/browser/pagingHelper.js.map +1 -1
  15. package/dist/commonjs/authorizationManagementClient.js +18 -5
  16. package/dist/commonjs/authorizationManagementClient.js.map +1 -1
  17. package/dist/commonjs/operations/globalAdministrator.js +1 -0
  18. package/dist/commonjs/operations/globalAdministrator.js.map +1 -1
  19. package/dist/commonjs/operations/permissions.js +45 -78
  20. package/dist/commonjs/operations/permissions.js.map +1 -1
  21. package/dist/commonjs/operations/providerOperationsMetadataOperations.js +23 -39
  22. package/dist/commonjs/operations/providerOperationsMetadataOperations.js.map +1 -1
  23. package/dist/commonjs/operations/roleAssignments.js +89 -156
  24. package/dist/commonjs/operations/roleAssignments.js.map +1 -1
  25. package/dist/commonjs/operations/roleDefinitions.js +23 -39
  26. package/dist/commonjs/operations/roleDefinitions.js.map +1 -1
  27. package/dist/commonjs/pagingHelper.js +2 -4
  28. package/dist/commonjs/pagingHelper.js.map +1 -1
  29. package/dist/commonjs/tsdoc-metadata.json +11 -11
  30. package/dist/esm/authorizationManagementClient.js +18 -5
  31. package/dist/esm/authorizationManagementClient.js.map +1 -1
  32. package/dist/esm/operations/globalAdministrator.js +1 -0
  33. package/dist/esm/operations/globalAdministrator.js.map +1 -1
  34. package/dist/esm/operations/permissions.js +45 -79
  35. package/dist/esm/operations/permissions.js.map +1 -1
  36. package/dist/esm/operations/providerOperationsMetadataOperations.js +23 -40
  37. package/dist/esm/operations/providerOperationsMetadataOperations.js.map +1 -1
  38. package/dist/esm/operations/roleAssignments.js +89 -157
  39. package/dist/esm/operations/roleAssignments.js.map +1 -1
  40. package/dist/esm/operations/roleDefinitions.js +23 -40
  41. package/dist/esm/operations/roleDefinitions.js.map +1 -1
  42. package/dist/esm/pagingHelper.js +2 -4
  43. package/dist/esm/pagingHelper.js.map +1 -1
  44. package/dist/react-native/authorizationManagementClient.js +18 -5
  45. package/dist/react-native/authorizationManagementClient.js.map +1 -1
  46. package/dist/react-native/operations/globalAdministrator.js +1 -0
  47. package/dist/react-native/operations/globalAdministrator.js.map +1 -1
  48. package/dist/react-native/operations/permissions.js +45 -79
  49. package/dist/react-native/operations/permissions.js.map +1 -1
  50. package/dist/react-native/operations/providerOperationsMetadataOperations.js +23 -40
  51. package/dist/react-native/operations/providerOperationsMetadataOperations.js.map +1 -1
  52. package/dist/react-native/operations/roleAssignments.js +89 -157
  53. package/dist/react-native/operations/roleAssignments.js.map +1 -1
  54. package/dist/react-native/operations/roleDefinitions.js +23 -40
  55. package/dist/react-native/operations/roleDefinitions.js.map +1 -1
  56. package/dist/react-native/pagingHelper.js +2 -4
  57. package/dist/react-native/pagingHelper.js.map +1 -1
  58. package/package.json +2 -2
  59. package/review/arm-authorization-profile-2020-09-01-hybrid-node.api.md +408 -408
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { PermissionsImpl, RoleDefinitionsImpl, ProviderOperationsMetadataOperationsImpl, GlobalAdministratorImpl, RoleAssignmentsImpl } from "./operations/index.js";
11
11
  export class AuthorizationManagementClient extends coreClient.ServiceClient {
12
+ $host;
13
+ apiVersion;
14
+ subscriptionId;
12
15
  /**
13
16
  * Initializes a new instance of the AuthorizationManagementClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -16,7 +19,6 @@ export class AuthorizationManagementClient extends coreClient.ServiceClient {
16
19
  * @param options The parameter options
17
20
  */
18
21
  constructor(credentials, subscriptionId, options) {
19
- var _a, _b, _c;
20
22
  if (credentials === undefined) {
21
23
  throw new Error("'credentials' cannot be null");
22
24
  }
@@ -35,12 +37,17 @@ export class AuthorizationManagementClient extends coreClient.ServiceClient {
35
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
39
  : `${packageDetails}`;
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
40
+ const optionsWithDefaults = {
41
+ ...defaults,
42
+ ...options,
43
+ userAgentOptions: {
39
44
  userAgentPrefix
40
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
45
+ },
46
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
47
+ };
41
48
  super(optionsWithDefaults);
42
49
  let bearerTokenAuthenticationPolicyFound = false;
43
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
50
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
44
51
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
45
52
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
46
53
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -54,7 +61,8 @@ export class AuthorizationManagementClient extends coreClient.ServiceClient {
54
61
  });
55
62
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
56
63
  credential: credentials,
57
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
64
+ scopes: optionsWithDefaults.credentialScopes ??
65
+ `${optionsWithDefaults.endpoint}/.default`,
58
66
  challengeCallbacks: {
59
67
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
60
68
  }
@@ -97,5 +105,10 @@ export class AuthorizationManagementClient extends coreClient.ServiceClient {
97
105
  };
98
106
  this.pipeline.addPolicy(apiVersionPolicy);
99
107
  }
108
+ permissions;
109
+ roleDefinitions;
110
+ providerOperationsMetadataOperations;
111
+ globalAdministrator;
112
+ roleAssignments;
100
113
  }
101
114
  //# sourceMappingURL=authorizationManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorizationManagementClient.js","sourceRoot":"","sources":["../../src/authorizationManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,wCAAwC,EACxC,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAU/B,MAAM,OAAO,6BAA8B,SAAQ,UAAU,CAAC,aAAa;IAKzE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAqD;;QAErD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MA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E,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAOF","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n PermissionsImpl,\n RoleDefinitionsImpl,\n ProviderOperationsMetadataOperationsImpl,\n GlobalAdministratorImpl,\n RoleAssignmentsImpl\n} from \"./operations/index.js\";\nimport {\n Permissions,\n RoleDefinitions,\n ProviderOperationsMetadataOperations,\n GlobalAdministrator,\n RoleAssignments\n} from \"./operationsInterfaces/index.js\";\nimport { AuthorizationManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class AuthorizationManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AuthorizationManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AuthorizationManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AuthorizationManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-authorization-profile-2020-09-01-hybrid/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-07-01\";\n this.permissions = new PermissionsImpl(this);\n this.roleDefinitions = new RoleDefinitionsImpl(this);\n this.providerOperationsMetadataOperations = new ProviderOperationsMetadataOperationsImpl(\n this\n );\n this.globalAdministrator = new GlobalAdministratorImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n permissions: Permissions;\n roleDefinitions: RoleDefinitions;\n providerOperationsMetadataOperations: ProviderOperationsMetadataOperations;\n globalAdministrator: GlobalAdministrator;\n roleAssignments: RoleAssignments;\n}\n"]}
1
+ {"version":3,"file":"authorizationManagementClient.js","sourceRoot":"","sources":["../../src/authorizationManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,wCAAwC,EACxC,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAU/B,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AmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW,CAAc;IACzB,eAAe,CAAkB;IACjC,oCAAoC,CAAuC;IAC3E,mBAAmB,CAAsB;IACzC,eAAe,CAAkB;CAClC","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n PermissionsImpl,\n RoleDefinitionsImpl,\n ProviderOperationsMetadataOperationsImpl,\n GlobalAdministratorImpl,\n RoleAssignmentsImpl\n} from \"./operations/index.js\";\nimport {\n Permissions,\n RoleDefinitions,\n ProviderOperationsMetadataOperations,\n GlobalAdministrator,\n RoleAssignments\n} from \"./operationsInterfaces/index.js\";\nimport { AuthorizationManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class AuthorizationManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the AuthorizationManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: AuthorizationManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AuthorizationManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-authorization-profile-2020-09-01-hybrid/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-07-01\";\n this.permissions = new PermissionsImpl(this);\n this.roleDefinitions = new RoleDefinitionsImpl(this);\n this.providerOperationsMetadataOperations = new ProviderOperationsMetadataOperationsImpl(\n this\n );\n this.globalAdministrator = new GlobalAdministratorImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n permissions: Permissions;\n roleDefinitions: RoleDefinitions;\n providerOperationsMetadataOperations: ProviderOperationsMetadataOperations;\n globalAdministrator: GlobalAdministrator;\n roleAssignments: RoleAssignments;\n}\n"]}
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
10
10
  import * as Parameters from "../models/parameters.js";
11
11
  /** Class containing GlobalAdministrator operations. */
12
12
  export class GlobalAdministratorImpl {
13
+ client;
13
14
  /**
14
15
  * Initialize a new instance of the class GlobalAdministrator class.
15
16
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"globalAdministrator.js","sourceRoot":"","sources":["../../../src/operations/globalAdministrator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,OAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,kDAAkD;IACxD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,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","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 { GlobalAdministrator } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport { GlobalAdministratorElevateAccessOptionalParams } from \"../models/index.js\";\n\n/** Class containing GlobalAdministrator operations. */\nexport class GlobalAdministratorImpl implements GlobalAdministrator {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class GlobalAdministrator class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Elevates access for a Global Administrator.\n * @param options The options parameters.\n */\n elevateAccess(\n options?: GlobalAdministratorElevateAccessOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { options },\n elevateAccessOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst elevateAccessOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Authorization/elevateAccess\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"globalAdministrator.js","sourceRoot":"","sources":["../../../src/operations/globalAdministrator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,uDAAuD;AACvD,MAAM,OAAO,uBAAuB;IACjB,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,OAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,0BAA0B,CAC3B,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,kDAAkD;IACxD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,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","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 { GlobalAdministrator } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport { GlobalAdministratorElevateAccessOptionalParams } from \"../models/index.js\";\n\n/** Class containing GlobalAdministrator operations. */\nexport class GlobalAdministratorImpl implements GlobalAdministrator {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class GlobalAdministrator class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Elevates access for a Global Administrator.\n * @param options The options parameters.\n */\n elevateAccess(\n options?: GlobalAdministratorElevateAccessOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { options },\n elevateAccessOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst elevateAccessOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Authorization/elevateAccess\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\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 Permissions operations. */
15
14
  export class PermissionsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Permissions class.
18
18
  * @param client Reference to the service client
@@ -35,52 +35,35 @@ export class PermissionsImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listForResourceGroupPagingPage(resourceGroupName, options, settings);
42
42
  }
43
43
  };
44
44
  }
45
- listForResourceGroupPagingPage(resourceGroupName, options, settings) {
46
- return __asyncGenerator(this, arguments, function* listForResourceGroupPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._listForResourceGroup(resourceGroupName, options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._listForResourceGroupNext(resourceGroupName, continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
45
+ async *listForResourceGroupPagingPage(resourceGroupName, options, settings) {
46
+ let result;
47
+ let continuationToken = settings?.continuationToken;
48
+ if (!continuationToken) {
49
+ result = await this._listForResourceGroup(resourceGroupName, options);
50
+ let page = result.value || [];
51
+ continuationToken = result.nextLink;
52
+ setContinuationToken(page, continuationToken);
53
+ yield page;
54
+ }
55
+ while (continuationToken) {
56
+ result = await this._listForResourceGroupNext(resourceGroupName, continuationToken, options);
57
+ continuationToken = result.nextLink;
58
+ let page = result.value || [];
59
+ setContinuationToken(page, continuationToken);
60
+ yield page;
61
+ }
64
62
  }
65
- listForResourceGroupPagingAll(resourceGroupName, options) {
66
- return __asyncGenerator(this, arguments, function* listForResourceGroupPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.listForResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
63
+ async *listForResourceGroupPagingAll(resourceGroupName, options) {
64
+ for await (const page of this.listForResourceGroupPagingPage(resourceGroupName, options)) {
65
+ yield* page;
66
+ }
84
67
  }
85
68
  /**
86
69
  * Gets all permissions the caller has for a resource.
@@ -101,52 +84,35 @@ export class PermissionsImpl {
101
84
  return this;
102
85
  },
103
86
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
87
+ if (settings?.maxPageSize) {
105
88
  throw new Error("maxPageSize is not supported by this operation.");
106
89
  }
107
90
  return this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings);
108
91
  }
109
92
  };
110
93
  }
111
- listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings) {
112
- return __asyncGenerator(this, arguments, function* listForResourcePagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield __await(this._listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- setContinuationToken(page, continuationToken);
120
- yield yield __await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield __await(this._listForResourceNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- setContinuationToken(page, continuationToken);
127
- yield yield __await(page);
128
- }
129
- });
94
+ async *listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options, settings) {
95
+ let result;
96
+ let continuationToken = settings?.continuationToken;
97
+ if (!continuationToken) {
98
+ result = await this._listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options);
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
104
+ while (continuationToken) {
105
+ result = await this._listForResourceNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options);
106
+ continuationToken = result.nextLink;
107
+ let page = result.value || [];
108
+ setContinuationToken(page, continuationToken);
109
+ yield page;
110
+ }
130
111
  }
131
- listForResourcePagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
132
- return __asyncGenerator(this, arguments, function* listForResourcePagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = __asyncValues(this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
112
+ async *listForResourcePagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
113
+ for await (const page of this.listForResourcePagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options)) {
114
+ yield* page;
115
+ }
150
116
  }
151
117
  /**
152
118
  * Gets all permissions the caller has for a resource group.
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/operations/permissions.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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gB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qCAAqC,GAA6B;IACtE,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,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;QACvB,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 { Permissions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n Permission,\n PermissionsListForResourceGroupNextOptionalParams,\n PermissionsListForResourceGroupOptionalParams,\n PermissionsListForResourceGroupResponse,\n PermissionsListForResourceNextOptionalParams,\n PermissionsListForResourceOptionalParams,\n PermissionsListForResourceResponse,\n PermissionsListForResourceGroupNextResponse,\n PermissionsListForResourceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Permissions operations. */\nexport class PermissionsImpl implements Permissions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class Permissions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourceGroupPagingAll(resourceGroupName, 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.listForResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourceGroupPagingPage(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResourceGroup(resourceGroupName, 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._listForResourceGroupNext(\n resourceGroupName,\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 *listForResourceGroupPagingAll(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n public listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourcePagingAll(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourcePagingPage(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResource(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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._listForResourceNext(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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 *listForResourcePagingAll(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): Promise<PermissionsListForResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listForResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n private _listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): Promise<PermissionsListForResourceResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n },\n listForResourceOperationSpec\n );\n }\n\n /**\n * ListForResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListForResourceGroup method.\n * @param options The options parameters.\n */\n private _listForResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PermissionsListForResourceGroupNextOptionalParams\n ): Promise<PermissionsListForResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listForResourceGroupNextOperationSpec\n );\n }\n\n /**\n * ListForResourceNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param nextLink The nextLink from the previous successful call to the ListForResource method.\n * @param options The options parameters.\n */\n private _listForResourceNext(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n nextLink: string,\n options?: PermissionsListForResourceNextOptionalParams\n ): Promise<PermissionsListForResourceNextResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n nextLink,\n options\n },\n listForResourceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listForResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../src/operations/permissions.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;AActD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C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CAAgC,GAA6B;IACjE,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,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,yBAAyB;QACpC,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;QACvB,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 { Permissions } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n Permission,\n PermissionsListForResourceGroupNextOptionalParams,\n PermissionsListForResourceGroupOptionalParams,\n PermissionsListForResourceGroupResponse,\n PermissionsListForResourceNextOptionalParams,\n PermissionsListForResourceOptionalParams,\n PermissionsListForResourceResponse,\n PermissionsListForResourceGroupNextResponse,\n PermissionsListForResourceNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Permissions operations. */\nexport class PermissionsImpl implements Permissions {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class Permissions class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourceGroupPagingAll(resourceGroupName, 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.listForResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourceGroupPagingPage(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResourceGroup(resourceGroupName, 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._listForResourceGroupNext(\n resourceGroupName,\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 *listForResourceGroupPagingAll(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n public listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): PagedAsyncIterableIterator<Permission> {\n const iter = this.listForResourcePagingAll(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listForResourcePagingPage(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Permission[]> {\n let result: PermissionsListForResourceResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listForResource(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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._listForResourceNext(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\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 *listForResourcePagingAll(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): AsyncIterableIterator<Permission> {\n for await (const page of this.listForResourcePagingPage(\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all permissions the caller has for a resource group.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listForResourceGroup(\n resourceGroupName: string,\n options?: PermissionsListForResourceGroupOptionalParams\n ): Promise<PermissionsListForResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listForResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets all permissions the caller has for a resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param options The options parameters.\n */\n private _listForResource(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n options?: PermissionsListForResourceOptionalParams\n ): Promise<PermissionsListForResourceResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n options\n },\n listForResourceOperationSpec\n );\n }\n\n /**\n * ListForResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListForResourceGroup method.\n * @param options The options parameters.\n */\n private _listForResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PermissionsListForResourceGroupNextOptionalParams\n ): Promise<PermissionsListForResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listForResourceGroupNextOperationSpec\n );\n }\n\n /**\n * ListForResourceNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param parentResourcePath The parent resource identity.\n * @param resourceType The resource type of the resource.\n * @param resourceName The name of the resource to get the permissions for.\n * @param nextLink The nextLink from the previous successful call to the ListForResource method.\n * @param options The options parameters.\n */\n private _listForResourceNext(\n resourceGroupName: string,\n resourceProviderNamespace: string,\n parentResourcePath: string,\n resourceType: string,\n resourceName: string,\n nextLink: string,\n options?: PermissionsListForResourceNextOptionalParams\n ): Promise<PermissionsListForResourceNextResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n resourceProviderNamespace,\n parentResourcePath,\n resourceType,\n resourceName,\n nextLink,\n options\n },\n listForResourceNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listForResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForResourceNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PermissionGetResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.resourceProviderNamespace,\n Parameters.parentResourcePath,\n Parameters.resourceType,\n Parameters.resourceName,\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 ProviderOperationsMetadataOperations operations. */
15
14
  export class ProviderOperationsMetadataOperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class ProviderOperationsMetadataOperations class.
18
18
  * @param client Reference to the service client
@@ -34,52 +34,35 @@ export class ProviderOperationsMetadataOperationsImpl {
34
34
  return this;
35
35
  },
36
36
  byPage: (settings) => {
37
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._list(options));
50
- let page = result.value || [];
51
- continuationToken = result.nextLink;
52
- setContinuationToken(page, continuationToken);
53
- yield yield __await(page);
54
- }
55
- while (continuationToken) {
56
- result = yield __await(this._listNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
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
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
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
  * Gets provider operations metadata for the specified resource provider.
@@ -1 +1 @@
1
- {"version":3,"file":"providerOperationsMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/providerOperationsMetadataOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UA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,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 { ProviderOperationsMetadataOperations } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n ProviderOperationsMetadata,\n ProviderOperationsMetadataListNextOptionalParams,\n ProviderOperationsMetadataListOptionalParams,\n ProviderOperationsMetadataListResponse,\n ProviderOperationsMetadataGetOptionalParams,\n ProviderOperationsMetadataGetResponse,\n ProviderOperationsMetadataListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProviderOperationsMetadataOperations operations. */\nexport class ProviderOperationsMetadataOperationsImpl\n implements ProviderOperationsMetadataOperations {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class ProviderOperationsMetadataOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets provider operations metadata for all resource providers.\n * @param options The options parameters.\n */\n public list(\n options?: ProviderOperationsMetadataListOptionalParams\n ): PagedAsyncIterableIterator<ProviderOperationsMetadata> {\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?: ProviderOperationsMetadataListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProviderOperationsMetadata[]> {\n let result: ProviderOperationsMetadataListResponse;\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?: ProviderOperationsMetadataListOptionalParams\n ): AsyncIterableIterator<ProviderOperationsMetadata> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets provider operations metadata for the specified resource provider.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param options The options parameters.\n */\n get(\n resourceProviderNamespace: string,\n options?: ProviderOperationsMetadataGetOptionalParams\n ): Promise<ProviderOperationsMetadataGetResponse> {\n return this.client.sendOperationRequest(\n { resourceProviderNamespace, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets provider operations metadata for all resource providers.\n * @param options The options parameters.\n */\n private _list(\n options?: ProviderOperationsMetadataListOptionalParams\n ): Promise<ProviderOperationsMetadataListResponse> {\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?: ProviderOperationsMetadataListNextOptionalParams\n ): Promise<ProviderOperationsMetadataListNextResponse> {\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 getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProviderOperationsMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [Parameters.$host, Parameters.resourceProviderNamespace],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Authorization/providerOperations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProviderOperationsMetadataListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\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.ProviderOperationsMetadataListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"providerOperationsMetadataOperations.js","sourceRoot":"","sources":["../../../src/operations/providerOperationsMetadataOperations.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;AAYtD,4CAA4C;AAC5C,wEAAwE;AACxE,MAAM,OAAO,wCAAwC;IAElC,MAAM,CAAgC;IAEvD;;;OAGG;IACH,YAAY,MAAqC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsD;QAEtD,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,C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,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,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,oCAAoC;SACzD;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 { ProviderOperationsMetadataOperations } 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 { AuthorizationManagementClient } from \"../authorizationManagementClient.js\";\nimport {\n ProviderOperationsMetadata,\n ProviderOperationsMetadataListNextOptionalParams,\n ProviderOperationsMetadataListOptionalParams,\n ProviderOperationsMetadataListResponse,\n ProviderOperationsMetadataGetOptionalParams,\n ProviderOperationsMetadataGetResponse,\n ProviderOperationsMetadataListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProviderOperationsMetadataOperations operations. */\nexport class ProviderOperationsMetadataOperationsImpl\n implements ProviderOperationsMetadataOperations {\n private readonly client: AuthorizationManagementClient;\n\n /**\n * Initialize a new instance of the class ProviderOperationsMetadataOperations class.\n * @param client Reference to the service client\n */\n constructor(client: AuthorizationManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets provider operations metadata for all resource providers.\n * @param options The options parameters.\n */\n public list(\n options?: ProviderOperationsMetadataListOptionalParams\n ): PagedAsyncIterableIterator<ProviderOperationsMetadata> {\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?: ProviderOperationsMetadataListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ProviderOperationsMetadata[]> {\n let result: ProviderOperationsMetadataListResponse;\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?: ProviderOperationsMetadataListOptionalParams\n ): AsyncIterableIterator<ProviderOperationsMetadata> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets provider operations metadata for the specified resource provider.\n * @param resourceProviderNamespace The namespace of the resource provider.\n * @param options The options parameters.\n */\n get(\n resourceProviderNamespace: string,\n options?: ProviderOperationsMetadataGetOptionalParams\n ): Promise<ProviderOperationsMetadataGetResponse> {\n return this.client.sendOperationRequest(\n { resourceProviderNamespace, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets provider operations metadata for all resource providers.\n * @param options The options parameters.\n */\n private _list(\n options?: ProviderOperationsMetadataListOptionalParams\n ): Promise<ProviderOperationsMetadataListResponse> {\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?: ProviderOperationsMetadataListNextOptionalParams\n ): Promise<ProviderOperationsMetadataListNextResponse> {\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 getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProviderOperationsMetadata\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [Parameters.$host, Parameters.resourceProviderNamespace],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Authorization/providerOperations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProviderOperationsMetadataListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\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.ProviderOperationsMetadataListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}