@azure/arm-operations 4.0.0-beta.1 → 4.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +7 -10
  2. package/README.md +4 -0
  3. package/dist/index.js +8 -32
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +0 -1
  8. package/dist-esm/src/index.d.ts.map +1 -1
  9. package/dist-esm/src/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -1
  11. package/dist-esm/src/models/index.d.ts +2 -2
  12. package/dist-esm/src/models/index.d.ts.map +1 -1
  13. package/dist-esm/src/models/mappers.d.ts +1 -1
  14. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  15. package/dist-esm/src/models/mappers.js +3 -3
  16. package/dist-esm/src/models/mappers.js.map +1 -1
  17. package/dist-esm/src/operations/managementAssociations.d.ts +2 -2
  18. package/dist-esm/src/operations/managementAssociations.d.ts.map +1 -1
  19. package/dist-esm/src/operations/managementAssociations.js.map +1 -1
  20. package/dist-esm/src/operations/managementConfigurations.d.ts +2 -2
  21. package/dist-esm/src/operations/managementConfigurations.d.ts.map +1 -1
  22. package/dist-esm/src/operations/managementConfigurations.js.map +1 -1
  23. package/dist-esm/src/operations/operations.d.ts +2 -2
  24. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  25. package/dist-esm/src/operations/operations.js.map +1 -1
  26. package/dist-esm/src/operations/solutions.d.ts +2 -2
  27. package/dist-esm/src/operations/solutions.d.ts.map +1 -1
  28. package/dist-esm/src/operations/solutions.js.map +1 -1
  29. package/dist-esm/src/operationsManagementClient.d.ts +8 -2
  30. package/dist-esm/src/operationsManagementClient.d.ts.map +1 -1
  31. package/dist-esm/src/operationsManagementClient.js +44 -3
  32. package/dist-esm/src/operationsManagementClient.js.map +1 -1
  33. package/package.json +8 -8
  34. package/review/arm-operations.api.md +9 -15
  35. package/src/index.ts +0 -1
  36. package/src/models/index.ts +2 -2
  37. package/src/models/mappers.ts +3 -3
  38. package/src/operations/managementAssociations.ts +3 -3
  39. package/src/operations/managementConfigurations.ts +3 -3
  40. package/src/operations/operations.ts +3 -3
  41. package/src/operations/solutions.ts +3 -3
  42. package/src/operationsManagementClient.ts +61 -10
  43. package/types/arm-operations.d.ts +8 -22
  44. package/types/tsdoc-metadata.json +1 -1
  45. package/dist-esm/src/operationsManagementClientContext.d.ts +0 -23
  46. package/dist-esm/src/operationsManagementClientContext.d.ts.map +0 -1
  47. package/dist-esm/src/operationsManagementClientContext.js +0 -65
  48. package/dist-esm/src/operationsManagementClientContext.js.map +0 -1
  49. package/src/operationsManagementClientContext.ts +0 -92
@@ -5,9 +5,9 @@
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 * as coreClient from "@azure/core-client";
8
9
  import { SolutionsImpl, ManagementAssociationsImpl, ManagementConfigurationsImpl, OperationsImpl } from "./operations";
