@azure/arm-locks 1.2.0 → 2.0.0-alpha.20211015.3

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 (84) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +63 -80
  4. package/dist/index.js +1796 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/esm/index.d.ts +534 -0
  9. package/esm/index.d.ts.map +1 -0
  10. package/esm/index.js +13 -0
  11. package/esm/index.js.map +1 -0
  12. package/esm/managementLockClient.d.ts +9 -18
  13. package/esm/managementLockClient.d.ts.map +1 -1
  14. package/esm/managementLockClient.js +12 -28
  15. package/esm/managementLockClient.js.map +1 -1
  16. package/esm/managementLockClientContext.d.ts +10 -16
  17. package/esm/managementLockClientContext.d.ts.map +1 -1
  18. package/esm/managementLockClientContext.js +34 -46
  19. package/esm/managementLockClientContext.js.map +1 -1
  20. package/esm/models/index.d.ts +208 -445
  21. package/esm/models/index.d.ts.map +1 -1
  22. package/esm/models/index.js +9 -2
  23. package/esm/models/index.js.map +1 -1
  24. package/esm/models/mappers.d.ts +7 -9
  25. package/esm/models/mappers.d.ts.map +1 -1
  26. package/esm/models/mappers.js +69 -78
  27. package/esm/models/mappers.js.map +1 -1
  28. package/esm/models/parameters.d.ts +16 -13
  29. package/esm/models/parameters.d.ts.map +1 -1
  30. package/esm/models/parameters.js +78 -54
  31. package/esm/models/parameters.js.map +1 -1
  32. package/esm/operations/authorizationOperations.d.ts +27 -26
  33. package/esm/operations/authorizationOperations.d.ts.map +1 -1
  34. package/esm/operations/authorizationOperations.js +158 -50
  35. package/esm/operations/authorizationOperations.js.map +1 -1
  36. package/esm/operations/index.d.ts.map +1 -1
  37. package/esm/operations/index.js +3 -5
  38. package/esm/operations/index.js.map +1 -1
  39. package/esm/operations/managementLocks.d.ts +203 -393
  40. package/esm/operations/managementLocks.d.ts.map +1 -1
  41. package/esm/operations/managementLocks.js +993 -485
  42. package/esm/operations/managementLocks.js.map +1 -1
  43. package/esm/operationsInterfaces/authorizationOperations.d.ts +18 -0
  44. package/esm/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
  45. package/esm/operationsInterfaces/authorizationOperations.js +9 -0
  46. package/esm/operationsInterfaces/authorizationOperations.js.map +1 -0
  47. package/esm/operationsInterfaces/index.d.ts +3 -0
  48. package/esm/operationsInterfaces/index.d.ts.map +1 -0
  49. package/esm/operationsInterfaces/index.js +10 -0
  50. package/esm/operationsInterfaces/index.js.map +1 -0
  51. package/esm/operationsInterfaces/managementLocks.d.ts +198 -0
  52. package/esm/operationsInterfaces/managementLocks.d.ts.map +1 -0
  53. package/esm/operationsInterfaces/managementLocks.js +9 -0
  54. package/esm/operationsInterfaces/managementLocks.js.map +1 -0
  55. package/package.json +53 -16
  56. package/review/arm-locks.api.md +313 -0
  57. package/rollup.config.js +181 -30
  58. package/src/index.ts +13 -0
  59. package/src/managementLockClient.ts +23 -36
  60. package/src/managementLockClientContext.ts +47 -45
  61. package/src/models/index.ts +256 -470
  62. package/src/models/mappers.ts +72 -82
  63. package/src/models/parameters.ts +97 -55
  64. package/src/operations/authorizationOperations.ts +155 -70
  65. package/src/operations/index.ts +3 -5
  66. package/src/operations/managementLocks.ts +1165 -869
  67. package/src/operationsInterfaces/authorizationOperations.ts +36 -0
  68. package/src/operationsInterfaces/index.ts +10 -0
  69. package/src/operationsInterfaces/managementLocks.ts +332 -0
  70. package/tsconfig.json +3 -2
  71. package/dist/arm-locks.js +0 -1280
  72. package/dist/arm-locks.js.map +0 -1
  73. package/dist/arm-locks.min.js +0 -1
  74. package/dist/arm-locks.min.js.map +0 -1
  75. package/esm/models/authorizationOperationsMappers.d.ts +0 -2
  76. package/esm/models/authorizationOperationsMappers.d.ts.map +0 -1
  77. package/esm/models/authorizationOperationsMappers.js +0 -9
  78. package/esm/models/authorizationOperationsMappers.js.map +0 -1
  79. package/esm/models/managementLocksMappers.d.ts +0 -2
  80. package/esm/models/managementLocksMappers.d.ts.map +0 -1
  81. package/esm/models/managementLocksMappers.js +0 -9
  82. package/esm/models/managementLocksMappers.js.map +0 -1
  83. package/src/models/authorizationOperationsMappers.ts +0 -14
  84. package/src/models/managementLocksMappers.ts +0 -15
