@azure/arm-datalake-analytics 1.1.1 → 2.0.0-alpha.20211220.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 (217) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +69 -91
  4. package/dist/index.js +4780 -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/dist-esm/src/dataLakeAnalyticsAccountManagementClient.d.ts +22 -0
  9. package/dist-esm/src/dataLakeAnalyticsAccountManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/dataLakeAnalyticsAccountManagementClient.js +29 -0
  11. package/dist-esm/src/dataLakeAnalyticsAccountManagementClient.js.map +1 -0
  12. package/dist-esm/src/dataLakeAnalyticsAccountManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/dataLakeAnalyticsAccountManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/dataLakeAnalyticsAccountManagementClientContext.js +50 -0
  15. package/dist-esm/src/dataLakeAnalyticsAccountManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +1346 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +31 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +56 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +1439 -1205
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +32 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +254 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/accounts.d.ts +120 -0
  37. package/dist-esm/src/operations/accounts.d.ts.map +1 -0
  38. package/dist-esm/src/operations/accounts.js +569 -0
  39. package/dist-esm/src/operations/accounts.js.map +1 -0
  40. package/dist-esm/src/operations/computePolicies.d.ts +76 -0
  41. package/dist-esm/src/operations/computePolicies.d.ts.map +1 -0
  42. package/dist-esm/src/operations/computePolicies.js +280 -0
  43. package/dist-esm/src/operations/computePolicies.js.map +1 -0
  44. package/dist-esm/src/operations/dataLakeStoreAccounts.d.ts +64 -0
  45. package/dist-esm/src/operations/dataLakeStoreAccounts.d.ts.map +1 -0
  46. package/dist-esm/src/operations/dataLakeStoreAccounts.js +250 -0
  47. package/dist-esm/src/operations/dataLakeStoreAccounts.js.map +1 -0
  48. package/dist-esm/src/operations/firewallRules.d.ts +72 -0
  49. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -0
  50. package/dist-esm/src/operations/firewallRules.js +270 -0
  51. package/dist-esm/src/operations/firewallRules.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/{esm → dist-esm/src}/operations/index.js +1 -2
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/locations.d.ts +20 -0
  57. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  58. package/dist-esm/src/operations/locations.js +53 -0
  59. package/dist-esm/src/operations/locations.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +18 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +46 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/storageAccounts.d.ts +153 -0
  65. package/dist-esm/src/operations/storageAccounts.d.ts.map +1 -0
  66. package/dist-esm/src/operations/storageAccounts.js +594 -0
  67. package/dist-esm/src/operations/storageAccounts.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/accounts.d.ts +82 -0
  69. package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
  70. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/accounts.js} +2 -1
  71. package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/computePolicies.d.ts +50 -0
  73. package/dist-esm/src/operationsInterfaces/computePolicies.d.ts.map +1 -0
  74. package/{src/models/locationsMappers.ts → dist-esm/src/operationsInterfaces/computePolicies.js} +2 -7
  75. package/dist-esm/src/operationsInterfaces/computePolicies.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/dataLakeStoreAccounts.d.ts +38 -0
  77. package/dist-esm/src/operationsInterfaces/dataLakeStoreAccounts.d.ts.map +1 -0
  78. package/{esm/models/locationsMappers.js → dist-esm/src/operationsInterfaces/dataLakeStoreAccounts.js} +2 -2
  79. package/dist-esm/src/operationsInterfaces/dataLakeStoreAccounts.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts +47 -0
  81. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/firewallRules.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/firewallRules.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  85. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  87. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/locations.d.ts +12 -0
  89. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts +81 -0
  97. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/storageAccounts.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/storageAccounts.js.map +1 -0
  100. package/dist-esm/test/sampleTest.d.ts +4 -0
  101. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  102. package/dist-esm/test/sampleTest.js +89 -0
  103. package/dist-esm/test/sampleTest.js.map +1 -0
  104. package/package.json +65 -22
  105. package/review/arm-datalake-analytics.api.md +935 -0
  106. package/rollup.config.js +181 -30
  107. package/src/dataLakeAnalyticsAccountManagementClient.ts +45 -44
  108. package/src/dataLakeAnalyticsAccountManagementClientContext.ts +46 -43
  109. package/src/index.ts +13 -0
  110. package/src/lroImpl.ts +34 -0
  111. package/src/models/index.ts +1160 -1948
  112. package/src/models/mappers.ts +1446 -1179
  113. package/src/models/parameters.ts +183 -93
  114. package/src/operations/accounts.ts +540 -372
  115. package/src/operations/computePolicies.ts +225 -254
  116. package/src/operations/dataLakeStoreAccounts.ts +213 -220
  117. package/src/operations/firewallRules.ts +222 -255
  118. package/src/operations/index.ts +1 -2
  119. package/src/operations/locations.ts +32 -44
  120. package/src/operations/operations.ts +24 -38
  121. package/src/operations/storageAccounts.ts +562 -476
  122. package/src/operationsInterfaces/accounts.ts +155 -0
  123. package/src/operationsInterfaces/computePolicies.ts +95 -0
  124. package/src/operationsInterfaces/dataLakeStoreAccounts.ts +73 -0
  125. package/src/operationsInterfaces/firewallRules.ts +92 -0
  126. package/src/operationsInterfaces/index.ts +15 -0
  127. package/src/operationsInterfaces/locations.ts +26 -0
  128. package/src/operationsInterfaces/operations.ts +21 -0
  129. package/src/operationsInterfaces/storageAccounts.ts +147 -0
  130. package/tsconfig.json +3 -3
  131. package/types/arm-datalake-analytics.d.ts +1829 -0
  132. package/types/tsdoc-metadata.json +11 -0
  133. package/dist/arm-datalake-analytics.js +0 -4239
  134. package/dist/arm-datalake-analytics.js.map +0 -1
  135. package/dist/arm-datalake-analytics.min.js +0 -1
  136. package/dist/arm-datalake-analytics.min.js.map +0 -1
  137. package/esm/dataLakeAnalyticsAccountManagementClient.d.ts +0 -31
  138. package/esm/dataLakeAnalyticsAccountManagementClient.d.ts.map +0 -1
  139. package/esm/dataLakeAnalyticsAccountManagementClient.js +0 -44
  140. package/esm/dataLakeAnalyticsAccountManagementClient.js.map +0 -1
  141. package/esm/dataLakeAnalyticsAccountManagementClientContext.d.ts +0 -23
  142. package/esm/dataLakeAnalyticsAccountManagementClientContext.d.ts.map +0 -1
  143. package/esm/dataLakeAnalyticsAccountManagementClientContext.js +0 -61
  144. package/esm/dataLakeAnalyticsAccountManagementClientContext.js.map +0 -1
  145. package/esm/models/accountsMappers.d.ts +0 -2
  146. package/esm/models/accountsMappers.d.ts.map +0 -1
  147. package/esm/models/accountsMappers.js +0 -9
  148. package/esm/models/accountsMappers.js.map +0 -1
  149. package/esm/models/computePoliciesMappers.d.ts +0 -2
  150. package/esm/models/computePoliciesMappers.d.ts.map +0 -1
  151. package/esm/models/computePoliciesMappers.js +0 -9
  152. package/esm/models/computePoliciesMappers.js.map +0 -1
  153. package/esm/models/dataLakeStoreAccountsMappers.d.ts +0 -2
  154. package/esm/models/dataLakeStoreAccountsMappers.d.ts.map +0 -1
  155. package/esm/models/dataLakeStoreAccountsMappers.js +0 -9
  156. package/esm/models/dataLakeStoreAccountsMappers.js.map +0 -1
  157. package/esm/models/firewallRulesMappers.d.ts +0 -2
  158. package/esm/models/firewallRulesMappers.d.ts.map +0 -1
  159. package/esm/models/firewallRulesMappers.js +0 -9
  160. package/esm/models/firewallRulesMappers.js.map +0 -1
  161. package/esm/models/index.d.ts +0 -2162
  162. package/esm/models/index.d.ts.map +0 -1
  163. package/esm/models/index.js.map +0 -1
  164. package/esm/models/locationsMappers.d.ts +0 -2
  165. package/esm/models/locationsMappers.d.ts.map +0 -1
  166. package/esm/models/locationsMappers.js.map +0 -1
  167. package/esm/models/mappers.d.ts +0 -56
  168. package/esm/models/mappers.d.ts.map +0 -1
  169. package/esm/models/mappers.js.map +0 -1
  170. package/esm/models/operationsMappers.d.ts +0 -2
  171. package/esm/models/operationsMappers.d.ts.map +0 -1
  172. package/esm/models/operationsMappers.js +0 -9
  173. package/esm/models/operationsMappers.js.map +0 -1
  174. package/esm/models/parameters.d.ts +0 -20
  175. package/esm/models/parameters.d.ts.map +0 -1
  176. package/esm/models/parameters.js +0 -208
  177. package/esm/models/parameters.js.map +0 -1
  178. package/esm/models/storageAccountsMappers.d.ts +0 -2
  179. package/esm/models/storageAccountsMappers.d.ts.map +0 -1
  180. package/esm/models/storageAccountsMappers.js +0 -9
  181. package/esm/models/storageAccountsMappers.js.map +0 -1
  182. package/esm/operations/accounts.d.ts +0 -188
  183. package/esm/operations/accounts.d.ts.map +0 -1
  184. package/esm/operations/accounts.js +0 -406
  185. package/esm/operations/accounts.js.map +0 -1
  186. package/esm/operations/computePolicies.d.ts +0 -158
  187. package/esm/operations/computePolicies.d.ts.map +0 -1
  188. package/esm/operations/computePolicies.js +0 -230
  189. package/esm/operations/computePolicies.js.map +0 -1
  190. package/esm/operations/dataLakeStoreAccounts.d.ts +0 -128
  191. package/esm/operations/dataLakeStoreAccounts.d.ts.map +0 -1
  192. package/esm/operations/dataLakeStoreAccounts.js +0 -200
  193. package/esm/operations/dataLakeStoreAccounts.js.map +0 -1
  194. package/esm/operations/firewallRules.d.ts +0 -152
  195. package/esm/operations/firewallRules.d.ts.map +0 -1
  196. package/esm/operations/firewallRules.js +0 -230
  197. package/esm/operations/firewallRules.js.map +0 -1
  198. package/esm/operations/index.d.ts.map +0 -1
  199. package/esm/operations/index.js.map +0 -1
  200. package/esm/operations/locations.d.ts +0 -32
  201. package/esm/operations/locations.d.ts.map +0 -1
  202. package/esm/operations/locations.js +0 -56
  203. package/esm/operations/locations.js.map +0 -1
  204. package/esm/operations/operations.d.ts +0 -28
  205. package/esm/operations/operations.d.ts.map +0 -1
  206. package/esm/operations/operations.js +0 -50
  207. package/esm/operations/operations.js.map +0 -1
  208. package/esm/operations/storageAccounts.d.ts +0 -293
  209. package/esm/operations/storageAccounts.d.ts.map +0 -1
  210. package/esm/operations/storageAccounts.js +0 -398
  211. package/esm/operations/storageAccounts.js.map +0 -1
  212. package/src/models/accountsMappers.ts +0 -38
  213. package/src/models/computePoliciesMappers.ts +0 -28
  214. package/src/models/dataLakeStoreAccountsMappers.ts +0 -27
  215. package/src/models/firewallRulesMappers.ts +0 -28
  216. package/src/models/operationsMappers.ts +0 -21
  217. package/src/models/storageAccountsMappers.ts +0 -31
