@azure/arm-azurestack 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 (174) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +69 -80
  4. package/dist/index.js +3000 -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/azureStackManagementClient.d.ts +24 -0
  9. package/dist-esm/src/azureStackManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/azureStackManagementClient.js +57 -0
  11. package/dist-esm/src/azureStackManagementClient.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/models/index.d.ts +854 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +55 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +37 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +608 -394
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +20 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +163 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/cloudManifestFile.d.ts +24 -0
  29. package/dist-esm/src/operations/cloudManifestFile.d.ts.map +1 -0
  30. package/dist-esm/src/operations/cloudManifestFile.js +70 -0
  31. package/dist-esm/src/operations/cloudManifestFile.js.map +1 -0
  32. package/dist-esm/src/operations/customerSubscriptions.d.ts +63 -0
  33. package/dist-esm/src/operations/customerSubscriptions.d.ts.map +1 -0
  34. package/dist-esm/src/operations/customerSubscriptions.js +241 -0
  35. package/dist-esm/src/operations/customerSubscriptions.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +3 -1
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +6 -6
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/linkedSubscriptions.d.ts +83 -0
  41. package/dist-esm/src/operations/linkedSubscriptions.d.ts.map +1 -0
  42. package/dist-esm/src/operations/linkedSubscriptions.js +359 -0
  43. package/dist-esm/src/operations/linkedSubscriptions.js.map +1 -0
  44. package/dist-esm/src/operations/operations.d.ts +32 -0
  45. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/operations.js +120 -0
  47. package/dist-esm/src/operations/operations.js.map +1 -0
  48. package/dist-esm/src/operations/products.d.ts +78 -0
  49. package/dist-esm/src/operations/products.d.ts.map +1 -0
  50. package/dist-esm/src/operations/products.js +303 -0
  51. package/dist-esm/src/operations/products.js.map +1 -0
  52. package/dist-esm/src/operations/registrations.d.ts +97 -0
  53. package/dist-esm/src/operations/registrations.d.ts.map +1 -0
  54. package/dist-esm/src/operations/registrations.js +416 -0
  55. package/dist-esm/src/operations/registrations.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/cloudManifestFile.d.ts +16 -0
  57. package/dist-esm/src/operationsInterfaces/cloudManifestFile.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/cloudManifestFile.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/cloudManifestFile.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/customerSubscriptions.d.ts +38 -0
  61. package/dist-esm/src/operationsInterfaces/customerSubscriptions.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/customerSubscriptions.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/customerSubscriptions.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +14 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/linkedSubscriptions.d.ts +47 -0
  69. package/dist-esm/src/operationsInterfaces/linkedSubscriptions.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/linkedSubscriptions.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/linkedSubscriptions.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  73. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/products.d.ts +53 -0
  77. package/dist-esm/src/operationsInterfaces/products.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/products.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/products.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/registrations.d.ts +61 -0
  81. package/dist-esm/src/operationsInterfaces/registrations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/registrations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/registrations.js.map +1 -0
  84. package/dist-esm/test/sampleTest.d.ts +4 -0
  85. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  86. package/dist-esm/test/sampleTest.js +43 -0
  87. package/dist-esm/test/sampleTest.js.map +1 -0
  88. package/package.json +63 -32
  89. package/review/arm-azurestack.api.md +695 -0
  90. package/rollup.config.js +181 -30
  91. package/src/azureStackManagementClient.ts +88 -43
  92. package/src/index.ts +12 -0
  93. package/src/models/index.ts +725 -836
  94. package/src/models/mappers.ts +623 -384
  95. package/src/models/parameters.ts +130 -32
  96. package/src/operations/cloudManifestFile.ts +93 -0
  97. package/src/operations/customerSubscriptions.ts +191 -206
  98. package/src/operations/index.ts +6 -6
  99. package/src/operations/linkedSubscriptions.ts +450 -0
  100. package/src/operations/operations.ts +89 -75
  101. package/src/operations/products.ts +240 -299
  102. package/src/operations/registrations.ts +347 -266
  103. package/src/operationsInterfaces/cloudManifestFile.ts +34 -0
  104. package/src/operationsInterfaces/customerSubscriptions.ts +75 -0
  105. package/src/operationsInterfaces/index.ts +14 -0
  106. package/src/operationsInterfaces/linkedSubscriptions.ts +91 -0
  107. package/src/operationsInterfaces/operations.ts +22 -0
  108. package/src/operationsInterfaces/products.ts +104 -0
  109. package/src/operationsInterfaces/registrations.ts +116 -0
  110. package/tsconfig.json +3 -3
  111. package/types/arm-azurestack.d.ts +1206 -0
  112. package/types/tsdoc-metadata.json +11 -0
  113. package/dist/arm-azurestack.js +0 -2153
  114. package/dist/arm-azurestack.js.map +0 -1
  115. package/dist/arm-azurestack.min.js +0 -1
  116. package/dist/arm-azurestack.min.js.map +0 -1
  117. package/esm/azureStackManagementClient.d.ts +0 -28
  118. package/esm/azureStackManagementClient.d.ts.map +0 -1
  119. package/esm/azureStackManagementClient.js +0 -42
  120. package/esm/azureStackManagementClient.js.map +0 -1
  121. package/esm/azureStackManagementClientContext.d.ts +0 -23
  122. package/esm/azureStackManagementClientContext.d.ts.map +0 -1
  123. package/esm/azureStackManagementClientContext.js +0 -62
  124. package/esm/azureStackManagementClientContext.js.map +0 -1
  125. package/esm/models/customerSubscriptionsMappers.d.ts +0 -2
  126. package/esm/models/customerSubscriptionsMappers.d.ts.map +0 -1
  127. package/esm/models/customerSubscriptionsMappers.js +0 -9
  128. package/esm/models/customerSubscriptionsMappers.js.map +0 -1
  129. package/esm/models/index.d.ts +0 -1014
  130. package/esm/models/index.d.ts.map +0 -1
  131. package/esm/models/index.js +0 -8
  132. package/esm/models/index.js.map +0 -1
  133. package/esm/models/mappers.d.ts +0 -31
  134. package/esm/models/mappers.d.ts.map +0 -1
  135. package/esm/models/mappers.js.map +0 -1
  136. package/esm/models/operationsMappers.d.ts +0 -2
  137. package/esm/models/operationsMappers.d.ts.map +0 -1
  138. package/esm/models/operationsMappers.js +0 -9
  139. package/esm/models/operationsMappers.js.map +0 -1
  140. package/esm/models/parameters.d.ts +0 -10
  141. package/esm/models/parameters.d.ts.map +0 -1
  142. package/esm/models/parameters.js +0 -92
  143. package/esm/models/parameters.js.map +0 -1
  144. package/esm/models/productsMappers.d.ts +0 -2
  145. package/esm/models/productsMappers.d.ts.map +0 -1
  146. package/esm/models/productsMappers.js +0 -9
  147. package/esm/models/productsMappers.js.map +0 -1
  148. package/esm/models/registrationsMappers.d.ts +0 -2
  149. package/esm/models/registrationsMappers.d.ts.map +0 -1
  150. package/esm/models/registrationsMappers.js +0 -9
  151. package/esm/models/registrationsMappers.js.map +0 -1
  152. package/esm/operations/customerSubscriptions.d.ts +0 -127
  153. package/esm/operations/customerSubscriptions.d.ts.map +0 -1
  154. package/esm/operations/customerSubscriptions.js +0 -188
  155. package/esm/operations/customerSubscriptions.js.map +0 -1
  156. package/esm/operations/index.d.ts.map +0 -1
  157. package/esm/operations/index.js.map +0 -1
  158. package/esm/operations/operations.d.ts +0 -46
  159. package/esm/operations/operations.d.ts.map +0 -1
  160. package/esm/operations/operations.js +0 -77
  161. package/esm/operations/operations.js.map +0 -1
  162. package/esm/operations/products.d.ts +0 -169
  163. package/esm/operations/products.d.ts.map +0 -1
  164. package/esm/operations/products.js +0 -268
  165. package/esm/operations/products.js.map +0 -1
  166. package/esm/operations/registrations.d.ts +0 -160
  167. package/esm/operations/registrations.d.ts.map +0 -1
  168. package/esm/operations/registrations.js +0 -250
  169. package/esm/operations/registrations.js.map +0 -1
  170. package/src/azureStackManagementClientContext.ts +0 -69
  171. package/src/models/customerSubscriptionsMappers.ts +0 -24
  172. package/src/models/operationsMappers.ts +0 -14
  173. package/src/models/productsMappers.ts +0 -30
  174. package/src/models/registrationsMappers.ts +0 -26
