@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,40 @@
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/customerSubscriptionsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { CustomerSubscriptions } 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
+ CustomerSubscription,
17
+ CustomerSubscriptionsListNextOptionalParams,
18
+ CustomerSubscriptionsListOptionalParams,
19
+ CustomerSubscriptionsListResponse,
20
+ CustomerSubscriptionsGetOptionalParams,
21
+ CustomerSubscriptionsGetResponse,
22
+ CustomerSubscriptionsDeleteOptionalParams,
23
+ CustomerSubscriptionsCreateOptionalParams,
24
+ CustomerSubscriptionsCreateResponse,
25
+ CustomerSubscriptionsListNextResponse
26
+ } from "../models";
16
27
 
17
- /** Class representing a CustomerSubscriptions. */
18
- export class CustomerSubscriptions {
19
- private readonly client: AzureStackManagementClientContext;
28
+ /// <reference lib="esnext.asynciterable" />
29
+ /** Class containing CustomerSubscriptions operations. */
30
+ export class CustomerSubscriptionsImpl implements CustomerSubscriptions {
31
+ private readonly client: AzureStackManagementClient;
20
32
 
21
33
  /**
22
- * Create a CustomerSubscriptions.
23
- * @param {AzureStackManagementClientContext} client Reference to the service client.
34
+ * Initialize a new instance of the class CustomerSubscriptions class.
35
+ * @param client Reference to the service client
24
36
  */
25
- constructor(client: AzureStackManagementClientContext) {
37
+ constructor(client: AzureStackManagementClient) {
26
38
  this.client = client;
27
39
  }
28
40
 
@@ -30,68 +42,95 @@ export class CustomerSubscriptions {
30
42
  * Returns a list of products.
31
43
  * @param resourceGroup Name of the resource group.
32
44
  * @param registrationName Name of the Azure Stack registration.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.CustomerSubscriptionsListResponse>
45
+ * @param options The options parameters.
35
46
  */
36
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise<Models.CustomerSubscriptionsListResponse>;
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.CustomerSubscriptionList>): 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.CustomerSubscriptionList>): void;
50
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CustomerSubscriptionList>, callback?: msRest.ServiceCallback<Models.CustomerSubscriptionList>): Promise<Models.CustomerSubscriptionsListResponse> {
51
- return this.client.sendOperationRequest(
52
- {
47
+ public list(
48
+ resourceGroup: string,
49
+ registrationName: string,
50
+ options?: CustomerSubscriptionsListOptionalParams
51
+ ): PagedAsyncIterableIterator<CustomerSubscription> {
52
+ const iter = this.listPagingAll(resourceGroup, registrationName, options);
53
+ return {
54
+ next() {
55
+ return iter.next();
56
+ },
57
+ [Symbol.asyncIterator]() {
58
+ return this;
59
+ },
60
+ byPage: () => {
61
+ return this.listPagingPage(resourceGroup, registrationName, options);
62
+ }
63
+ };
64
+ }
65
+
66
+ private async *listPagingPage(
67
+ resourceGroup: string,
68
+ registrationName: string,
69
+ options?: CustomerSubscriptionsListOptionalParams
70
+ ): AsyncIterableIterator<CustomerSubscription[]> {
71
+ let result = await this._list(resourceGroup, registrationName, options);
72
+ yield result.value || [];
73
+ let continuationToken = result.nextLink;
74
+ while (continuationToken) {
75
+ result = await this._listNext(
53
76
  resourceGroup,
54
77
  registrationName,
78
+ continuationToken,
55
79
  options
56
- },
57
- listOperationSpec,
58
- callback) as Promise<Models.CustomerSubscriptionsListResponse>;
80
+ );
81
+ continuationToken = result.nextLink;
82
+ yield result.value || [];
83
+ }
84
+ }
85
+
86
+ private async *listPagingAll(
87
+ resourceGroup: string,
88
+ registrationName: string,
89
+ options?: CustomerSubscriptionsListOptionalParams
90
+ ): AsyncIterableIterator<CustomerSubscription> {
91
+ for await (const page of this.listPagingPage(
92
+ resourceGroup,
93
+ registrationName,
94
+ options
95
+ )) {
96
+ yield* page;
97
+ }
59
98
  }
60
99
 
61
100
  /**
62
- * Returns the specified product.
63
- * @param resourceGroup Name of the resource group.
64
- * @param registrationName Name of the Azure Stack registration.
65
- * @param customerSubscriptionName Name of the product.
66
- * @param [options] The optional parameters
67
- * @returns Promise<Models.CustomerSubscriptionsGetResponse>
68
- */
69
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise<Models.CustomerSubscriptionsGetResponse>;
70
- /**
101
+ * Returns a list of products.
71
102
  * @param resourceGroup Name of the resource group.
72
103
  * @param registrationName Name of the Azure Stack registration.
73
- * @param customerSubscriptionName Name of the product.
74
- * @param callback The callback
104
+ * @param options The options parameters.
75
105
  */
76
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, callback: msRest.ServiceCallback<Models.CustomerSubscription>): void;
106
+ private _list(
107
+ resourceGroup: string,
108
+ registrationName: string,
109
+ options?: CustomerSubscriptionsListOptionalParams
110
+ ): Promise<CustomerSubscriptionsListResponse> {
111
+ return this.client.sendOperationRequest(
112
+ { resourceGroup, registrationName, options },
113
+ listOperationSpec
114
+ );
115
+ }
116
+
77
117
  /**
118
+ * Returns the specified product.
78
119
  * @param resourceGroup Name of the resource group.
79
120
  * @param registrationName Name of the Azure Stack registration.
80
121
  * @param customerSubscriptionName Name of the product.
81
- * @param options The optional parameters
82
- * @param callback The callback
122
+ * @param options The options parameters.
83
123
  */
84
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CustomerSubscription>): void;
85
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CustomerSubscription>, callback?: msRest.ServiceCallback<Models.CustomerSubscription>): Promise<Models.CustomerSubscriptionsGetResponse> {
124
+ get(
125
+ resourceGroup: string,
126
+ registrationName: string,
127
+ customerSubscriptionName: string,
128
+ options?: CustomerSubscriptionsGetOptionalParams
129
+ ): Promise<CustomerSubscriptionsGetResponse> {
86
130
  return this.client.sendOperationRequest(
87
- {
88
- resourceGroup,
89
- registrationName,
90
- customerSubscriptionName,
91
- options
92
- },
93
- getOperationSpec,
94
- callback) as Promise<Models.CustomerSubscriptionsGetResponse>;
131
+ { resourceGroup, registrationName, customerSubscriptionName, options },
132
+ getOperationSpec
133
+ );
95
134
  }