package/rollup.config.js CHANGED
@@ -1,37 +1,188 @@
1
- import rollup from "rollup";
2
- import nodeResolve from "rollup-plugin-node-resolve";
3
- import sourcemaps from "rollup-plugin-sourcemaps";
4
-
5
- /**
6
- * @type {rollup.RollupFileOptions}
7
- */
8
- const config = {
9
- input: "./esm/dataLakeAnalyticsAccountManagementClient.js",
10
- external: [
11
- "@azure/ms-rest-js",
12
- "@azure/ms-rest-azure-js"
13
- ],
14
- output: {
15
- file: "./dist/arm-datalake-analytics.js",
16
- format: "umd",
17
- name: "Azure.ArmDatalakeAnalytics",
18
- sourcemap: true,
19
- globals: {
20
- "@azure/ms-rest-js": "msRest",
21
- "@azure/ms-rest-azure-js": "msRestAzure"
22
- },
23
- banner: `/*
1
+ /*
24
2
  * Copyright (c) Microsoft Corporation.
25
3
  * Licensed under the MIT License.
26
4
  *
27
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
28
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
29
- */`
30
- },
31
- plugins: [
32
- nodeResolve({ mainFields: ['module', 'main'] }),
33
- sourcemaps()
34
- ]
7
+ */
8
+
9
+ import nodeResolve from "@rollup/plugin-node-resolve";
10
+ import cjs from "@rollup/plugin-commonjs";
11
+ import sourcemaps from "rollup-plugin-sourcemaps";
12
+ import multiEntry from "@rollup/plugin-multi-entry";
13
+ import json from "@rollup/plugin-json";
14
+
15
+ import nodeBuiltins from "builtin-modules";
16
+
17
+ /**
18
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19
+ *
20
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
21
+ * __exportStar downleveled helper function to declare its exports which confuses
22
+ * rollup's automatic discovery mechanism.
23
+ *
24
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
25
+ */
26
+ export function openTelemetryCommonJs() {
27
+ const namedExports = {};
28
+
29
+ for (const key of [
30
+ "@opentelemetry/api",
31
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
32
+ ]) {
33
+ namedExports[key] = [
34
+ "SpanKind",
35
+ "TraceFlags",
36
+ "getSpan",
37
+ "setSpan",
38
+ "SpanStatusCode",
39
+ "getSpanContext",
40
+ "setSpanContext"
41
+ ];
42
+ }
43
+
44
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45
+
46
+ for (const version of releasedOpenTelemetryVersions) {
47
+ namedExports[
48
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50
+ ] = [
51
+ "SpanKind",
52
+ "TraceFlags",
53
+ "getSpan",
54
+ "setSpan",
55
+ "StatusCode",
56
+ "CanonicalCode",
57
+ "getSpanContext",
58
+ "setSpanContext"
59
+ ];
60
+ }
61
+
62
+ return namedExports;
63
+ }
64
+
65
+ // #region Warning Handler
66
+
67
+ /**
68
+ * A function that can determine whether a rollupwarning should be ignored. If
69
+ * the function returns `true`, then the warning will not be displayed.
70
+ */
71
+
72
+ function ignoreNiseSinonEvalWarnings(warning) {
73
+ return (
74
+ warning.code === "EVAL" &&
75
+ warning.id &&
76
+ (warning.id.includes("node_modules/nise") ||
77
+ warning.id.includes("node_modules/sinon")) === true
78
+ );
79
+ }
80
+
81
+ function ignoreChaiCircularDependencyWarnings(warning) {
82
+ return (
83
+ warning.code === "CIRCULAR_DEPENDENCY" &&
84
+ warning.importer && warning.importer.includes("node_modules/chai") === true
85
+ );
86
+ }
87
+
88
+ const warningInhibitors = [
89
+ ignoreChaiCircularDependencyWarnings,
90
+ ignoreNiseSinonEvalWarnings
91
+ ];
92
+
93
+ /**
94
+ * Construct a warning handler for the shared rollup configuration
95
+ * that ignores certain warnings that are not relevant to testing.
96
+ */
97
+ function makeOnWarnForTesting() {
98
+ return (warning, warn) => {
99
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
100
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
101
+ warn(warning);
102
+ }
103
+ };
104
+ }
105
+
106
+ // #endregion
107
+
108
+ function makeBrowserTestConfig() {
109
+ const config = {
110
+ input: {
111
+ include: ["dist-esm/test/**/*.spec.js"],
112
+ exclude: ["dist-esm/test/**/node/**"]
113
+ },
114
+ output: {
115
+ file: `dist-test/index.browser.js`,
116
+ format: "umd",
117
+ sourcemap: true
118
+ },
119
+ preserveSymlinks: false,
120
+ plugins: [
121
+ multiEntry({ exports: false }),
122
+ nodeResolve({
123
+ mainFields: ["module", "browser"]
124
+ }),
125
+ cjs({
126
+ namedExports: {
127
+ // Chai's strange internal architecture makes it impossible to statically
128
+ // analyze its exports.
129
+ chai: [
130
+ "version",
131
+ "use",
132
+ "util",
133
+ "config",
134
+ "expect",
135
+ "should",
136
+ "assert"
137
+ ],
138
+ ...openTelemetryCommonJs()
139
+ }
140
+ }),
141
+ json(),
142
+ sourcemaps()
143
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
144
+ ],
145
+ onwarn: makeOnWarnForTesting(),
146
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
147
+ // rollup started respecting the "sideEffects" field in package.json. Since
148
+ // our package.json sets "sideEffects=false", this also applies to test
149
+ // code, which causes all tests to be removed by tree-shaking.
150
+ treeshake: false
151
+ };
152
+
153
+ return config;
154
+ }
155
+
156
+ const defaultConfigurationOptions = {
157
+ disableBrowserBundle: false
35
158
  };