@@ -1,28 +1,45 @@
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/productsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Products } 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 { AzureStackManagementClientContext } from "../azureStackManagementClientContext";
14
+ import { AzureStackManagementClient } from "../azureStackManagementClient";
15
+ import {
16
+ Product,
17
+ ProductsListNextOptionalParams,
18
+ ProductsListOptionalParams,
19
+ ProductsListResponse,
20
+ ProductsGetOptionalParams,
21
+ ProductsGetResponse,
22
+ ProductsListDetailsOptionalParams,
23
+ ProductsListDetailsResponse,
24
+ ProductsGetProductsOptionalParams,
25
+ ProductsGetProductsResponse,
26
+ ProductsGetProductOptionalParams,
27
+ ProductsGetProductResponse,
28
+ ProductsUploadLogOptionalParams,
29
+ ProductsUploadLogResponse,
30
+ ProductsListNextResponse
31
+ } from "../models";
16
32
 
17
- /** Class representing a Products. */
18
- export class Products {
19
- private readonly client: AzureStackManagementClientContext;
33
+ /// <reference lib="esnext.asynciterable" />
34
+ /** Class containing Products operations. */
35
+ export class ProductsImpl implements Products {
36
+ private readonly client: AzureStackManagementClient;
20
37
 
21
38
  /**
22
- * Create a Products.
23
- * @param {AzureStackManagementClientContext} client Reference to the service client.
39
+ * Initialize a new instance of the class Products class.
40
+ * @param client Reference to the service client
24
41
  */
25
- constructor(client: AzureStackManagementClientContext) {
42
+ constructor(client: AzureStackManagementClient) {
26
43
  this.client = client;
27
44
  }
28
45
 
@@ -30,68 +47,95 @@ export class Products {
30
47
  * Returns a list of products.
31
48
  * @param resourceGroup Name of the resource group.
32
49
  * @param registrationName Name of the Azure Stack registration.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.ProductsListResponse>
50
+ * @param options The options parameters.
35
51
  */
36
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsListResponse>;
37
- /**
38
- * @param resourceGroup Name of the resource group.
39
- * @param registrationName Name of the Azure Stack registration.
40
- * @param callback The callback
41
- */
42
- list(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback<Models.ProductList>): void;
43
- /**
44
- * @param resourceGroup Name of the resource group.
45
- * @param registrationName Name of the Azure Stack registration.
46
- * @param options The optional parameters
47
- * @param callback The callback
48
- */
49
- list(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProductList>): void;
50
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ProductList>, callback?: msRest.ServiceCallback<Models.ProductList>): Promise<Models.ProductsListResponse> {
51
- return this.client.sendOperationRequest(
52
- {
52
+ public list(
53
+ resourceGroup: string,
54
+ registrationName: string,
55
+ options?: ProductsListOptionalParams
56
+ ): PagedAsyncIterableIterator<Product> {
57
+ const iter = this.listPagingAll(resourceGroup, registrationName, options);
58
+ return {
59
+ next() {
60
+ return iter.next();
61
+ },
62
+ [Symbol.asyncIterator]() {
63
+ return this;
64
+ },
65
+ byPage: () => {
66
+ return this.listPagingPage(resourceGroup, registrationName, options);
67
+ }
68
+ };
69
+ }
70
+
71
+ private async *listPagingPage(
72
+ resourceGroup: string,
73
+ registrationName: string,
74
+ options?: ProductsListOptionalParams
75
+ ): AsyncIterableIterator<Product[]> {
76
+ let result = await this._list(resourceGroup, registrationName, options);
77
+ yield result.value || [];
78
+ let continuationToken = result.nextLink;
79
+ while (continuationToken) {
80
+ result = await this._listNext(
53
81
  resourceGroup,
54
82
  registrationName,
83
+ continuationToken,
55
84
  options
56
- },
57
- listOperationSpec,
58
- callback) as Promise<Models.ProductsListResponse>;
85
+ );
86
+ continuationToken = result.nextLink;
87
+ yield result.value || [];
88
+ }
89
+ }
90
+
91
+ private async *listPagingAll(
92
+ resourceGroup: string,
93
+ registrationName: string,
94
+ options?: ProductsListOptionalParams
95
+ ): AsyncIterableIterator<Product> {
96
+ for await (const page of this.listPagingPage(
97
+ resourceGroup,
98
+ registrationName,
99
+ options
100
+ )) {
101
+ yield* page;
102
+ }
59
103
  }
60
104
 
61
105
  /**
62
- * Returns the specified product.
63
- * @param resourceGroup Name of the resource group.
64
- * @param registrationName Name of the Azure Stack registration.
65
- * @param productName Name of the product.
66
- * @param [options] The optional parameters
67
- * @returns Promise<Models.ProductsGetResponse>
68
- */
69
- get(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsGetResponse>;
70
- /**
106
+ * Returns a list of products.
71
107
  * @param resourceGroup Name of the resource group.
72
108
  * @param registrationName Name of the Azure Stack registration.
73
- * @param productName Name of the product.
74
- * @param callback The callback
109
+ * @param options The options parameters.
75
110
  */
76
- get(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback<Models.Product>): void;
111
+ private _list(
112
+ resourceGroup: string,
113
+ registrationName: string,
114
+ options?: ProductsListOptionalParams
115
+ ): Promise<ProductsListResponse> {
116
+ return this.client.sendOperationRequest(
117
+ { resourceGroup, registrationName, options },
118
+ listOperationSpec
119
+ );
120
+ }
121
+
77
122
  /**
123
+ * Returns the specified product.
78
124
  * @param resourceGroup Name of the resource group.
79
125
  * @param registrationName Name of the Azure Stack registration.
80
126
  * @param productName Name of the product.
81
- * @param options The optional parameters
82
- * @param callback The callback
127
+ * @param options The options parameters.
83
128
  */
84
- get(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Product>): void;
85
- get(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Product>, callback?: msRest.ServiceCallback<Models.Product>): Promise<Models.ProductsGetResponse> {
129
+ get(
130
+ resourceGroup: string,
131
+ registrationName: string,
132
+ productName: string,
133
+ options?: ProductsGetOptionalParams
134
+ ): Promise<ProductsGetResponse> {
86
135
  return this.client.sendOperationRequest(
87
- {
88
- resourceGroup,
89
- registrationName,
90
- productName,
91
- options
92
- },
93
- getOperationSpec,
94
- callback) as Promise<Models.ProductsGetResponse>;
136
+ { resourceGroup, registrationName, productName, options },
137
+ getOperationSpec
138
+ );
95
139
  }
96
140
 
97
141
  /**
@@ -99,67 +143,37 @@ export class Products {
99
143
  * @param resourceGroup Name of the resource group.
100
144
  * @param registrationName Name of the Azure Stack registration.
101
145
  * @param productName Name of the product.
102
- * @param [options] The optional parameters
103
- * @returns Promise<Models.ProductsListDetailsResponse>
146
+ * @param options The options parameters.
104
147
  */
105
- listDetails(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsListDetailsResponse>;
106
- /**
107
- * @param resourceGroup Name of the resource group.
108
- * @param registrationName Name of the Azure Stack registration.
109
- * @param productName Name of the product.
110
- * @param callback The callback
111
- */
112
- listDetails(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback<Models.ExtendedProduct>): void;
113
- /**
114
- * @param resourceGroup Name of the resource group.
115
- * @param registrationName Name of the Azure Stack registration.
116
- * @param productName Name of the product.
117
- * @param options The optional parameters
118
- * @param callback The callback
119
- */
120
- listDetails(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ExtendedProduct>): void;
121
- listDetails(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ExtendedProduct>, callback?: msRest.ServiceCallback<Models.ExtendedProduct>): Promise<Models.ProductsListDetailsResponse> {
148
+ listDetails(
149
+ resourceGroup: string,
150
+ registrationName: string,
151
+ productName: string,
152
+ options?: ProductsListDetailsOptionalParams
153
+ ): Promise<ProductsListDetailsResponse> {
122
154
  return this.client.sendOperationRequest(
123
- {
124
- resourceGroup,
125
- registrationName,
126
- productName,
127
- options
128
- },
129
- listDetailsOperationSpec,
130
- callback) as Promise<Models.ProductsListDetailsResponse>;
155
+ { resourceGroup, registrationName, productName, options },
156
+ listDetailsOperationSpec
157
+ );
131
158
  }
132
159
 
133
160
  /**
134
161
  * Returns a list of products.
135
162
  * @param resourceGroup Name of the resource group.
136
163
  * @param registrationName Name of the Azure Stack registration.
137
- * @param [options] The optional parameters
138
- * @returns Promise<Models.ProductsGetProductsResponse>
139
- */
140
- getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsGetProductsResponse>;
141
- /**
142
- * @param resourceGroup Name of the resource group.
143
- * @param registrationName Name of the Azure Stack registration.
144
- * @param callback The callback
145
- */
146
- getProducts(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback<Models.ProductList>): void;
147
- /**
148
- * @param resourceGroup Name of the resource group.
149
- * @param registrationName Name of the Azure Stack registration.
150
- * @param options The optional parameters
151
- * @param callback The callback
164
+ * @param productName Name of the product.
165
+ * @param options The options parameters.
152
166
  */
153
- getProducts(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProductList>): void;
154
- getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ProductList>, callback?: msRest.ServiceCallback<Models.ProductList>): Promise<Models.ProductsGetProductsResponse> {
167
+ getProducts(
168
+ resourceGroup: string,
169
+ registrationName: string,
170
+ productName: string,
171
+ options?: ProductsGetProductsOptionalParams
172
+ ): Promise<ProductsGetProductsResponse> {
155
173
  return this.client.sendOperationRequest(
156
- {
157
- resourceGroup,
158
- registrationName,
159
- options
160
- },
161
- getProductsOperationSpec,
162
- callback) as Promise<Models.ProductsGetProductsResponse>;
174
+ { resourceGroup, registrationName, productName, options },
175
+ getProductsOperationSpec
176
+ );
163
177
  }
164
178
 
165
179
  /**
@@ -167,35 +181,18 @@ export class Products {
167
181
  * @param resourceGroup Name of the resource group.
168
182
  * @param registrationName Name of the Azure Stack registration.
169
183
  * @param productName Name of the product.
170
- * @param [options] The optional parameters
171
- * @returns Promise<Models.ProductsGetProductResponse>
184
+ * @param options The options parameters.
172
185
  */
173
- getProduct(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsGetProductResponse>;
174
- /**
175
- * @param resourceGroup Name of the resource group.
176
- * @param registrationName Name of the Azure Stack registration.
177
- * @param productName Name of the product.
178
- * @param callback The callback
179
- */
180
- getProduct(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback<Models.Product>): void;
181
- /**
182
- * @param resourceGroup Name of the resource group.
183
- * @param registrationName Name of the Azure Stack registration.
184
- * @param productName Name of the product.
185
- * @param options The optional parameters
186
- * @param callback The callback
187
- */
188
- getProduct(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Product>): void;
189
- getProduct(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Product>, callback?: msRest.ServiceCallback<Models.Product>): Promise<Models.ProductsGetProductResponse> {
186
+ getProduct(
187
+ resourceGroup: string,
188
+ registrationName: string,
189
+ productName: string,
190
+ options?: ProductsGetProductOptionalParams
191
+ ): Promise<ProductsGetProductResponse> {
190
192
  return this.client.sendOperationRequest(
191
- {
192
- resourceGroup,
193
- registrationName,
194
- productName,
195
- options
196
- },
197
- getProductOperationSpec,
198
- callback) as Promise<Models.ProductsGetProductResponse>;
193
+ { resourceGroup, registrationName, productName, options },
194
+ getProductOperationSpec
195
+ );
199
196
  }
200
197
 
201
198
  /**
@@ -203,82 +200,46 @@ export class Products {
203
200
  * @param resourceGroup Name of the resource group.
204
201
  * @param registrationName Name of the Azure Stack registration.
205
202
  * @param productName Name of the product.
206
- * @param [options] The optional parameters
207
- * @returns Promise<Models.ProductsUploadLogResponse>
208
- */
209
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsUploadLogResponse>;
210
- /**
211
- * @param resourceGroup Name of the resource group.
212
- * @param registrationName Name of the Azure Stack registration.
213
- * @param productName Name of the product.
214
- * @param callback The callback
215
- */
216
- uploadLog(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback<Models.ProductLog>): void;
217
- /**
218
- * @param resourceGroup Name of the resource group.
219
- * @param registrationName Name of the Azure Stack registration.
220
- * @param productName Name of the product.
221
- * @param options The optional parameters
222
- * @param callback The callback
203
+ * @param options The options parameters.
223
204
  */
224
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProductLog>): void;
225
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ProductLog>, callback?: msRest.ServiceCallback<Models.ProductLog>): Promise<Models.ProductsUploadLogResponse> {
205
+ uploadLog(
206
+ resourceGroup: string,
207
+ registrationName: string,
208
+ productName: string,
209
+ options?: ProductsUploadLogOptionalParams
210
+ ): Promise<ProductsUploadLogResponse> {
226
211
  return this.client.sendOperationRequest(
227
- {
228
- resourceGroup,
229
- registrationName,
230
- productName,
231
- options
232
- },
233
- uploadLogOperationSpec,
234
- callback) as Promise<Models.ProductsUploadLogResponse>;
212
+ { resourceGroup, registrationName, productName, options },
213
+ uploadLogOperationSpec
214
+ );
235
215
  }
236
216
 
237
217
  /**
238
- * Returns a list of products.
239
- * @param nextPageLink The NextLink from the previous successful call to List operation.
240
- * @param [options] The optional parameters
241
- * @returns Promise<Models.ProductsListNextResponse>
242
- */
243
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ProductsListNextResponse>;
244
- /**
245
- * @param nextPageLink The NextLink from the previous successful call to List operation.
246
- * @param callback The callback
247
- */
248
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ProductList>): void;
249
- /**
250
- * @param nextPageLink The NextLink from the previous successful call to List operation.
251
- * @param options The optional parameters
252
- * @param callback The callback
218
+ * ListNext
219
+ * @param resourceGroup Name of the resource group.
220
+ * @param registrationName Name of the Azure Stack registration.
221
+ * @param nextLink The nextLink from the previous successful call to the List method.
222
+ * @param options The options parameters.
253
223
  */
254
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ProductList>): void;
255
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ProductList>, callback?: msRest.ServiceCallback<Models.ProductList>): Promise<Models.ProductsListNextResponse> {
224
+ private _listNext(
225
+ resourceGroup: string,
226
+ registrationName: string,
227
+ nextLink: string,
228
+ options?: ProductsListNextOptionalParams
229
+ ): Promise<ProductsListNextResponse> {
256
230
  return this.client.sendOperationRequest(
257
- {
258
- nextPageLink,
259
- options
260
- },
261
- listNextOperationSpec,
262
- callback) as Promise<Models.ProductsListNextResponse>;
231
+ { resourceGroup, registrationName, nextLink, options },
232
+ listNextOperationSpec
233
+ );
263
234
  }
264
235
  }
