@azure/arm-machinelearningcompute 2.1.1 → 3.0.0-beta.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 (158) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -83
  4. package/dist/index.js +1821 -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/samples-dev/checkUpdateForAnOperationalizationCluster.d.ts +2 -0
  9. package/dist-esm/samples-dev/checkUpdateForAnOperationalizationCluster.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/checkUpdateForAnOperationalizationCluster.js +31 -0
  11. package/dist-esm/samples-dev/checkUpdateForAnOperationalizationCluster.js.map +1 -0
  12. package/dist-esm/samples-dev/deleteOperationalizationCluster.d.ts +2 -0
  13. package/dist-esm/samples-dev/deleteOperationalizationCluster.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/deleteOperationalizationCluster.js +31 -0
  15. package/dist-esm/samples-dev/deleteOperationalizationCluster.js.map +1 -0
  16. package/dist-esm/samples-dev/getOperationalizationCluster.d.ts +2 -0
  17. package/dist-esm/samples-dev/getOperationalizationCluster.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/getOperationalizationCluster.js +31 -0
  19. package/dist-esm/samples-dev/getOperationalizationCluster.js.map +1 -0
  20. package/dist-esm/samples-dev/listKeysOfAnOperationalizationCluster.d.ts +2 -0
  21. package/dist-esm/samples-dev/listKeysOfAnOperationalizationCluster.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/listKeysOfAnOperationalizationCluster.js +31 -0
  23. package/dist-esm/samples-dev/listKeysOfAnOperationalizationCluster.js.map +1 -0
  24. package/dist-esm/samples-dev/listOperationalizationClustersByResourceGroup.d.ts +2 -0
  25. package/dist-esm/samples-dev/listOperationalizationClustersByResourceGroup.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/listOperationalizationClustersByResourceGroup.js +44 -0
  27. package/dist-esm/samples-dev/listOperationalizationClustersByResourceGroup.js.map +1 -0
  28. package/dist-esm/samples-dev/listOperationalizationClustersBySubscription.d.ts +2 -0
  29. package/dist-esm/samples-dev/listOperationalizationClustersBySubscription.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/listOperationalizationClustersBySubscription.js +43 -0
  31. package/dist-esm/samples-dev/listOperationalizationClustersBySubscription.js.map +1 -0
  32. package/dist-esm/samples-dev/machineLearningComputeListAvailableOperations.d.ts +2 -0
  33. package/dist-esm/samples-dev/machineLearningComputeListAvailableOperations.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/machineLearningComputeListAvailableOperations.js +29 -0
  35. package/dist-esm/samples-dev/machineLearningComputeListAvailableOperations.js.map +1 -0
  36. package/dist-esm/samples-dev/patchOperationalizationCluster.d.ts +2 -0
  37. package/dist-esm/samples-dev/patchOperationalizationCluster.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/patchOperationalizationCluster.js +34 -0
  39. package/dist-esm/samples-dev/patchOperationalizationCluster.js.map +1 -0
  40. package/dist-esm/samples-dev/putOperationalizationCluster.d.ts +2 -0
  41. package/dist-esm/samples-dev/putOperationalizationCluster.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/putOperationalizationCluster.js +54 -0
  43. package/dist-esm/samples-dev/putOperationalizationCluster.js.map +1 -0
  44. package/dist-esm/samples-dev/updateSystemServicesInAnOperationalizationCluster.d.ts +2 -0
  45. package/dist-esm/samples-dev/updateSystemServicesInAnOperationalizationCluster.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/updateSystemServicesInAnOperationalizationCluster.js +31 -0
  47. package/dist-esm/samples-dev/updateSystemServicesInAnOperationalizationCluster.js.map +1 -0
  48. package/dist-esm/src/index.d.ts +5 -0
  49. package/dist-esm/src/index.d.ts.map +1 -0
  50. package/dist-esm/src/index.js +12 -0
  51. package/dist-esm/src/index.js.map +1 -0
  52. package/dist-esm/src/lroImpl.d.ts +16 -0
  53. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  54. package/dist-esm/src/lroImpl.js +29 -0
  55. package/dist-esm/src/lroImpl.js.map +1 -0
  56. package/dist-esm/src/machineLearningComputeManagementClient.d.ts +19 -0
  57. package/dist-esm/src/machineLearningComputeManagementClient.d.ts.map +1 -0
  58. package/dist-esm/src/machineLearningComputeManagementClient.js +52 -0
  59. package/dist-esm/src/machineLearningComputeManagementClient.js.map +1 -0
  60. package/dist-esm/src/models/index.d.ts +637 -0
  61. package/dist-esm/src/models/index.d.ts.map +1 -0
  62. package/dist-esm/src/models/index.js +101 -0
  63. package/dist-esm/src/models/index.js.map +1 -0
  64. package/dist-esm/src/models/mappers.d.ts +32 -0
  65. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  66. package/{esm → dist-esm/src}/models/mappers.js +347 -401
  67. package/dist-esm/src/models/mappers.js.map +1 -0
  68. package/dist-esm/src/models/parameters.d.ts +14 -0
  69. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  70. package/dist-esm/src/models/parameters.js +130 -0
  71. package/dist-esm/src/models/parameters.js.map +1 -0
  72. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  73. package/dist-esm/src/operations/index.d.ts.map +1 -0
  74. package/{esm → dist-esm/src}/operations/index.js +1 -2
  75. package/dist-esm/src/operations/index.js.map +1 -0
  76. package/dist-esm/src/operations/machineLearningCompute.d.ts +18 -0
  77. package/dist-esm/src/operations/machineLearningCompute.d.ts.map +1 -0
  78. package/dist-esm/src/operations/machineLearningCompute.js +43 -0
  79. package/dist-esm/src/operations/machineLearningCompute.js.map +1 -0
  80. package/dist-esm/src/operations/operationalizationClusters.d.ts +130 -0
  81. package/dist-esm/src/operations/operationalizationClusters.d.ts.map +1 -0
  82. package/dist-esm/src/operations/operationalizationClusters.js +579 -0
  83. package/dist-esm/src/operations/operationalizationClusters.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  85. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  86. package/{esm/models/machineLearningComputeMappers.js → dist-esm/src/operationsInterfaces/index.js} +3 -2
  87. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/machineLearningCompute.d.ts +10 -0
  89. package/dist-esm/src/operationsInterfaces/machineLearningCompute.d.ts.map +1 -0
  90. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/machineLearningCompute.js} +2 -1
  91. package/dist-esm/src/operationsInterfaces/machineLearningCompute.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operationalizationClusters.d.ts +94 -0
  93. package/dist-esm/src/operationsInterfaces/operationalizationClusters.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operationalizationClusters.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operationalizationClusters.js.map +1 -0
  96. package/dist-esm/test/sampleTest.d.ts +2 -0
  97. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  98. package/dist-esm/test/sampleTest.js +40 -0
  99. package/dist-esm/test/sampleTest.js.map +1 -0
  100. package/package.json +80 -33
  101. package/review/arm-machinelearningcompute.api.md +545 -0
  102. package/rollup.config.js +181 -30
  103. package/src/index.ts +12 -0
  104. package/src/lroImpl.ts +34 -0
  105. package/src/machineLearningComputeManagementClient.ts +68 -34
  106. package/src/models/index.ts +518 -800
  107. package/src/models/mappers.ts +357 -411
  108. package/src/models/parameters.ts +89 -45
  109. package/src/operations/index.ts +1 -2
  110. package/src/operations/machineLearningCompute.ts +29 -43
  111. package/src/operations/operationalizationClusters.ts +589 -461
  112. package/src/{models/machineLearningComputeMappers.ts → operationsInterfaces/index.ts} +2 -6
  113. package/src/operationsInterfaces/machineLearningCompute.ts +23 -0
  114. package/src/operationsInterfaces/operationalizationClusters.ts +189 -0
  115. package/tsconfig.json +5 -4
  116. package/types/arm-machinelearningcompute.d.ts +826 -0
  117. package/types/tsdoc-metadata.json +11 -0
  118. package/dist/arm-machinelearningcompute.js +0 -1764
  119. package/dist/arm-machinelearningcompute.js.map +0 -1
  120. package/dist/arm-machinelearningcompute.min.js +0 -1
  121. package/dist/arm-machinelearningcompute.min.js.map +0 -1
  122. package/esm/machineLearningComputeManagementClient.d.ts +0 -25
  123. package/esm/machineLearningComputeManagementClient.d.ts.map +0 -1
  124. package/esm/machineLearningComputeManagementClient.js +0 -38
  125. package/esm/machineLearningComputeManagementClient.js.map +0 -1
  126. package/esm/machineLearningComputeManagementClientContext.d.ts +0 -22
  127. package/esm/machineLearningComputeManagementClientContext.d.ts.map +0 -1
  128. package/esm/machineLearningComputeManagementClientContext.js +0 -60
  129. package/esm/machineLearningComputeManagementClientContext.js.map +0 -1
  130. package/esm/models/index.d.ts +0 -925
  131. package/esm/models/index.d.ts.map +0 -1
  132. package/esm/models/index.js.map +0 -1
  133. package/esm/models/machineLearningComputeMappers.d.ts +0 -2
  134. package/esm/models/machineLearningComputeMappers.d.ts.map +0 -1
  135. package/esm/models/machineLearningComputeMappers.js.map +0 -1
  136. package/esm/models/mappers.d.ts +0 -34
  137. package/esm/models/mappers.d.ts.map +0 -1
  138. package/esm/models/mappers.js.map +0 -1
  139. package/esm/models/operationalizationClustersMappers.d.ts +0 -2
  140. package/esm/models/operationalizationClustersMappers.d.ts.map +0 -1
  141. package/esm/models/operationalizationClustersMappers.js +0 -9
  142. package/esm/models/operationalizationClustersMappers.js.map +0 -1
  143. package/esm/models/parameters.d.ts +0 -10
  144. package/esm/models/parameters.d.ts.map +0 -1
  145. package/esm/models/parameters.js +0 -104
  146. package/esm/models/parameters.js.map +0 -1
  147. package/esm/operations/index.d.ts.map +0 -1
  148. package/esm/operations/index.js.map +0 -1
  149. package/esm/operations/machineLearningCompute.d.ts +0 -28
  150. package/esm/operations/machineLearningCompute.d.ts.map +0 -1
  151. package/esm/operations/machineLearningCompute.js +0 -50
  152. package/esm/operations/machineLearningCompute.js.map +0 -1
  153. package/esm/operations/operationalizationClusters.d.ts +0 -223
  154. package/esm/operations/operationalizationClusters.d.ts.map +0 -1
  155. package/esm/operations/operationalizationClusters.js +0 -441
  156. package/esm/operations/operationalizationClusters.js.map +0 -1
  157. package/src/machineLearningComputeManagementClientContext.ts +0 -67
  158. package/src/models/operationalizationClustersMappers.ts +0 -39
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/machineLearningComputeManagementClient.js",
10
- external: [
11
- "@azure/ms-rest-js",
12
- "@azure/ms-rest-azure-js"
13
- ],
14
- output: {
15
- file: "./dist/arm-machinelearningcompute.js",
16
- format: "umd",
17
- name: "Azure.ArmMachinelearningcompute",
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"));
package/src/index.ts ADDED
@@ -0,0 +1,12 @@
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 { MachineLearningComputeManagementClient } from "./machineLearningComputeManagementClient";
12
+ 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
+ }
@@ -3,47 +3,81 @@
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";
15
- import { MachineLearningComputeManagementClientContext } from "./machineLearningComputeManagementClientContext";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import {
12
+ OperationalizationClustersImpl,
13
+ MachineLearningComputeImpl
14
+ } from "./operations";
15
+ import {
16
+ OperationalizationClusters,
17
+ MachineLearningCompute
18
+ } from "./operationsInterfaces";
19
+ import { MachineLearningComputeManagementClientOptionalParams } from "./models";
16
20
 