36
159
 
37
- export default config;
160
+ export function makeConfig(pkg, options) {
161
+ options = {
162
+ ...defaultConfigurationOptions,
163
+ ...(options || {})
164
+ };
165
+
166
+ const baseConfig = {
167
+ // Use the package's module field if it has one
168
+ input: pkg["module"] || "dist-esm/src/index.js",
169
+ external: [
170
+ ...nodeBuiltins,
171
+ ...Object.keys(pkg.dependencies),
172
+ ...Object.keys(pkg.devDependencies)
173
+ ],
174
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175
+ preserveSymlinks: false,
176
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
177
+ };
178
+
179
+ const config = [baseConfig];
180
+
181
+ if (!options.disableBrowserBundle) {
182
+ config.push(makeBrowserTestConfig());
183
+ }
184
+
185
+ return config;
186
+ }
187
+
188
+ export default makeConfig(require("./package.json"));
@@ -3,58 +3,59 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import { TokenCredential } from "@azure/core-auth";
12
- import * as Models from "./models";
13
- import * as Mappers from "./models/mappers";
14
- import * as operations from "./operations";
9
+ import * as coreAuth from "@azure/core-auth";
10
+ import {
11
+ AccountsImpl,
12
+ DataLakeStoreAccountsImpl,
13
+ StorageAccountsImpl,
14
+ ComputePoliciesImpl,
15
+ FirewallRulesImpl,
16
+ OperationsImpl,
17
+ LocationsImpl
18
+ } from "./operations";
19
+ import {
20
+ Accounts,
21
+ DataLakeStoreAccounts,
22
+ StorageAccounts,
23
+ ComputePolicies,
24
+ FirewallRules,
25
+ Operations,
26
+ Locations
27
+ } from "./operationsInterfaces";
15
28
  import { DataLakeAnalyticsAccountManagementClientContext } from "./dataLakeAnalyticsAccountManagementClientContext";