9
- import { OperationsManagementClientContext } from "./operationsManagementClientContext";
10
- export class OperationsManagementClient extends OperationsManagementClientContext {
10
+ export class OperationsManagementClient extends coreClient.ServiceClient {
11
11
  /**
12
12
  * Initializes a new instance of the OperationsManagementClient class.
13
13
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -19,7 +19,48 @@ export class OperationsManagementClient extends OperationsManagementClientContex
19
19
  * @param options The parameter options
20
20
  */
21
21
  constructor(credentials, subscriptionId, providerName, resourceType, resourceName, options) {
22
- super(credentials, subscriptionId, providerName, resourceType, resourceName, options);
22
+ if (credentials === undefined) {
23
+ throw new Error("'credentials' cannot be null");
24
+ }
25
+ if (subscriptionId === undefined) {
26
+ throw new Error("'subscriptionId' cannot be null");
27
+ }
28
+ if (providerName === undefined) {
29
+ throw new Error("'providerName' cannot be null");
30
+ }
31
+ if (resourceType === undefined) {
32
+ throw new Error("'resourceType' cannot be null");
33
+ }
34
+ if (resourceName === undefined) {
35
+ throw new Error("'resourceName' cannot be null");
36
+ }
37
+ // Initializing default values for options
38
+ if (!options) {
39
+ options = {};
40
+ }
41
+ const defaults = {
42
+ requestContentType: "application/json; charset=utf-8",
43
+ credential: credentials
44
+ };
45
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.2`;
46
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
47
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
48
+ : `${packageDetails}`;
49
+ if (!options.credentialScopes) {
50
+ options.credentialScopes = ["https://management.azure.com/.default"];
51
+ }
52
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
53
+ userAgentPrefix
54
+ }, baseUri: options.endpoint || "https://management.azure.com" });
55
+ super(optionsWithDefaults);
56
+ // Parameter assignments
57
+ this.subscriptionId = subscriptionId;
58
+ this.providerName = providerName;
59
+ this.resourceType = resourceType;
60
+ this.resourceName = resourceName;
61
+ // Assigning values to Constant parameters
62
+ this.$host = options.$host || "https://management.azure.com";
63
+ this.apiVersion = options.apiVersion || "2015-11-01-preview";
23
64
  this.solutions = new SolutionsImpl(this);
24
65
  this.managementAssociations = new ManagementAssociationsImpl(this);
25
66
  this.managementConfigurations = new ManagementConfigurationsImpl(this);
@@ -1 +1 @@
1
- {"version":3,"file":"operationsManagementClient.js","sourceRoot":"","sources":["../../src/operationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACf,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAGxF,MAAM,OAAO,0BAA2B,SAAQ,iCAAiC;IAC/E;;;;;;;;;OASG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,YAAoB,EACpB,YAAoB,EACpB,YAAoB,EACpB,OAAkD;QAElD,KAAK,CACH,WAAW,EACX,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,CACR,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,sBAAsB,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,wBAAwB,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CAMF"}
1
+ {"version":3,"file":"operationsManagementClient.js","sourceRoot":"","sources":["../../src/operationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACf,MAAM,cAAc,CAAC;AAStB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAQtE;;;;;;;;;OASG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,YAAoB,EACpB,YAAoB,EACpB,YAAoB,EACpB,OAAkD;QAElD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,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,4BAA4B,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CAMF"}
package/package.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for OperationsManagementClient.",
6
- "version": "4.0.0-beta.1",
6
+ "version": "4.0.0-beta.2",
7
7
  "engines": { "node": ">=12.0.0" },
8
8
  "dependencies": {
9
9
  "@azure/core-lro": "^2.2.0",
10
10
  "@azure/abort-controller": "^1.0.0",
11
- "@azure/core-paging": "^1.1.1",
11
+ "@azure/core-paging": "^1.2.0",
12
12
  "@azure/core-client": "^1.0.0",
13
13
  "@azure/core-auth": "^1.3.0",
14
14
  "@azure/core-rest-pipeline": "^1.1.0",
@@ -20,7 +20,7 @@
20
20
  "module": "./dist-esm/src/index.js",
21
21
  "types": "./types/arm-operations.d.ts",
22
22
  "devDependencies": {
23
- "@microsoft/api-extractor": "7.7.11",
23
+ "@microsoft/api-extractor": "^7.18.11",
24
24
  "@rollup/plugin-commonjs": "11.0.2",
25
25
  "@rollup/plugin-json": "^4.0.0",
26
26
  "@rollup/plugin-multi-entry": "^3.0.0",
@@ -30,7 +30,8 @@
30
30
  "rollup-plugin-sourcemaps": "^0.4.2",
31
31
  "typescript": "~4.2.0",
32
32
  "uglify-js": "^3.4.9",
33
- "@azure/identity": "2.0.0-beta.6",
33
+ "rimraf": "^3.0.0",
34
+ "@azure/identity": "^2.0.1",
34
35
  "@azure-tools/test-recorder": "^1.0.0",
35
36
  "mocha": "^7.1.1",
36
37
  "cross-env": "^7.0.2"
@@ -60,14 +61,14 @@
60
61
  "types/*"
61
62
  ],
62
63
  "scripts": {
63
- "build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
64
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
64
65
  "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
65
66
  "prepack": "npm run build",
66
67
  "pack": "npm pack 2>&1",
67
68
  "extract-api": "api-extractor run --local",
68
69
  "lint": "echo skipped",
69
70
  "audit": "echo skipped",
70
- "clean": "echo skipped",
71
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
71
72
  "build:node": "echo skipped",
72
73
  "build:browser": "echo skipped",
73
74
  "build:test": "echo skipped",
@@ -76,14 +77,13 @@
76
77
  "execute:samples": "echo skipped",
77
78
  "format": "echo skipped",
78
79
  "test": "npm run integration-test",
79
- "prebuild": "echo skipped",
80
80
  "test:node": "echo skipped",
81
81
  "test:browser": "echo skipped",
82
82
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",
83
83
  "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
84
84
  "unit-test:browser": "echo skipped",
85
85
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
86
- "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts",
86
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
87
87
  "integration-test:browser": "echo skipped",
88
88
  "docs": "echo skipped"
89
89
  },
@@ -18,11 +18,11 @@ export interface ArmTemplateParameter {
18
18
 
19
19
  // @public
20
20
  export interface CodeMessageError {
21
- error?: CodeMessageErrorAutoGenerated;
21
+ error?: CodeMessageErrorError;
22
22
  }
23
23
 
24
24
  // @public
25
- export interface CodeMessageErrorAutoGenerated {
25
+ export interface CodeMessageErrorError {
26
26
  code?: string;
27
27
  message?: string;
28
28
  }
@@ -166,32 +166,27 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption
166
166
  export type OperationsListResponse = OperationListResult;
167
167
 
168
168
  // @public (undocumented)
169
- export class OperationsManagementClient extends OperationsManagementClientContext {
169
+ export class OperationsManagementClient extends coreClient.ServiceClient {
170
+ // (undocumented)
171
+ $host: string;
170
172
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
171
173
  // (undocumented)
174
+ apiVersion: string;
175
+ // (undocumented)
172
176
  managementAssociations: ManagementAssociations;
173
177
  // (undocumented)
174
178
  managementConfigurations: ManagementConfigurations;
175
179
  // (undocumented)
176
180
  operations: Operations;
177
181
  // (undocumented)
178
- solutions: Solutions;
179
- }
180
-
181
- // @public (undocumented)
182
- export class OperationsManagementClientContext extends coreClient.ServiceClient {
183
- // (undocumented)
184
- $host: string;
185
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
186
- // (undocumented)
187
- apiVersion: string;
188
- // (undocumented)
189
182
  providerName: string;
190
183
  // (undocumented)
191
184
  resourceName: string;
192
185
  // (undocumented)
193
186
  resourceType: string;
194
187
  // (undocumented)
188
+ solutions: Solutions;
189
+ // (undocumented)
195
190
  subscriptionId: string;
196
191
  }
197
192
 
@@ -301,7 +296,6 @@ export interface SolutionsUpdateOptionalParams extends coreClient.OperationOptio
301
296
  // @public
302
297
  export type SolutionsUpdateResponse = Solution;
303
298
 
304
-
305
299
  // (No @packageDocumentation comment for this package)
306
300
 
307
301
  ```
package/src/index.ts CHANGED
@@ -9,5 +9,4 @@
9
9
  /// <reference lib="esnext.asynciterable" />
10
10
  export * from "./models";
11
11
  export { OperationsManagementClient } from "./operationsManagementClient";
12
- export { OperationsManagementClientContext } from "./operationsManagementClientContext";
13
12
  export * from "./operationsInterfaces";
@@ -65,11 +65,11 @@ export interface SolutionProperties {
65
65
  /** The error body contract. */
66
66
  export interface CodeMessageError {
67
67
  /** The error details for a failed request. */
68
- error?: CodeMessageErrorAutoGenerated;
68
+ error?: CodeMessageErrorError;
69
69
  }
70
70
 
71
71
  /** The error details for a failed request. */
72
- export interface CodeMessageErrorAutoGenerated {
72
+ export interface CodeMessageErrorError {
73
73
  /** The error type. */
74
74
  code?: string;
75
75
  /** The error message. */
@@ -152,17 +152,17 @@ export const CodeMessageError: coreClient.CompositeMapper = {
152
152
  serializedName: "error",
153
153
  type: {
154
154
  name: "Composite",
155
- className: "CodeMessageErrorAutoGenerated"
155
+ className: "CodeMessageErrorError"
156
156
  }
157
157
  }
158
158
  }
159
159
  }
160
160
  };
161
161
 
162
- export const CodeMessageErrorAutoGenerated: coreClient.CompositeMapper = {
162
+ export const CodeMessageErrorError: coreClient.CompositeMapper = {
163
163
  type: {
164
164
  name: "Composite",
165
- className: "CodeMessageErrorAutoGenerated",
165
+ className: "CodeMessageErrorError",
166
166
  modelProperties: {
167
167
  code: {
168
168
  serializedName: "code",
@@ -10,7 +10,7 @@ import { ManagementAssociations } from "../operationsInterfaces";
10
10
  import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
- import { OperationsManagementClientContext } from "../operationsManagementClientContext";
13
+ import { OperationsManagementClient } from "../operationsManagementClient";
14
14
  import {
15
15
  ManagementAssociationsListBySubscriptionOptionalParams,
16
16
  ManagementAssociationsListBySubscriptionResponse,
@@ -24,13 +24,13 @@ import {
24
24
 
25
25
  /** Class containing ManagementAssociations operations. */
26
26
  export class ManagementAssociationsImpl implements ManagementAssociations {
27
- private readonly client: OperationsManagementClientContext;
27
+ private readonly client: OperationsManagementClient;
28
28
 
29
29
  /**
30
30
  * Initialize a new instance of the class ManagementAssociations class.
31
31
  * @param client Reference to the service client
32
32
  */
33
- constructor(client: OperationsManagementClientContext) {
33
+ constructor(client: OperationsManagementClient) {
34
34
  this.client = client;
35
35
  }
36
36
 
@@ -10,7 +10,7 @@ import { ManagementConfigurations } from "../operationsInterfaces";
10
10
  import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
- import { OperationsManagementClientContext } from "../operationsManagementClientContext";
13
+ import { OperationsManagementClient } from "../operationsManagementClient";
14
14
  import {
15
15
  ManagementConfigurationsListBySubscriptionOptionalParams,
16
16
  ManagementConfigurationsListBySubscriptionResponse,
@@ -24,13 +24,13 @@ import {
24
24
 
25
25
  /** Class containing ManagementConfigurations operations. */
26
26
  export class ManagementConfigurationsImpl implements ManagementConfigurations {
27
- private readonly client: OperationsManagementClientContext;
27
+ private readonly client: OperationsManagementClient;
28
28
 
29
29
  /**
30
30
  * Initialize a new instance of the class ManagementConfigurations class.
31
31
  * @param client Reference to the service client
32
32
  */
33
- constructor(client: OperationsManagementClientContext) {
33
+ constructor(client: OperationsManagementClient) {
34
34
  this.client = client;
35
35
  }
36
36
 
@@ -11,7 +11,7 @@ import { Operations } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { OperationsManagementClientContext } from "../operationsManagementClientContext";
14
+ import { OperationsManagementClient } from "../operationsManagementClient";
15
15
  import {
16
16
  Operation,
17
17
  OperationsListOptionalParams,
@@ -21,13 +21,13 @@ import {
21
21
  /// <reference lib="esnext.asynciterable" />
22
22
  /** Class containing Operations operations. */
23
23
  export class OperationsImpl implements Operations {
24
- private readonly client: OperationsManagementClientContext;
24
+ private readonly client: OperationsManagementClient;
25
25
 
26
26
  /**
27
27
  * Initialize a new instance of the class Operations class.
28
28
  * @param client Reference to the service client
29
29
  */
30
- constructor(client: OperationsManagementClientContext) {
30
+ constructor(client: OperationsManagementClient) {
31
31
  this.client = client;
32
32
  }
33
33
 
@@ -10,7 +10,7 @@ import { Solutions } from "../operationsInterfaces";
10
10
  import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
- import { OperationsManagementClientContext } from "../operationsManagementClientContext";
13
+ import { OperationsManagementClient } from "../operationsManagementClient";
14
14
  import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
15
  import { LroImpl } from "../lroImpl";
16
16
  import {
@@ -31,13 +31,13 @@ import {
31
31
 
32
32
  /** Class containing Solutions operations. */
33
33
  export class SolutionsImpl implements Solutions {
34
- private readonly client: OperationsManagementClientContext;
34
+ private readonly client: OperationsManagementClient;
35
35
 
36
36
  /**
37
37
  * Initialize a new instance of the class Solutions class.
38
38
  * @param client Reference to the service client
39
39
  */
40
- constructor(client: OperationsManagementClientContext) {
40
+ constructor(client: OperationsManagementClient) {
41
41
  this.client = client;
42
42
  }
43
43
 
@@ -6,6 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ import * as coreClient from "@azure/core-client";
9
10
  import * as coreAuth from "@azure/core-auth";
10
11
  import {
11
12
  SolutionsImpl,
@@ -19,10 +20,16 @@ import {
19
20
  ManagementConfigurations,
20
21
  Operations
21
22
  } from "./operationsInterfaces";
22
- import { OperationsManagementClientContext } from "./operationsManagementClientContext";
23
23
  import { OperationsManagementClientOptionalParams } from "./models";
24
24
 
25
- export class OperationsManagementClient extends OperationsManagementClientContext {
25
+ export class OperationsManagementClient extends coreClient.ServiceClient {
26
+ $host: string;
27
+ subscriptionId: string;
28
+ apiVersion: string;
29
+ providerName: string;
30
+ resourceType: string;
31
+ resourceName: string;
32
+
26
33
  /**
27
34
  * Initializes a new instance of the OperationsManagementClient class.
28
35
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -41,14 +48,58 @@ export class OperationsManagementClient extends OperationsManagementClientContex
41
48
  resourceName: string,
42
49
  options?: OperationsManagementClientOptionalParams
43
50
  ) {
44
- super(
45
- credentials,
46
- subscriptionId,
47
- providerName,
48
- resourceType,
49
- resourceName,
50
- options
51
- );
51
+ if (credentials === undefined) {
52
+ throw new Error("'credentials' cannot be null");
53
+ }
54
+ if (subscriptionId === undefined) {
55
+ throw new Error("'subscriptionId' cannot be null");
56
+ }
57
+ if (providerName === undefined) {
58
+ throw new Error("'providerName' cannot be null");
59
+ }
60
+ if (resourceType === undefined) {
61
+ throw new Error("'resourceType' cannot be null");
62
+ }
63
+ if (resourceName === undefined) {
64
+ throw new Error("'resourceName' cannot be null");
65
+ }
66
+
67
+ // Initializing default values for options
68
+ if (!options) {
69
+ options = {};
70
+ }
71
+ const defaults: OperationsManagementClientOptionalParams = {
72
+ requestContentType: "application/json; charset=utf-8",
73
+ credential: credentials
74
+ };
75
+
76
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.2`;
77
+ const userAgentPrefix =
78
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
79
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
80
+ : `${packageDetails}`;
81
+
82
+ if (!options.credentialScopes) {
83
+ options.credentialScopes = ["https://management.azure.com/.default"];
84
+ }
85
+ const optionsWithDefaults = {
86
+ ...defaults,
87
+ ...options,
88
+ userAgentOptions: {
89
+ userAgentPrefix
90
+ },
91
+ baseUri: options.endpoint || "https://management.azure.com"
92
+ };
93
+ super(optionsWithDefaults);
94
+ // Parameter assignments
95
+ this.subscriptionId = subscriptionId;
96
+ this.providerName = providerName;
97
+ this.resourceType = resourceType;
98
+ this.resourceName = resourceName;
99
+
100
+ // Assigning values to Constant parameters
101
+ this.$host = options.$host || "https://management.azure.com";
102
+ this.apiVersion = options.apiVersion || "2015-11-01-preview";
52
103
  this.solutions = new SolutionsImpl(this);
53
104
  this.managementAssociations = new ManagementAssociationsImpl(this);
54
105
  this.managementConfigurations = new ManagementConfigurationsImpl(this);
@@ -15,11 +15,11 @@ export declare interface ArmTemplateParameter {
15
15
  /** The error body contract. */
16
16
  export declare interface CodeMessageError {
17
17
  /** The error details for a failed request. */
18
- error?: CodeMessageErrorAutoGenerated;
18
+ error?: CodeMessageErrorError;
19
19
  }
20
20
 
21
21
  /** The error details for a failed request. */
22
- export declare interface CodeMessageErrorAutoGenerated {
22
+ export declare interface CodeMessageErrorError {
23
23
  /** The error type. */
24
24
  code?: string;
25
25
  /** The error message. */
@@ -259,25 +259,7 @@ export declare interface OperationsListOptionalParams extends coreClient.Operati
259
259
  /** Contains response data for the list operation. */
260
260
  export declare type OperationsListResponse = OperationListResult;
261
261
 
262
- export declare class OperationsManagementClient extends OperationsManagementClientContext {
263
- /**
264
- * Initializes a new instance of the OperationsManagementClient class.
265
- * @param credentials Subscription credentials which uniquely identify client subscription.
266
- * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
267
- * subscription. The subscription ID forms part of the URI for every service call.
268
- * @param providerName Provider name for the parent resource.
269
- * @param resourceType Resource type for the parent resource
270
- * @param resourceName Parent resource name.
271
- * @param options The parameter options
272
- */
273
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
274
- solutions: Solutions;
275
- managementAssociations: ManagementAssociations;
276
- managementConfigurations: ManagementConfigurations;
277
- operations: Operations;
278
- }
279
-
280
- export declare class OperationsManagementClientContext extends coreClient.ServiceClient {
262
+ export declare class OperationsManagementClient extends coreClient.ServiceClient {
281
263
  $host: string;
282
264
  subscriptionId: string;
283
265
  apiVersion: string;
@@ -285,7 +267,7 @@ export declare class OperationsManagementClientContext extends coreClient.Servic
285
267
  resourceType: string;
286
268
  resourceName: string;
287
269
  /**
288
- * Initializes a new instance of the OperationsManagementClientContext class.
270
+ * Initializes a new instance of the OperationsManagementClient class.
289
271
  * @param credentials Subscription credentials which uniquely identify client subscription.
290
272
  * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
291
273
  * subscription. The subscription ID forms part of the URI for every service call.
@@ -295,6 +277,10 @@ export declare class OperationsManagementClientContext extends coreClient.Servic
295
277
  * @param options The parameter options
296
278
  */
297
279
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
280
+ solutions: Solutions;
281
+ managementAssociations: ManagementAssociations;
282
+ managementConfigurations: ManagementConfigurations;
283
+ operations: Operations;
298
284
  }
299
285
 
300
286
  /** Optional parameters. */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.7.11"
8
+ "packageVersion": "7.19.2"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,23 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- import * as coreAuth from "@azure/core-auth";
3
- import { OperationsManagementClientOptionalParams } from "./models";
4
- export declare class OperationsManagementClientContext extends coreClient.ServiceClient {
5
- $host: string;
6
- subscriptionId: string;
7
- apiVersion: string;
8
- providerName: string;
9
- resourceType: string;
10
- resourceName: string;
11
- /**
12
- * Initializes a new instance of the OperationsManagementClientContext class.
13
- * @param credentials Subscription credentials which uniquely identify client subscription.
14
- * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
15
- * subscription. The subscription ID forms part of the URI for every service call.
16
- * @param providerName Provider name for the parent resource.
17
- * @param resourceType Resource type for the parent resource
18
- * @param resourceName Parent resource name.
19
- * @param options The parameter options
20
- */
21
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
22
- }
23
- //# sourceMappingURL=operationsManagementClientContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationsManagementClientContext.d.ts","sourceRoot":"","sources":["../../src/operationsManagementClientContext.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,wCAAwC,EAAE,MAAM,UAAU,CAAC;AAEpE,qBAAa,iCAAkC,SAAQ,UAAU,CAAC,aAAa;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;;;;;OASG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,wCAAwC;CAuDrD"}
@@ -1,65 +0,0 @@
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
- import * as coreClient from "@azure/core-client";
9
- export class OperationsManagementClientContext extends coreClient.ServiceClient {
10
- /**
11
- * Initializes a new instance of the OperationsManagementClientContext class.
12
- * @param credentials Subscription credentials which uniquely identify client subscription.
13
- * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
14
- * subscription. The subscription ID forms part of the URI for every service call.
15
- * @param providerName Provider name for the parent resource.
16
- * @param resourceType Resource type for the parent resource
17
- * @param resourceName Parent resource name.
18
- * @param options The parameter options
19
- */
20
- constructor(credentials, subscriptionId, providerName, resourceType, resourceName, options) {
21
- if (credentials === undefined) {
22
- throw new Error("'credentials' cannot be null");
23
- }
24
- if (subscriptionId === undefined) {
25
- throw new Error("'subscriptionId' cannot be null");
26
- }
27
- if (providerName === undefined) {
28
- throw new Error("'providerName' cannot be null");
29
- }
30
- if (resourceType === undefined) {
31
- throw new Error("'resourceType' cannot be null");
32
- }
33
- if (resourceName === undefined) {
34
- throw new Error("'resourceName' cannot be null");
35
- }
36
- // Initializing default values for options
37
- if (!options) {
38
- options = {};
39
- }
40
- const defaults = {
41
- requestContentType: "application/json; charset=utf-8",
42
- credential: credentials
43
- };
44
- const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.1`;
45
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
46
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
47
- : `${packageDetails}`;
48
- if (!options.credentialScopes) {
49
- options.credentialScopes = ["https://management.azure.com/.default"];
50
- }
51
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
52
- userAgentPrefix
53
- }, baseUri: options.endpoint || "https://management.azure.com" });
54
- super(optionsWithDefaults);
55
- // Parameter assignments
56
- this.subscriptionId = subscriptionId;
57
- this.providerName = providerName;
58
- this.resourceType = resourceType;
59
- this.resourceName = resourceName;
60
- // Assigning values to Constant parameters
61
- this.$host = options.$host || "https://management.azure.com";
62
- this.apiVersion = options.apiVersion || "2015-11-01-preview";
63
- }
64
- }
65
- //# sourceMappingURL=operationsManagementClientContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationsManagementClientContext.js","sourceRoot":"","sources":["../../src/operationsManagementClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,iCAAkC,SAAQ,UAAU,CAAC,aAAa;IAQ7E;;;;;;;;;OASG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,YAAoB,EACpB,YAAoB,EACpB,YAAoB,EACpB,OAAkD;QAElD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EA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