@azure/arm-databox 3.0.0 → 5.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 (142) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +72 -73
  4. package/dist/index.js +5592 -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/dataBoxManagementClient.d.ts +29 -0
  9. package/dist-esm/src/dataBoxManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/dataBoxManagementClient.js +89 -0
  11. package/dist-esm/src/dataBoxManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +2157 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +168 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +163 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/dist-esm/src/models/mappers.js +3911 -0
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +24 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +176 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/dist-esm/src/operations/index.js +11 -0
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/jobs.d.ts +161 -0
  37. package/dist-esm/src/operations/jobs.d.ts.map +1 -0
  38. package/dist-esm/src/operations/jobs.js +687 -0
  39. package/dist-esm/src/operations/jobs.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +32 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +120 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operations/service.d.ts +83 -0
  45. package/dist-esm/src/operations/service.d.ts.map +1 -0
  46. package/dist-esm/src/operations/service.js +307 -0
  47. package/dist-esm/src/operations/service.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  49. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  51. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/jobs.d.ts +115 -0
  53. package/dist-esm/src/operationsInterfaces/jobs.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/jobs.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/jobs.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  57. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/service.d.ts +54 -0
  61. package/dist-esm/src/operationsInterfaces/service.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/service.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/service.js.map +1 -0
  64. package/dist-esm/test/sampleTest.d.ts +2 -0
  65. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  66. package/dist-esm/test/sampleTest.js +40 -0
  67. package/dist-esm/test/sampleTest.js.map +1 -0
  68. package/package.json +65 -31
  69. package/review/arm-databox.api.md +1376 -0
  70. package/rollup.config.js +181 -30
  71. package/src/dataBoxManagementClient.ts +113 -29
  72. package/src/index.ts +12 -0
  73. package/src/lroImpl.ts +34 -0
  74. package/src/models/index.ts +1924 -1354
  75. package/src/models/mappers.ts +3160 -1086
  76. package/src/models/parameters.ts +144 -54
  77. package/src/operations/index.ts +3 -5
  78. package/src/operations/jobs.ts +702 -480
  79. package/src/operations/operations.ts +89 -75
  80. package/src/operations/service.ts +342 -127
  81. package/src/operationsInterfaces/index.ts +11 -0
  82. package/src/operationsInterfaces/jobs.ts +205 -0
  83. package/src/operationsInterfaces/operations.ts +22 -0
  84. package/src/operationsInterfaces/service.ts +107 -0
  85. package/tsconfig.json +3 -3
  86. package/types/arm-databox.d.ts +2558 -0
  87. package/types/tsdoc-metadata.json +11 -0
  88. package/dist/arm-databox.js +0 -3090
  89. package/dist/arm-databox.js.map +0 -1
  90. package/dist/arm-databox.min.js +0 -1
  91. package/dist/arm-databox.min.js.map +0 -1
  92. package/esm/dataBoxManagementClient.d.ts +0 -20
  93. package/esm/dataBoxManagementClient.d.ts.map +0 -1
  94. package/esm/dataBoxManagementClient.js +0 -35
  95. package/esm/dataBoxManagementClient.js.map +0 -1
  96. package/esm/dataBoxManagementClientContext.d.ts +0 -16
  97. package/esm/dataBoxManagementClientContext.d.ts.map +0 -1
  98. package/esm/dataBoxManagementClientContext.js +0 -57
  99. package/esm/dataBoxManagementClientContext.js.map +0 -1
  100. package/esm/models/index.d.ts +0 -1754
  101. package/esm/models/index.d.ts.map +0 -1
  102. package/esm/models/index.js +0 -8
  103. package/esm/models/index.js.map +0 -1
  104. package/esm/models/jobsMappers.d.ts +0 -2
  105. package/esm/models/jobsMappers.d.ts.map +0 -1
  106. package/esm/models/jobsMappers.js +0 -9
  107. package/esm/models/jobsMappers.js.map +0 -1
  108. package/esm/models/mappers.d.ts +0 -75
  109. package/esm/models/mappers.d.ts.map +0 -1
  110. package/esm/models/mappers.js +0 -2020
  111. package/esm/models/mappers.js.map +0 -1
  112. package/esm/models/operationsMappers.d.ts +0 -2
  113. package/esm/models/operationsMappers.d.ts.map +0 -1
  114. package/esm/models/operationsMappers.js +0 -9
  115. package/esm/models/operationsMappers.js.map +0 -1
  116. package/esm/models/parameters.d.ts +0 -12
  117. package/esm/models/parameters.d.ts.map +0 -1
  118. package/esm/models/parameters.js +0 -122
  119. package/esm/models/parameters.js.map +0 -1
  120. package/esm/models/serviceMappers.d.ts +0 -2
  121. package/esm/models/serviceMappers.d.ts.map +0 -1
  122. package/esm/models/serviceMappers.js +0 -9
  123. package/esm/models/serviceMappers.js.map +0 -1
  124. package/esm/operations/index.d.ts.map +0 -1
  125. package/esm/operations/index.js +0 -13
  126. package/esm/operations/index.js.map +0 -1
  127. package/esm/operations/jobs.d.ts +0 -245
  128. package/esm/operations/jobs.d.ts.map +0 -1
  129. package/esm/operations/jobs.js +0 -444
  130. package/esm/operations/jobs.js.map +0 -1
  131. package/esm/operations/operations.d.ts +0 -46
  132. package/esm/operations/operations.d.ts.map +0 -1
  133. package/esm/operations/operations.js +0 -77
  134. package/esm/operations/operations.js.map +0 -1
  135. package/esm/operations/service.d.ts +0 -79
  136. package/esm/operations/service.d.ts.map +0 -1
  137. package/esm/operations/service.js +0 -126
  138. package/esm/operations/service.js.map +0 -1
  139. package/src/dataBoxManagementClientContext.ts +0 -69
  140. package/src/models/jobsMappers.ts +0 -55
  141. package/src/models/operationsMappers.ts +0 -15
  142. package/src/models/serviceMappers.ts +0 -22