29
+ import { DataLakeAnalyticsAccountManagementClientOptionalParams } from "./models";
16
30
 
17
-
18
- class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsAccountManagementClientContext {
19
- // Operation groups
20
- accounts: operations.Accounts;
21
- dataLakeStoreAccounts: operations.DataLakeStoreAccounts;
22
- storageAccounts: operations.StorageAccounts;
23
- computePolicies: operations.ComputePolicies;
24
- firewallRules: operations.FirewallRules;
25
- operations: operations.Operations;
26
- locations: operations.Locations;
27
-
31
+ export class DataLakeAnalyticsAccountManagementClient extends DataLakeAnalyticsAccountManagementClientContext {
28
32
  /**
29
33
  * Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class.
30
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
31
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
32
- * more information about these credentials, see
33
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
34
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
35
- * @azure/ms-rest-browserauth are also supported.
34
+ * @param credentials Subscription credentials which uniquely identify client subscription.
36
35
  * @param subscriptionId Get subscription credentials which uniquely identify Microsoft Azure
37
- * subscription. The subscription ID forms part of the URI for every service call.
38
- * @param [options] The parameter options
36
+ * subscription. The subscription ID forms part of the URI for every service call.
37
+ * @param options The parameter options
39
38
  */
40
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.DataLakeAnalyticsAccountManagementClientOptions) {
39
+ constructor(
40
+ credentials: coreAuth.TokenCredential,
41
+ subscriptionId: string,
42
+ options?: DataLakeAnalyticsAccountManagementClientOptionalParams
43
+ ) {
41
44
  super(credentials, subscriptionId, options);
42
- this.accounts = new operations.Accounts(this);
43
- this.dataLakeStoreAccounts = new operations.DataLakeStoreAccounts(this);
44
- this.storageAccounts = new operations.StorageAccounts(this);
45
- this.computePolicies = new operations.ComputePolicies(this);
46
- this.firewallRules = new operations.FirewallRules(this);
47
- this.operations = new operations.Operations(this);
48
- this.locations = new operations.Locations(this);
45
+ this.accounts = new AccountsImpl(this);
46
+ this.dataLakeStoreAccounts = new DataLakeStoreAccountsImpl(this);
47
+ this.storageAccounts = new StorageAccountsImpl(this);
48
+ this.computePolicies = new ComputePoliciesImpl(this);
49
+ this.firewallRules = new FirewallRulesImpl(this);
50
+ this.operations = new OperationsImpl(this);
51
+ this.locations = new LocationsImpl(this);
49
52
  }
50
- }
51
53
 
52
- // Operation Specifications
53
-
54
- export {
55
- DataLakeAnalyticsAccountManagementClient,
56
- DataLakeAnalyticsAccountManagementClientContext,
57
- Models as DataLakeAnalyticsAccountManagementModels,
58
- Mappers as DataLakeAnalyticsAccountManagementMappers
59
- };
60
- export * from "./operations";
54
+ accounts: Accounts;
55
+ dataLakeStoreAccounts: DataLakeStoreAccounts;
56
+ storageAccounts: StorageAccounts;
57
+ computePolicies: ComputePolicies;
58
+ firewallRules: FirewallRules;
59
+ operations: Operations;
60
+ locations: Locations;
61
+ }
@@ -3,66 +3,69 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as Models from "./models";
11
- import * as msRest from "@azure/ms-rest-js";
12
- import { TokenCredential } from "@azure/core-auth";
13
- 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 { DataLakeAnalyticsAccountManagementClientOptionalParams } from "./models";
14
12
 