96
135
 
97
136
  /**
@@ -99,35 +138,18 @@ export class CustomerSubscriptions {
99
138
  * @param resourceGroup Name of the resource group.
100
139
  * @param registrationName Name of the Azure Stack registration.
101
140
  * @param customerSubscriptionName Name of the product.
102
- * @param [options] The optional parameters
103
- * @returns Promise<msRest.RestResponse>
141
+ * @param options The options parameters.
104
142
  */
105
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
106
- /**
107
- * @param resourceGroup Name of the resource group.
108
- * @param registrationName Name of the Azure Stack registration.
109
- * @param customerSubscriptionName Name of the product.
110
- * @param callback The callback
111
- */
112
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, callback: msRest.ServiceCallback<void>): void;
113
- /**
114
- * @param resourceGroup Name of the resource group.
115
- * @param registrationName Name of the Azure Stack registration.
116
- * @param customerSubscriptionName Name of the product.
117
- * @param options The optional parameters
118
- * @param callback The callback
119
- */
120
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
121
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
143
+ delete(
144
+ resourceGroup: string,
145
+ registrationName: string,
146
+ customerSubscriptionName: string,
147
+ options?: CustomerSubscriptionsDeleteOptionalParams
148
+ ): Promise<void> {
122
149
  return this.client.sendOperationRequest(
123
- {
124
- resourceGroup,
125
- registrationName,
126
- customerSubscriptionName,
127
- options
128
- },
129
- deleteMethodOperationSpec,
130
- callback);
150
+ { resourceGroup, registrationName, customerSubscriptionName, options },
151
+ deleteOperationSpec
152
+ );
131
153
  }
132
154
 
133
155
  /**
@@ -136,28 +158,15 @@ export class CustomerSubscriptions {
136
158
  * @param registrationName Name of the Azure Stack registration.
137
159
  * @param customerSubscriptionName Name of the product.
138
160
  * @param customerCreationParameters Parameters use to create a customer subscription.
139
- * @param [options] The optional parameters
140
- * @returns Promise<Models.CustomerSubscriptionsCreateResponse>
161
+ * @param options The options parameters.
141
162
  */