@@ -1,215 +1,430 @@
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 msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/serviceMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Service } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { DataBoxManagementClientContext } from "../dataBoxManagementClientContext";
14
+ import { DataBoxManagementClient } from "../dataBoxManagementClient";
15
+ import {
16
+ SkuInformation,
17
+ AvailableSkuRequest,
18
+ ServiceListAvailableSkusByResourceGroupNextOptionalParams,
19
+ ServiceListAvailableSkusByResourceGroupOptionalParams,
20
+ ServiceListAvailableSkusByResourceGroupResponse,
21
+ ValidateAddress,
22
+ ServiceValidateAddressOptionalParams,
23
+ ServiceValidateAddressResponse,
24
+ ValidationRequestUnion,
25
+ ServiceValidateInputsByResourceGroupOptionalParams,
26
+ ServiceValidateInputsByResourceGroupResponse,
27
+ ServiceValidateInputsOptionalParams,
28
+ ServiceValidateInputsResponse,
29
+ RegionConfigurationRequest,
30
+ ServiceRegionConfigurationOptionalParams,
31
+ ServiceRegionConfigurationResponse,
32
+ ServiceRegionConfigurationByResourceGroupOptionalParams,
33
+ ServiceRegionConfigurationByResourceGroupResponse,
34
+ ServiceListAvailableSkusByResourceGroupNextResponse
35
+ } from "../models";
16
36
 