15
- const packageName = "@azure/arm-datalake-analytics";
16
- const packageVersion = "1.1.1";
17
-
18
- export class DataLakeAnalyticsAccountManagementClientContext extends msRestAzure.AzureServiceClient {
19
- credentials: msRest.ServiceClientCredentials | TokenCredential;
13
+ export class DataLakeAnalyticsAccountManagementClientContext extends coreClient.ServiceClient {
14
+ $host: string;
20
15
  subscriptionId: string;
21
- apiVersion?: string;
16
+ apiVersion: string;
22
17
 
23
18
  /**
24
- * Initializes a new instance of the DataLakeAnalyticsAccountManagementClient class.
25
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
26
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
27
- * more information about these credentials, see
28
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
29
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
30
- * @azure/ms-rest-browserauth are also supported.
19
+ * Initializes a new instance of the DataLakeAnalyticsAccountManagementClientContext class.
20
+ * @param credentials Subscription credentials which uniquely identify client subscription.
31
21
  * @param subscriptionId Get subscription credentials which uniquely identify Microsoft Azure
32
- * subscription. The subscription ID forms part of the URI for every service call.
33
- * @param [options] The parameter options
22
+ * subscription. The subscription ID forms part of the URI for every service call.
23
+ * @param options The parameter options
34
24
  */
35
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.DataLakeAnalyticsAccountManagementClientOptions) {
36
- if (credentials == undefined) {
37
- throw new Error('\'credentials\' cannot be null.');
25
+ constructor(
26
+ credentials: coreAuth.TokenCredential,
27
+ subscriptionId: string,
28
+ options?: DataLakeAnalyticsAccountManagementClientOptionalParams
29
+ ) {
30
+ if (credentials === undefined) {
31
+ throw new Error("'credentials' cannot be null");
38
32
  }
39
- if (subscriptionId == undefined) {
40
- throw new Error('\'subscriptionId\' cannot be null.');
33
+ if (subscriptionId === undefined) {
34
+ throw new Error("'subscriptionId' cannot be null");
41
35
  }
42
36
 
37
+ // Initializing default values for options
43
38
  if (!options) {
44
39
  options = {};
45
40
  }
46
- if (!options.userAgent) {
47
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
48
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
49
- }
41
+ const defaults: DataLakeAnalyticsAccountManagementClientOptionalParams = {
42
+ requestContentType: "application/json; charset=utf-8",
43
+ credential: credentials
44
+ };
50
45
 
51
- super(credentials, options);
46
+ const packageDetails = `azsdk-js-arm-datalake-analytics/2.0.0-beta.1`;
47
+ const userAgentPrefix =
48
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
49
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
50
+ : `${packageDetails}`;
52
51
 
53
- this.apiVersion = '2016-11-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;
52
+ if (!options.credentialScopes) {
53
+ options.credentialScopes = ["https://management.azure.com/.default"];
54
+ }
55
+ const optionsWithDefaults = {
56
+ ...defaults,
57
+ ...options,
58
+ userAgentOptions: {
59
+ userAgentPrefix
60
+ },
61
+ baseUri: options.endpoint || "https://management.azure.com"
62
+ };
63
+ super(optionsWithDefaults);
64
+ // Parameter assignments
59
65
  this.subscriptionId = subscriptionId;
60
66
 
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
- }
67
+ // Assigning values to Constant parameters
68
+ this.$host = options.$host || "https://management.azure.com";
69
+ this.apiVersion = options.apiVersion || "2019-11-01-preview";
67
70
  }
68
71
  }
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ /// <reference lib="esnext.asynciterable" />
10
+ export * from "./models";
11
+ export { DataLakeAnalyticsAccountManagementClient } from "./dataLakeAnalyticsAccountManagementClient";
12
+ export { DataLakeAnalyticsAccountManagementClientContext } from "./dataLakeAnalyticsAccountManagementClientContext";
13
+ export * from "./operationsInterfaces";
package/src/lroImpl.ts ADDED
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { LongRunningOperation, LroResponse } from "@azure/core-lro";
10
+
11
+ export class LroImpl<T> implements LongRunningOperation<T> {
12
+ constructor(
13
+ private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
14
+ private args: Record<string, unknown>,
15
+ private spec: {
16
+ readonly requestBody?: unknown;
17
+ readonly path?: string;
18
+ readonly httpMethod: string;
19
+ } & Record<string, any>,
20
+ public requestPath: string = spec.path!,
21
+ public requestMethod: string = spec.httpMethod
22
+ ) {}
23
+ public async sendInitialRequest(): Promise<LroResponse<T>> {
24
+ return this.sendOperationFn(this.args, this.spec);
25
+ }
26
+ public async sendPollRequest(path: string): Promise<LroResponse<T>> {
27
+ const { requestBody, ...restSpec } = this.spec;
28
+ return this.sendOperationFn(this.args, {
29
+ ...restSpec,
30
+ path,
31
+ httpMethod: "GET"
32
+ });
33
+ }
34
+ }