142
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options?: msRest.RequestOptionsBase): Promise<Models.CustomerSubscriptionsCreateResponse>;
143
- /**
144
- * @param resourceGroup Name of the resource group.
145
- * @param registrationName Name of the Azure Stack registration.
146
- * @param customerSubscriptionName Name of the product.
147
- * @param customerCreationParameters Parameters use to create a customer subscription.
148
- * @param callback The callback
149
- */
150
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, callback: msRest.ServiceCallback<Models.CustomerSubscription>): void;
151
- /**
152
- * @param resourceGroup Name of the resource group.
153
- * @param registrationName Name of the Azure Stack registration.
154
- * @param customerSubscriptionName Name of the product.
155
- * @param customerCreationParameters Parameters use to create a customer subscription.
156
- * @param options The optional parameters
157
- * @param callback The callback
158
- */
159
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CustomerSubscription>): void;
160
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CustomerSubscription>, callback?: msRest.ServiceCallback<Models.CustomerSubscription>): Promise<Models.CustomerSubscriptionsCreateResponse> {
163
+ create(
164
+ resourceGroup: string,
165
+ registrationName: string,
166
+ customerSubscriptionName: string,
167
+ customerCreationParameters: CustomerSubscription,
168
+ options?: CustomerSubscriptionsCreateOptionalParams
169
+ ): Promise<CustomerSubscriptionsCreateResponse> {
161
170
  return this.client.sendOperationRequest(
162
171
  {
163
172
  resourceGroup,
@@ -166,55 +175,36 @@ export class CustomerSubscriptions {
166
175
  customerCreationParameters,
167
176
  options
168
177
  },
169
- createOperationSpec,
170
- callback) as Promise<Models.CustomerSubscriptionsCreateResponse>;
178
+ createOperationSpec
179
+ );
171
180
  }
172
181
 
173
182
  /**
174
- * Returns a list of products.
175
- * @param nextPageLink The NextLink from the previous successful call to List operation.
176
- * @param [options] The optional parameters
177
- * @returns Promise<Models.CustomerSubscriptionsListNextResponse>
178
- */
179
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.CustomerSubscriptionsListNextResponse>;
180
- /**
181
- * @param nextPageLink The NextLink from the previous successful call to List operation.
182
- * @param callback The callback
183
- */
184
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.CustomerSubscriptionList>): void;
185
- /**
186
- * @param nextPageLink The NextLink from the previous successful call to List operation.
187
- * @param options The optional parameters
188
- * @param callback The callback
183
+ * ListNext
184
+ * @param resourceGroup Name of the resource group.
185
+ * @param registrationName Name of the Azure Stack registration.
186
+ * @param nextLink The nextLink from the previous successful call to the List method.
187
+ * @param options The options parameters.
189
188
  */
190
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CustomerSubscriptionList>): void;
191
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CustomerSubscriptionList>, callback?: msRest.ServiceCallback<Models.CustomerSubscriptionList>): Promise<Models.CustomerSubscriptionsListNextResponse> {
189
+ private _listNext(
190
+ resourceGroup: string,
191
+ registrationName: string,
192
+ nextLink: string,
193
+ options?: CustomerSubscriptionsListNextOptionalParams
194
+ ): Promise<CustomerSubscriptionsListNextResponse> {
192
195
  return this.client.sendOperationRequest(
193
- {
194
- nextPageLink,
195
- options
196
- },
197
- listNextOperationSpec,
198
- callback) as Promise<Models.CustomerSubscriptionsListNextResponse>;
196
+ { resourceGroup, registrationName, nextLink, options },
197
+ listNextOperationSpec
198
+ );
199
199
  }
200
200
  }
201
-
202
201
  // Operation Specifications