17
- /** Class representing a Service. */
18
- export class Service {
19
- private readonly client: DataBoxManagementClientContext;
37
+ /// <reference lib="esnext.asynciterable" />
38
+ /** Class containing Service operations. */
39
+ export class ServiceImpl implements Service {
40
+ private readonly client: DataBoxManagementClient;
20
41
 
21
42
  /**
22
- * Create a Service.
23
- * @param {DataBoxManagementClientContext} client Reference to the service client.
43
+ * Initialize a new instance of the class Service class.
44
+ * @param client Reference to the service client
24
45
  */
25
- constructor(client: DataBoxManagementClientContext) {
46
+ constructor(client: DataBoxManagementClient) {
26
47
  this.client = client;
27
48
  }
28
49
 
29
50
  /**
30
- * This method provides the list of available skus for the given subscription and location.
51
+ * This method provides the list of available skus for the given subscription, resource group and
52
+ * location.
53
+ * @param resourceGroupName The Resource Group Name
31
54
  * @param location The location of the resource
32
55
  * @param availableSkuRequest Filters for showing the available skus.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.ServiceListAvailableSkusResponse>
56
+ * @param options The options parameters.
35
57
  */
36
- listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase): Promise<Models.ServiceListAvailableSkusResponse>;
58
+ public listAvailableSkusByResourceGroup(
59
+ resourceGroupName: string,
60
+ location: string,
61
+ availableSkuRequest: AvailableSkuRequest,
62
+ options?: ServiceListAvailableSkusByResourceGroupOptionalParams
63
+ ): PagedAsyncIterableIterator<SkuInformation> {
64
+ const iter = this.listAvailableSkusByResourceGroupPagingAll(
65
+ resourceGroupName,
66
+ location,
67
+ availableSkuRequest,
68
+ options
69
+ );
70
+ return {
71
+ next() {
72
+ return iter.next();
73
+ },
74
+ [Symbol.asyncIterator]() {
75
+ return this;
76
+ },
77
+ byPage: () => {
78
+ return this.listAvailableSkusByResourceGroupPagingPage(
79
+ resourceGroupName,
80
+ location,
81
+ availableSkuRequest,
82
+ options
83
+ );
84
+ }
85
+ };
86
+ }
87
+
88
+ private async *listAvailableSkusByResourceGroupPagingPage(
89
+ resourceGroupName: string,
90
+ location: string,
91
+ availableSkuRequest: AvailableSkuRequest,
92
+ options?: ServiceListAvailableSkusByResourceGroupOptionalParams
93
+ ): AsyncIterableIterator<SkuInformation[]> {
94
+ let result = await this._listAvailableSkusByResourceGroup(
95
+ resourceGroupName,
96
+ location,
97
+ availableSkuRequest,
98
+ options
99
+ );
100
+ yield result.value || [];
101
+ let continuationToken = result.nextLink;
102
+ while (continuationToken) {
103
+ result = await this._listAvailableSkusByResourceGroupNext(
104
+ resourceGroupName,
105
+ location,
106
+ availableSkuRequest,
107
+ continuationToken,
108
+ options
109
+ );
110
+ continuationToken = result.nextLink;
111
+ yield result.value || [];
112
+ }
113
+ }
114
+
115
+ private async *listAvailableSkusByResourceGroupPagingAll(
116
+ resourceGroupName: string,
117
+ location: string,
118
+ availableSkuRequest: AvailableSkuRequest,
119
+ options?: ServiceListAvailableSkusByResourceGroupOptionalParams
120
+ ): AsyncIterableIterator<SkuInformation> {
121
+ for await (const page of this.listAvailableSkusByResourceGroupPagingPage(
122
+ resourceGroupName,
123
+ location,
124
+ availableSkuRequest,
125
+ options
126
+ )) {
127
+ yield* page;
128
+ }
129
+ }
130
+
37
131
  /**
132
+ * This method provides the list of available skus for the given subscription, resource group and
133
+ * location.
134
+ * @param resourceGroupName The Resource Group Name
38
135
  * @param location The location of the resource
39
136
  * @param availableSkuRequest Filters for showing the available skus.
40
- * @param callback The callback
137
+ * @param options The options parameters.
41
138
  */
42
- listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, callback: msRest.ServiceCallback<Models.AvailableSkusResult>): void;
139
+ private _listAvailableSkusByResourceGroup(
140
+ resourceGroupName: string,
141
+ location: string,
142
+ availableSkuRequest: AvailableSkuRequest,
143
+ options?: ServiceListAvailableSkusByResourceGroupOptionalParams
144
+ ): Promise<ServiceListAvailableSkusByResourceGroupResponse> {
145
+ return this.client.sendOperationRequest(
146
+ { resourceGroupName, location, availableSkuRequest, options },
147
+ listAvailableSkusByResourceGroupOperationSpec
148
+ );
149
+ }
150
+
43
151
  /**
152
+ * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer
153
+ * shipping address and provide alternate addresses if any.
44
154
  * @param location The location of the resource
45
- * @param availableSkuRequest Filters for showing the available skus.
46
- * @param options The optional parameters
47
- * @param callback The callback
155
+ * @param validateAddress Shipping address of the customer.
156
+ * @param options The options parameters.
48
157
  */
49
- listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableSkusResult>): void;
50
- listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableSkusResult>, callback?: msRest.ServiceCallback<Models.AvailableSkusResult>): Promise<Models.ServiceListAvailableSkusResponse> {
158
+ validateAddress(
159
+ location: string,
160
+ validateAddress: ValidateAddress,
161
+ options?: ServiceValidateAddressOptionalParams
162
+ ): Promise<ServiceValidateAddressResponse> {
51
163
  return this.client.sendOperationRequest(
52
- {
53
- location,
54
- availableSkuRequest,
55
- options
56
- },
57
- listAvailableSkusOperationSpec,
58
- callback) as Promise<Models.ServiceListAvailableSkusResponse>;
164
+ { location, validateAddress, options },
165
+ validateAddressOperationSpec
166
+ );
59
167
  }