@@ -1,68 +1,70 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as Models from "./models";
12
- import * as msRest from "@azure/ms-rest-js";
13
- import { TokenCredential } from "@azure/core-auth";
14
- import * as msRestAzure from "@azure/ms-rest-azure-js";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import { ManagementLockClientOptionalParams } from "./models";
15
12
 
16
- const packageName = "@azure/arm-locks";
17
- const packageVersion = "1.2.0";
18
-
19
- export class ManagementLockClientContext extends msRestAzure.AzureServiceClient {
20
- credentials: msRest.ServiceClientCredentials | TokenCredential;
13
+ export class ManagementLockClientContext extends coreClient.ServiceClient {
14
+ $host: string;
15
+ apiVersion: string;
21
16
  subscriptionId: string;
22
- apiVersion?: string;
23
17
 
24
18
  /**
25
- * Initializes a new instance of the ManagementLockClient class.
26
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
27
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
28
- * more information about these credentials, see
29
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
30
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
31
- * @azure/ms-rest-browserauth are also supported.
19
+ * Initializes a new instance of the ManagementLockClientContext class.
20
+ * @param credentials Subscription credentials which uniquely identify client subscription.
32
21
  * @param subscriptionId The ID of the target subscription.
33
- * @param [options] The parameter options
22
+ * @param options The parameter options
34
23
  */
35
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagementLockClientOptions) {
36
- if (credentials == undefined) {
37
- throw new Error('\'credentials\' cannot be null.');
24
+ constructor(
25
+ credentials: coreAuth.TokenCredential,
26
+ subscriptionId: string,
27
+ options?: ManagementLockClientOptionalParams
28
+ ) {
29
+ if (credentials === undefined) {
30
+ throw new Error("'credentials' cannot be null");
38
31
  }
39
- if (subscriptionId == undefined) {
40
- throw new Error('\'subscriptionId\' cannot be null.');
32
+ if (subscriptionId === undefined) {
33
+ throw new Error("'subscriptionId' cannot be null");
41
34
  }
42
35
 
36
+ // Initializing default values for options
43
37
  if (!options) {
44
38
  options = {};
45
39
  }
46
- if(!options.userAgent) {
47
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
48
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
49
- }
40
+ const defaults: ManagementLockClientOptionalParams = {
41
+ requestContentType: "application/json; charset=utf-8",
42
+ credential: credentials
43
+ };
50
44
 
51
- super(credentials, options);
45
+ const packageDetails = `azsdk-js-arm-locks/2.0.0-beta.1`;
46
+ const userAgentPrefix =
47
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
48
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
49
+ : `${packageDetails}`;
52
50
 
53
- this.apiVersion = '2016-09-01';
54
- this.acceptLanguage = 'en-US';
55
- this.longRunningOperationRetryTimeout = 30;
56
- this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
57
- this.requestContentType = "application/json; charset=utf-8";
58
- this.credentials = credentials;
51
+ if (!options.credentialScopes) {
52
+ options.credentialScopes = ["https://management.azure.com/.default"];
53
+ }
54
+ const optionsWithDefaults = {
55
+ ...defaults,
56
+ ...options,
57
+ userAgentOptions: {
58
+ userAgentPrefix
59
+ },
60
+ baseUri: options.endpoint || "https://management.azure.com"
61
+ };
62
+ super(optionsWithDefaults);
63
+ // Parameter assignments
59
64
  this.subscriptionId = subscriptionId;
60
65
 
61
- if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
62
- this.acceptLanguage = options.acceptLanguage;
63
- }
64
- if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
65
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
66
- }
66
+ // Assigning values to Constant parameters
67
+ this.$host = options.$host || "https://management.azure.com";
68
+ this.apiVersion = options.apiVersion || "2016-09-01";
67
69
  }
68
70
  }