203
- const serializer = new msRest.Serializer(Mappers);
204
- const listOperationSpec: msRest.OperationSpec = {
202
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
203
+
204
+ const listOperationSpec: coreClient.OperationSpec = {
205
+ path:
206
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions",
205
207
  httpMethod: "GET",
206
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions",
207
- urlParameters: [
208
- Parameters.subscriptionId,
209
- Parameters.resourceGroup,
210
- Parameters.registrationName
211
- ],
212
- queryParameters: [
213
- Parameters.apiVersion
214
- ],
215
- headerParameters: [
216
- Parameters.acceptLanguage
217
- ],
218
208
  responses: {
219
209
  200: {
220
210
  bodyMapper: Mappers.CustomerSubscriptionList
@@ -223,24 +213,20 @@ const listOperationSpec: msRest.OperationSpec = {
223
213
  bodyMapper: Mappers.ErrorResponse
224
214
  }
225
215
  },
226
- serializer
227
- };
228
-
229
- const getOperationSpec: msRest.OperationSpec = {
230
- httpMethod: "GET",
231
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
216
+ queryParameters: [Parameters.apiVersion],
232
217
  urlParameters: [
218
+ Parameters.$host,
233
219
  Parameters.subscriptionId,
234
220
  Parameters.resourceGroup,
235
- Parameters.registrationName,
236
- Parameters.customerSubscriptionName
237
- ],
238
- queryParameters: [
239
- Parameters.apiVersion
240
- ],
241
- headerParameters: [
242
- Parameters.acceptLanguage
221
+ Parameters.registrationName
243
222
  ],
223
+ headerParameters: [Parameters.accept],
224
+ serializer
225
+ };
226
+ const getOperationSpec: coreClient.OperationSpec = {
227
+ path:
228
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
229
+ httpMethod: "GET",
244
230
  responses: {
245
231
  200: {
246
232
  bodyMapper: Mappers.CustomerSubscription
@@ -249,77 +235,67 @@ const getOperationSpec: msRest.OperationSpec = {
249
235
  bodyMapper: Mappers.ErrorResponse
250
236
  }
251
237
  },
252
- serializer
253
- };
254
-
255
- const deleteMethodOperationSpec: msRest.OperationSpec = {
256
- httpMethod: "DELETE",
257
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
238
+ queryParameters: [Parameters.apiVersion],
258
239
  urlParameters: [
240
+ Parameters.$host,
259
241
  Parameters.subscriptionId,
260
242
  Parameters.resourceGroup,
261
243
  Parameters.registrationName,
262
244
  Parameters.customerSubscriptionName
263
245
  ],
264
- queryParameters: [
265
- Parameters.apiVersion
266
- ],
267
- headerParameters: [
268
- Parameters.acceptLanguage
269
- ],
246
+ headerParameters: [Parameters.accept],
247
+ serializer
248
+ };
249
+ const deleteOperationSpec: coreClient.OperationSpec = {
250
+ path:
251
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
252
+ httpMethod: "DELETE",
270
253
  responses: {
271
254
  200: {},
272
255
  204: {},
273
256
  default: {
274
- bodyMapper: Mappers.CloudError
257
+ bodyMapper: Mappers.ErrorResponse
275
258
  }
276
259
  },
277
- serializer
278
- };
279
-
280
- const createOperationSpec: msRest.OperationSpec = {
281
- httpMethod: "PUT",
282
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
260
+ queryParameters: [Parameters.apiVersion],
283
261
  urlParameters: [
262
+ Parameters.$host,
284
263
  Parameters.subscriptionId,
285
264
  Parameters.resourceGroup,
286
265
  Parameters.registrationName,
287
266
  Parameters.customerSubscriptionName
288
267
  ],
289
- queryParameters: [
290
- Parameters.apiVersion
291
- ],
292
- headerParameters: [
293
- Parameters.acceptLanguage
294
- ],
295
- requestBody: {
296
- parameterPath: "customerCreationParameters",
297
- mapper: {
298
- ...Mappers.CustomerSubscription,
299
- required: true
300
- }
301
- },
268
+ headerParameters: [Parameters.accept],
269
+ serializer
270
+ };
271
+ const createOperationSpec: coreClient.OperationSpec = {
272
+ path:
273
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
274
+ httpMethod: "PUT",
302
275
  responses: {
303
276
  200: {
304
277
  bodyMapper: Mappers.CustomerSubscription
305
278
  },
306
279
  default: {
307
- bodyMapper: Mappers.CloudError
280
+ bodyMapper: Mappers.ErrorResponse
308
281
  }
309
282
  },
283
+ requestBody: Parameters.customerCreationParameters,
284
+ queryParameters: [Parameters.apiVersion],
285
+ urlParameters: [
286
+ Parameters.$host,
287
+ Parameters.subscriptionId,
288
+ Parameters.resourceGroup,
289
+ Parameters.registrationName,
290
+ Parameters.customerSubscriptionName
291
+ ],
292
+ headerParameters: [Parameters.accept, Parameters.contentType],
293
+ mediaType: "json",
310
294
  serializer
311
295
  };
312
-
313
- const listNextOperationSpec: msRest.OperationSpec = {
314
- httpMethod: "GET",
315
- baseUrl: "https://management.azure.com",
296
+ const listNextOperationSpec: coreClient.OperationSpec = {
316
297
  path: "{nextLink}",
317
- urlParameters: [
318
- Parameters.nextPageLink
319
- ],
320
- headerParameters: [
321
- Parameters.acceptLanguage
322
- ],
298
+ httpMethod: "GET",
323
299
  responses: {
324
300
  200: {
325
301
  bodyMapper: Mappers.CustomerSubscriptionList
@@ -328,5 +304,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
328
304
  bodyMapper: Mappers.ErrorResponse
329
305
  }
330
306
  },
307
+ queryParameters: [Parameters.apiVersion],
308
+ urlParameters: [
309
+ Parameters.$host,
310
+ Parameters.nextLink,
311
+ Parameters.subscriptionId,
312
+ Parameters.resourceGroup,
313
+ Parameters.registrationName
314
+ ],
315
+ headerParameters: [Parameters.accept],
331
316
  serializer
332
317
  };
@@ -1,14 +1,14 @@
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
9
  export * from "./operations";
10
+ export * from "./cloudManifestFile";
11
+ export * from "./customerSubscriptions";
12
12
  export * from "./products";
13
13
  export * from "./registrations";
14
- export * from "./customerSubscriptions";
14
+ export * from "./linkedSubscriptions";