60
168
 
61
169
  /**
62
- * This method validates the customer shipping address and provide alternate addresses if any.
170
+ * This method does all necessary pre-job creation validation under resource group.
171
+ * @param resourceGroupName The Resource Group Name
63
172
  * @param location The location of the resource
64
- * @param shippingAddress Shipping address of the customer.
65
- * @param deviceType Device type to be used for the job. Possible values include: 'DataBox',
66
- * 'DataBoxDisk', 'DataBoxHeavy'
67
- * @param [options] The optional parameters
68
- * @returns Promise<Models.ServiceValidateAddressMethodResponse>
173
+ * @param validationRequest Inputs of the customer.
174
+ * @param options The options parameters.
69
175
  */
70
- validateAddressMethod(location: string, shippingAddress: Models.ShippingAddress, deviceType: Models.SkuName, options?: msRest.RequestOptionsBase): Promise<Models.ServiceValidateAddressMethodResponse>;
176
+ validateInputsByResourceGroup(
177
+ resourceGroupName: string,
178
+ location: string,
179
+ validationRequest: ValidationRequestUnion,
180
+ options?: ServiceValidateInputsByResourceGroupOptionalParams
181
+ ): Promise<ServiceValidateInputsByResourceGroupResponse> {
182
+ return this.client.sendOperationRequest(
183
+ { resourceGroupName, location, validationRequest, options },
184
+ validateInputsByResourceGroupOperationSpec
185
+ );
186
+ }
187
+
71
188
  /**
189
+ * This method does all necessary pre-job creation validation under subscription.
72
190
  * @param location The location of the resource
73
- * @param shippingAddress Shipping address of the customer.
74
- * @param deviceType Device type to be used for the job. Possible values include: 'DataBox',
75
- * 'DataBoxDisk', 'DataBoxHeavy'
76
- * @param callback The callback
191
+ * @param validationRequest Inputs of the customer.
192
+ * @param options The options parameters.
77
193
  */
78
- validateAddressMethod(location: string, shippingAddress: Models.ShippingAddress, deviceType: Models.SkuName, callback: msRest.ServiceCallback<Models.AddressValidationOutput>): void;
194
+ validateInputs(
195
+ location: string,
196
+ validationRequest: ValidationRequestUnion,
197
+ options?: ServiceValidateInputsOptionalParams
198
+ ): Promise<ServiceValidateInputsResponse> {
199
+ return this.client.sendOperationRequest(
200
+ { location, validationRequest, options },
201
+ validateInputsOperationSpec
202
+ );
203
+ }
204
+
79
205
  /**
206
+ * This API provides configuration details specific to given region/location at Subscription level.
80
207
  * @param location The location of the resource
81
- * @param shippingAddress Shipping address of the customer.
82
- * @param deviceType Device type to be used for the job. Possible values include: 'DataBox',
83
- * 'DataBoxDisk', 'DataBoxHeavy'
84
- * @param options The optional parameters
85
- * @param callback The callback
208
+ * @param regionConfigurationRequest Request body to get the configuration for the region.
209
+ * @param options The options parameters.
86
210
  */