265
-
266
236
  // Operation Specifications
267
- const serializer = new msRest.Serializer(Mappers);
268
- const listOperationSpec: msRest.OperationSpec = {
237
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
238
+
239
+ const listOperationSpec: coreClient.OperationSpec = {
240
+ path:
241
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products",
269
242
  httpMethod: "GET",
270
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products",
271
- urlParameters: [
272
- Parameters.subscriptionId,
273
- Parameters.resourceGroup,
274
- Parameters.registrationName
275
- ],
276
- queryParameters: [
277
- Parameters.apiVersion
278
- ],
279
- headerParameters: [
280
- Parameters.acceptLanguage
281
- ],
282
243
  responses: {
283
244
  200: {
284
245
  bodyMapper: Mappers.ProductList
@@ -287,24 +248,20 @@ const listOperationSpec: msRest.OperationSpec = {
287
248
  bodyMapper: Mappers.ErrorResponse
288
249
  }
289
250
  },
290
- serializer
291
- };
292
-
293
- const getOperationSpec: msRest.OperationSpec = {
294
- httpMethod: "GET",
295
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}",
251
+ queryParameters: [Parameters.apiVersion],
296
252
  urlParameters: [
253
+ Parameters.$host,
297
254
  Parameters.subscriptionId,
298
255
  Parameters.resourceGroup,
299
- Parameters.registrationName,
300
- Parameters.productName
301
- ],
302
- queryParameters: [
303
- Parameters.apiVersion
304
- ],
305
- headerParameters: [
306
- Parameters.acceptLanguage
256
+ Parameters.registrationName
307
257
  ],
258
+ headerParameters: [Parameters.accept],
259
+ serializer
260
+ };
261
+ const getOperationSpec: coreClient.OperationSpec = {
262
+ path:
263
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}",
264
+ httpMethod: "GET",
308
265
  responses: {
309
266
  200: {
310
267
  bodyMapper: Mappers.Product
@@ -313,56 +270,44 @@ const getOperationSpec: msRest.OperationSpec = {
313
270
  bodyMapper: Mappers.ErrorResponse
314
271
  }
315
272
  },
316
- serializer
317
- };
318
-
319
- const listDetailsOperationSpec: msRest.OperationSpec = {
320
- httpMethod: "POST",
321
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listDetails",
273
+ queryParameters: [Parameters.apiVersion],
322
274
  urlParameters: [
275
+ Parameters.$host,
323
276
  Parameters.subscriptionId,
324
277
  Parameters.resourceGroup,
325
278
  Parameters.registrationName,
326
279
  Parameters.productName
327
280
  ],
328
- queryParameters: [
329
- Parameters.apiVersion
330
- ],
331
- headerParameters: [
332
- Parameters.acceptLanguage
333
- ],
281
+ headerParameters: [Parameters.accept],
282
+ serializer
283
+ };
284
+ const listDetailsOperationSpec: coreClient.OperationSpec = {
285
+ path:
286
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listDetails",
287
+ httpMethod: "POST",
334
288
  responses: {
335
289
  200: {
336
290
  bodyMapper: Mappers.ExtendedProduct
337
291
  },
338
292
  default: {
339
- bodyMapper: Mappers.CloudError
293
+ bodyMapper: Mappers.ErrorResponse
340
294
  }
341
295
  },
342
- serializer
343
- };
344
-
345
- const getProductsOperationSpec: msRest.OperationSpec = {
346
- httpMethod: "POST",
347
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts",
296
+ queryParameters: [Parameters.apiVersion],
348
297
  urlParameters: [
298
+ Parameters.$host,
349
299
  Parameters.subscriptionId,
350
300
  Parameters.resourceGroup,
351
- Parameters.registrationName
352
- ],
353
- queryParameters: [
354
- Parameters.apiVersion
355
- ],
356
- headerParameters: [
357
- Parameters.acceptLanguage
301
+ Parameters.registrationName,
302
+ Parameters.productName
358
303
  ],
359
- requestBody: {
360
- parameterPath: [
361
- "options",
362
- "deviceConfiguration"
363
- ],
364
- mapper: Mappers.DeviceConfiguration
365
- },
304
+ headerParameters: [Parameters.accept],
305
+ serializer
306
+ };
307
+ const getProductsOperationSpec: coreClient.OperationSpec = {
308
+ path:
309
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProducts",
310
+ httpMethod: "POST",
366
311
  responses: {
367
312
  200: {
368
313
  bodyMapper: Mappers.ProductList
@@ -371,31 +316,23 @@ const getProductsOperationSpec: msRest.OperationSpec = {
371
316
  bodyMapper: Mappers.ErrorResponse
372
317
  }
373
318
  },
374
- serializer
375
- };
376
-
377
- const getProductOperationSpec: msRest.OperationSpec = {
378
- httpMethod: "POST",
379
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct",
319
+ requestBody: Parameters.deviceConfiguration,
320
+ queryParameters: [Parameters.apiVersion],
380
321
  urlParameters: [
322
+ Parameters.$host,
381
323
  Parameters.subscriptionId,
382
324
  Parameters.resourceGroup,
383
325
  Parameters.registrationName,
384
326
  Parameters.productName
385
327
  ],
386
- queryParameters: [
387
- Parameters.apiVersion
388
- ],
389
- headerParameters: [
390
- Parameters.acceptLanguage
391
- ],
392
- requestBody: {
393
- parameterPath: [
394
- "options",
395
- "deviceConfiguration"
396
- ],
397
- mapper: Mappers.DeviceConfiguration
398
- },
328
+ headerParameters: [Parameters.accept, Parameters.contentType],
329
+ mediaType: "json",
330
+ serializer
331
+ };
332
+ const getProductOperationSpec: coreClient.OperationSpec = {
333
+ path:
334
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProduct",
335
+ httpMethod: "POST",
399
336
  responses: {
400
337
  200: {
401
338
  bodyMapper: Mappers.Product
@@ -404,31 +341,23 @@ const getProductOperationSpec: msRest.OperationSpec = {
404
341
  bodyMapper: Mappers.ErrorResponse
405
342
  }
406
343
  },
407
- serializer
408
- };
409
-
410
- const uploadLogOperationSpec: msRest.OperationSpec = {
411
- httpMethod: "POST",
412
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog",
344
+ requestBody: Parameters.deviceConfiguration,
345
+ queryParameters: [Parameters.apiVersion],
413
346
  urlParameters: [
347
+ Parameters.$host,
414
348
  Parameters.subscriptionId,
415
349
  Parameters.resourceGroup,
416
350
  Parameters.registrationName,
417
351
  Parameters.productName
418
352
  ],
419
- queryParameters: [
420
- Parameters.apiVersion
421
- ],
422
- headerParameters: [
423
- Parameters.acceptLanguage
424
- ],
425
- requestBody: {
426
- parameterPath: [
427
- "options",
428
- "marketplaceProductLogUpdate"
429
- ],
430
- mapper: Mappers.MarketplaceProductLogUpdate
431
- },
353
+ headerParameters: [Parameters.accept, Parameters.contentType],
354
+ mediaType: "json",
355
+ serializer
356
+ };
357
+ const uploadLogOperationSpec: coreClient.OperationSpec = {
358
+ path:
359
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog",
360
+ httpMethod: "POST",
432
361
  responses: {
433
362
  200: {
434
363
  bodyMapper: Mappers.ProductLog
@@ -437,19 +366,22 @@ const uploadLogOperationSpec: msRest.OperationSpec = {
437
366
  bodyMapper: Mappers.ErrorResponse
438
367
  }
439
368
  },
369
+ requestBody: Parameters.marketplaceProductLogUpdate,
370
+ queryParameters: [Parameters.apiVersion],
371
+ urlParameters: [
372
+ Parameters.$host,
373
+ Parameters.subscriptionId,
374
+ Parameters.resourceGroup,
375
+ Parameters.registrationName,
376
+ Parameters.productName
377
+ ],
378
+ headerParameters: [Parameters.accept, Parameters.contentType],
379
+ mediaType: "json",
440
380
  serializer
441
381
  };
442
-
443
- const listNextOperationSpec: msRest.OperationSpec = {
444
- httpMethod: "GET",
445
- baseUrl: "https://management.azure.com",
382
+ const listNextOperationSpec: coreClient.OperationSpec = {
446
383
  path: "{nextLink}",
447
- urlParameters: [
448
- Parameters.nextPageLink
449
- ],
450
- headerParameters: [
451
- Parameters.acceptLanguage
452
- ],
384
+ httpMethod: "GET",
453
385
  responses: {
454
386
  200: {
455
387
  bodyMapper: Mappers.ProductList
@@ -458,5 +390,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
458
390
  bodyMapper: Mappers.ErrorResponse
459
391
  }
460
392
  },
393
+ queryParameters: [Parameters.apiVersion],
394
+ urlParameters: [
395
+ Parameters.$host,
396
+ Parameters.nextLink,
397
+ Parameters.subscriptionId,
398
+ Parameters.resourceGroup,
399
+ Parameters.registrationName
400
+ ],
401
+ headerParameters: [Parameters.accept],
461
402
  serializer
462
403
  };