17
-
18
- class MachineLearningComputeManagementClient extends MachineLearningComputeManagementClientContext {
19
- // Operation groups
20
- operationalizationClusters: operations.OperationalizationClusters;
21
- machineLearningCompute: operations.MachineLearningCompute;
21
+ export class MachineLearningComputeManagementClient extends coreClient.ServiceClient {
22
+ $host: string;
23
+ apiVersion: string;
24
+ subscriptionId: string;
22
25
 
23
26
  /**
24
27
  * Initializes a new instance of the MachineLearningComputeManagementClient 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.
28
+ * @param credentials Subscription credentials which uniquely identify client subscription.
31
29
  * @param subscriptionId The Azure subscription ID.
32
- * @param [options] The parameter options
30
+ * @param options The parameter options
33
31
  */
34
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MachineLearningComputeManagementClientOptions) {
35
- super(credentials, subscriptionId, options);
36
- this.operationalizationClusters = new operations.OperationalizationClusters(this);
37
- this.machineLearningCompute = new operations.MachineLearningCompute(this);
38
- }
39
- }
32
+ constructor(
33
+ credentials: coreAuth.TokenCredential,
34
+ subscriptionId: string,
35
+ options?: MachineLearningComputeManagementClientOptionalParams
36
+ ) {
37
+ if (credentials === undefined) {
38
+ throw new Error("'credentials' cannot be null");
39
+ }
40
+ if (subscriptionId === undefined) {
41
+ throw new Error("'subscriptionId' cannot be null");
42
+ }
43
+
44
+ // Initializing default values for options
45
+ if (!options) {
46
+ options = {};
47
+ }
48
+ const defaults: MachineLearningComputeManagementClientOptionalParams = {
49
+ requestContentType: "application/json; charset=utf-8",
50
+ credential: credentials
51
+ };
40
52
 
41
- // Operation Specifications
53
+ const packageDetails = `azsdk-js-arm-machinelearningcompute/3.0.0-beta.1`;
54
+ const userAgentPrefix =
55
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
56
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
57
+ : `${packageDetails}`;
42
58
 
43
- export {
44
- MachineLearningComputeManagementClient,
45
- MachineLearningComputeManagementClientContext,
46
- Models as MachineLearningComputeManagementModels,
47
- Mappers as MachineLearningComputeManagementMappers
48
- };
49
- export * from "./operations";
59
+ if (!options.credentialScopes) {
60
+ options.credentialScopes = ["https://management.azure.com/.default"];
61
+ }
62
+ const optionsWithDefaults = {
63
+ ...defaults,
64
+ ...options,
65
+ userAgentOptions: {
66
+ userAgentPrefix
67
+ },
68
+ baseUri: options.endpoint || "https://management.azure.com"
69
+ };
70
+ super(optionsWithDefaults);
71
+ // Parameter assignments
72
+ this.subscriptionId = subscriptionId;
73
+
74
+ // Assigning values to Constant parameters
75
+ this.$host = options.$host || "https://management.azure.com";
76
+ this.apiVersion = options.apiVersion || "2017-08-01-preview";
77
+ this.operationalizationClusters = new OperationalizationClustersImpl(this);
78
+ this.machineLearningCompute = new MachineLearningComputeImpl(this);
79
+ }
80
+
81
+ operationalizationClusters: OperationalizationClusters;
82
+ machineLearningCompute: MachineLearningCompute;
83
+ }