87
- validateAddressMethod(location: string, shippingAddress: Models.ShippingAddress, deviceType: Models.SkuName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AddressValidationOutput>): void;
88
- validateAddressMethod(location: string, shippingAddress: Models.ShippingAddress, deviceType: Models.SkuName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AddressValidationOutput>, callback?: msRest.ServiceCallback<Models.AddressValidationOutput>): Promise<Models.ServiceValidateAddressMethodResponse> {
211
+ regionConfiguration(
212
+ location: string,
213
+ regionConfigurationRequest: RegionConfigurationRequest,
214
+ options?: ServiceRegionConfigurationOptionalParams
215
+ ): Promise<ServiceRegionConfigurationResponse> {
89
216
  return this.client.sendOperationRequest(
90
- {
91
- location,
92
- shippingAddress,
93
- deviceType,
94
- options
95
- },
96
- validateAddressMethodOperationSpec,
97
- callback) as Promise<Models.ServiceValidateAddressMethodResponse>;
217
+ { location, regionConfigurationRequest, options },
218
+ regionConfigurationOperationSpec
219
+ );
98
220
  }
99
221
 
100
222
  /**
101
- * This method provides the list of available skus for the given subscription and location.
102
- * @param nextPageLink The NextLink from the previous successful call to List operation.
103
- * @param [options] The optional parameters
104
- * @returns Promise<Models.ServiceListAvailableSkusNextResponse>
105
- */
106
- listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServiceListAvailableSkusNextResponse>;
107
- /**
108
- * @param nextPageLink The NextLink from the previous successful call to List operation.
109
- * @param callback The callback
223
+ * This API provides configuration details specific to given region/location at Resource group level.
224
+ * @param resourceGroupName The Resource Group Name
225
+ * @param location The location of the resource
226
+ * @param regionConfigurationRequest Request body to get the configuration for the region at resource
227
+ * group level.
228
+ * @param options The options parameters.
110
229
  */
111
- listAvailableSkusNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.AvailableSkusResult>): void;
230
+ regionConfigurationByResourceGroup(
231
+ resourceGroupName: string,
232
+ location: string,
233
+ regionConfigurationRequest: RegionConfigurationRequest,
234
+ options?: ServiceRegionConfigurationByResourceGroupOptionalParams
235
+ ): Promise<ServiceRegionConfigurationByResourceGroupResponse> {
236
+ return this.client.sendOperationRequest(
237
+ { resourceGroupName, location, regionConfigurationRequest, options },
238
+ regionConfigurationByResourceGroupOperationSpec
239
+ );
240
+ }
241
+
112
242
  /**
113
- * @param nextPageLink The NextLink from the previous successful call to List operation.
114
- * @param options The optional parameters
115
- * @param callback The callback
243
+ * ListAvailableSkusByResourceGroupNext
244
+ * @param resourceGroupName The Resource Group Name
245
+ * @param location The location of the resource
246
+ * @param availableSkuRequest Filters for showing the available skus.
247
+ * @param nextLink The nextLink from the previous successful call to the
248
+ * ListAvailableSkusByResourceGroup method.
249
+ * @param options The options parameters.
116
250
  */
117
- listAvailableSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableSkusResult>): void;
118
- listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableSkusResult>, callback?: msRest.ServiceCallback<Models.AvailableSkusResult>): Promise<Models.ServiceListAvailableSkusNextResponse> {
251
+ private _listAvailableSkusByResourceGroupNext(
252
+ resourceGroupName: string,
253
+ location: string,
254
+ availableSkuRequest: AvailableSkuRequest,
255
+ nextLink: string,
256
+ options?: ServiceListAvailableSkusByResourceGroupNextOptionalParams
257
+ ): Promise<ServiceListAvailableSkusByResourceGroupNextResponse> {
119
258
  return this.client.sendOperationRequest(
120
- {
121
- nextPageLink,
122
- options
123
- },
124
- listAvailableSkusNextOperationSpec,
125
- callback) as Promise<Models.ServiceListAvailableSkusNextResponse>;
259
+ { resourceGroupName, location, availableSkuRequest, nextLink, options },
260
+ listAvailableSkusByResourceGroupNextOperationSpec
261
+ );
126
262
  }
127
263
  }
128
-
129
264
  // Operation Specifications
130
- const serializer = new msRest.Serializer(Mappers);
131
- const listAvailableSkusOperationSpec: msRest.OperationSpec = {
265
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
266
+
267
+ const listAvailableSkusByResourceGroupOperationSpec: coreClient.OperationSpec = {
268
+ path:
269
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus",
132
270
  httpMethod: "POST",
133
- path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus",
271
+ responses: {
272
+ 200: {
273
+ bodyMapper: Mappers.AvailableSkusResult
274
+ },
275
+ default: {
276
+ bodyMapper: Mappers.ApiError
277
+ }
278
+ },
279
+ requestBody: Parameters.availableSkuRequest,
280
+ queryParameters: [Parameters.apiVersion],
134
281
  urlParameters: [
282
+ Parameters.$host,
135
283
  Parameters.subscriptionId,
284
+ Parameters.resourceGroupName,
136
285
  Parameters.location
137
286
  ],
138
- queryParameters: [
139
- Parameters.apiVersion
140
- ],
141
- headerParameters: [
142
- Parameters.acceptLanguage
143
- ],
144
- requestBody: {
145
- parameterPath: "availableSkuRequest",
146
- mapper: {
147
- ...Mappers.AvailableSkuRequest,
148
- required: true
149
- }
150
- },
287
+ headerParameters: [Parameters.accept, Parameters.contentType],
288
+ mediaType: "json",
289
+ serializer
290
+ };
291
+ const validateAddressOperationSpec: coreClient.OperationSpec = {
292
+ path:
293
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress",
294
+ httpMethod: "POST",
151
295
  responses: {
152
296
  200: {
153
- bodyMapper: Mappers.AvailableSkusResult
297
+ bodyMapper: Mappers.AddressValidationOutput
154
298
  },
155
299
  default: {
156
- bodyMapper: Mappers.CloudError
300
+ bodyMapper: Mappers.ApiError
157
301
  }
158
302
  },
303
+ requestBody: Parameters.validateAddress,
304
+ queryParameters: [Parameters.apiVersion],
305
+ urlParameters: [
306
+ Parameters.$host,
307
+ Parameters.subscriptionId,
308
+ Parameters.location
309
+ ],
310
+ headerParameters: [Parameters.accept, Parameters.contentType],
311
+ mediaType: "json",
159
312
  serializer
160
313
  };
161
-
162
- const validateAddressMethodOperationSpec: msRest.OperationSpec = {
314
+ const validateInputsByResourceGroupOperationSpec: coreClient.OperationSpec = {
315
+ path:
316
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs",
163
317
  httpMethod: "POST",
164
- path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress",
318
+ responses: {
319
+ 200: {
320
+ bodyMapper: Mappers.ValidationResponse
321
+ },
322
+ default: {
323
+ bodyMapper: Mappers.ApiError
324
+ }
325
+ },
326
+ requestBody: Parameters.validationRequest,
327
+ queryParameters: [Parameters.apiVersion],
165
328
  urlParameters: [
329
+ Parameters.$host,
166
330
  Parameters.subscriptionId,
331
+ Parameters.resourceGroupName,
167
332
  Parameters.location
168
333
  ],
169
- queryParameters: [
170
- Parameters.apiVersion
171
- ],
172
- headerParameters: [
173
- Parameters.acceptLanguage
174
- ],
175
- requestBody: {
176
- parameterPath: {
177
- shippingAddress: "shippingAddress",
178
- deviceType: "deviceType"
334
+ headerParameters: [Parameters.accept, Parameters.contentType],
335
+ mediaType: "json",
336
+ serializer
337
+ };
338
+ const validateInputsOperationSpec: coreClient.OperationSpec = {
339
+ path:
340
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs",
341
+ httpMethod: "POST",
342
+ responses: {
343
+ 200: {
344
+ bodyMapper: Mappers.ValidationResponse
179
345
  },
180
- mapper: {
181
- ...Mappers.ValidateAddress,
182
- required: true
346
+ default: {
347
+ bodyMapper: Mappers.ApiError
183
348
  }
184
349
  },
350
+ requestBody: Parameters.validationRequest,
351
+ queryParameters: [Parameters.apiVersion],
352
+ urlParameters: [
353
+ Parameters.$host,
354
+ Parameters.subscriptionId,
355
+ Parameters.location
356
+ ],
357
+ headerParameters: [Parameters.accept, Parameters.contentType],
358
+ mediaType: "json",
359
+ serializer
360
+ };
361
+ const regionConfigurationOperationSpec: coreClient.OperationSpec = {
362
+ path:
363
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration",
364
+ httpMethod: "POST",
185
365
  responses: {
186
366
  200: {
187
- bodyMapper: Mappers.AddressValidationOutput
367
+ bodyMapper: Mappers.RegionConfigurationResponse
188
368
  },
189
369
  default: {
190
- bodyMapper: Mappers.CloudError
370
+ bodyMapper: Mappers.ApiError
191
371
  }
192
372
  },
373
+ requestBody: Parameters.regionConfigurationRequest,
374
+ queryParameters: [Parameters.apiVersion],
375
+ urlParameters: [
376
+ Parameters.$host,
377
+ Parameters.subscriptionId,
378
+ Parameters.location
379
+ ],
380
+ headerParameters: [Parameters.accept, Parameters.contentType],
381
+ mediaType: "json",
193
382
  serializer
194
383
  };
195
-
196
- const listAvailableSkusNextOperationSpec: msRest.OperationSpec = {
384
+ const regionConfigurationByResourceGroupOperationSpec: coreClient.OperationSpec = {
385
+ path:
386
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration",
197
387
  httpMethod: "POST",
198
- baseUrl: "https://management.azure.com",
199
- path: "{nextLink}",
388
+ responses: {
389
+ 200: {
390
+ bodyMapper: Mappers.RegionConfigurationResponse
391
+ },
392
+ default: {
393
+ bodyMapper: Mappers.ApiError
394
+ }
395
+ },
396
+ requestBody: Parameters.regionConfigurationRequest,
397
+ queryParameters: [Parameters.apiVersion],
200
398
  urlParameters: [
201
- Parameters.nextPageLink
202
- ],
203
- headerParameters: [
204
- Parameters.acceptLanguage
399
+ Parameters.$host,
400
+ Parameters.subscriptionId,
401
+ Parameters.resourceGroupName,
402
+ Parameters.location
205
403
  ],
404
+ headerParameters: [Parameters.accept, Parameters.contentType],
405
+ mediaType: "json",
406
+ serializer
407
+ };
408
+ const listAvailableSkusByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
409
+ path: "{nextLink}",
410
+ httpMethod: "GET",
206
411
  responses: {
207
412
  200: {
208
413
  bodyMapper: Mappers.AvailableSkusResult
209
414
  },
210
415
  default: {
211
- bodyMapper: Mappers.CloudError
416
+ bodyMapper: Mappers.ApiError
212
417
  }
213
418
  },
419
+ queryParameters: [Parameters.apiVersion],
420
+ urlParameters: [
421
+ Parameters.$host,
422
+ Parameters.nextLink,
423
+ Parameters.subscriptionId,
424
+ Parameters.resourceGroupName,
425
+ Parameters.location
426
+ ],
427
+ headerParameters: [Parameters.accept, Parameters.contentType],
428
+ mediaType: "json",
214
429
  serializer
215
430
  };
@@ -0,0 +1,11 @@
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
+ export * from "./operations";
10
+ export * from "./jobs";
11
+ export * from "./service";