@azure/arm-batch 4.0.0 → 7.0.0-alpha.20211122.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 (251) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +75 -77
  4. package/dist/index.js +6873 -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/batchManagementClient.d.ts +24 -0
  9. package/dist-esm/src/batchManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/batchManagementClient.js +31 -0
  11. package/dist-esm/src/batchManagementClient.js.map +1 -0
  12. package/dist-esm/src/batchManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/batchManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/batchManagementClientContext.js +50 -0
  15. package/dist-esm/src/batchManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +1780 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +9 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +112 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +2357 -1248
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +34 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +303 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/applicationOperations.d.ts +71 -0
  37. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/applicationOperations.js +269 -0
  39. package/dist-esm/src/operations/applicationOperations.js.map +1 -0
  40. package/dist-esm/src/operations/applicationPackageOperations.d.ts +83 -0
  41. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/applicationPackageOperations.js +294 -0
  43. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -0
  44. package/dist-esm/src/operations/batchAccountOperations.d.ts +171 -0
  45. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/batchAccountOperations.js +681 -0
  47. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -0
  48. package/dist-esm/src/operations/certificateOperations.d.ts +106 -0
  49. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/certificateOperations.js +388 -0
  51. package/dist-esm/src/operations/certificateOperations.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +17 -0
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/location.d.ts +71 -0
  57. package/dist-esm/src/operations/location.d.ts.map +1 -0
  58. package/dist-esm/src/operations/location.js +316 -0
  59. package/dist-esm/src/operations/location.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +32 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +120 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/poolOperations.d.ts +103 -0
  65. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/poolOperations.js +410 -0
  67. package/dist-esm/src/operations/poolOperations.js.map +1 -0
  68. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +70 -0
  69. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +278 -0
  71. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -0
  72. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts +47 -0
  73. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/privateLinkResourceOperations.js +170 -0
  75. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts +46 -0
  77. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/applicationOperations.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/applicationOperations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts +56 -0
  81. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +112 -0
  85. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +81 -0
  89. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/certificateOperations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/certificateOperations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/location.d.ts +31 -0
  97. package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/location.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/location.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  101. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts +78 -0
  105. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/poolOperations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/poolOperations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +45 -0
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts +22 -0
  113. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js.map +1 -0
  116. package/dist-esm/test/sampleTest.d.ts +4 -0
  117. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  118. package/dist-esm/test/sampleTest.js +479 -0
  119. package/dist-esm/test/sampleTest.js.map +1 -0
  120. package/package.json +72 -25
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +184 -27
  123. package/src/batchManagementClient.ts +75 -0
  124. package/src/batchManagementClientContext.ts +71 -0
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +2045 -0
  128. package/{lib → src}/models/mappers.ts +2413 -1223
  129. package/src/models/parameters.ts +351 -0
  130. package/src/operations/applicationOperations.ts +357 -0
  131. package/src/operations/applicationPackageOperations.ts +410 -0
  132. package/src/operations/batchAccountOperations.ts +901 -0
  133. package/src/operations/certificateOperations.ts +527 -0
  134. package/{lib → src}/operations/index.ts +5 -5
  135. package/src/operations/location.ts +413 -0
  136. package/src/operations/operations.ts +137 -0
  137. package/src/operations/poolOperations.ts +560 -0
  138. package/src/operations/privateEndpointConnectionOperations.ts +388 -0
  139. package/src/operations/privateLinkResourceOperations.ts +235 -0
  140. package/src/operationsInterfaces/applicationOperations.ts +90 -0
  141. package/src/operationsInterfaces/applicationPackageOperations.ts +106 -0
  142. package/src/operationsInterfaces/batchAccountOperations.ts +196 -0
  143. package/src/operationsInterfaces/certificateOperations.ts +139 -0
  144. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +6 -6
  145. package/src/operationsInterfaces/location.ts +62 -0
  146. package/src/operationsInterfaces/operations.ts +22 -0
  147. package/src/operationsInterfaces/poolOperations.ts +142 -0
  148. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +87 -0
  149. package/src/operationsInterfaces/privateLinkResourceOperations.ts +45 -0
  150. package/tsconfig.json +4 -4
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -4689
  154. package/dist/arm-batch.js.map +0 -1
  155. package/dist/arm-batch.min.js +0 -1
  156. package/dist/arm-batch.min.js.map +0 -1
  157. package/esm/batchManagementClient.d.ts +0 -25
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -40
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -17
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -57
  164. package/esm/batchManagementClientContext.js.map +0 -1
  165. package/esm/models/applicationOperationsMappers.d.ts +0 -2
  166. package/esm/models/applicationOperationsMappers.d.ts.map +0 -1
  167. package/esm/models/applicationOperationsMappers.js +0 -11
  168. package/esm/models/applicationOperationsMappers.js.map +0 -1
  169. package/esm/models/applicationPackageOperationsMappers.d.ts +0 -2
  170. package/esm/models/applicationPackageOperationsMappers.d.ts.map +0 -1
  171. package/esm/models/applicationPackageOperationsMappers.js +0 -11
  172. package/esm/models/applicationPackageOperationsMappers.js.map +0 -1
  173. package/esm/models/batchAccountOperationsMappers.d.ts +0 -2
  174. package/esm/models/batchAccountOperationsMappers.d.ts.map +0 -1
  175. package/esm/models/batchAccountOperationsMappers.js +0 -11
  176. package/esm/models/batchAccountOperationsMappers.js.map +0 -1
  177. package/esm/models/certificateOperationsMappers.d.ts +0 -2
  178. package/esm/models/certificateOperationsMappers.d.ts.map +0 -1
  179. package/esm/models/certificateOperationsMappers.js +0 -11
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3108
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js +0 -10
  184. package/esm/models/index.js.map +0 -1
  185. package/esm/models/locationMappers.d.ts +0 -2
  186. package/esm/models/locationMappers.d.ts.map +0 -1
  187. package/esm/models/locationMappers.js +0 -11
  188. package/esm/models/locationMappers.js.map +0 -1
  189. package/esm/models/mappers.d.ts +0 -76
  190. package/esm/models/mappers.d.ts.map +0 -1
  191. package/esm/models/mappers.js.map +0 -1
  192. package/esm/models/operationsMappers.d.ts +0 -2
  193. package/esm/models/operationsMappers.d.ts.map +0 -1
  194. package/esm/models/operationsMappers.js +0 -11
  195. package/esm/models/operationsMappers.js.map +0 -1
  196. package/esm/models/parameters.d.ts +0 -18
  197. package/esm/models/parameters.d.ts.map +0 -1
  198. package/esm/models/parameters.js +0 -196
  199. package/esm/models/parameters.js.map +0 -1
  200. package/esm/models/poolOperationsMappers.d.ts +0 -2
  201. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  202. package/esm/models/poolOperationsMappers.js +0 -11
  203. package/esm/models/poolOperationsMappers.js.map +0 -1
  204. package/esm/operations/applicationOperations.d.ts +0 -151
  205. package/esm/operations/applicationOperations.d.ts.map +0 -1
  206. package/esm/operations/applicationOperations.js +0 -226
  207. package/esm/operations/applicationOperations.js.map +0 -1
  208. package/esm/operations/applicationPackageOperations.d.ts +0 -124
  209. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  210. package/esm/operations/applicationPackageOperations.js +0 -171
  211. package/esm/operations/applicationPackageOperations.js.map +0 -1
  212. package/esm/operations/batchAccountOperations.d.ts +0 -246
  213. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  214. package/esm/operations/batchAccountOperations.js +0 -426
  215. package/esm/operations/batchAccountOperations.js.map +0 -1
  216. package/esm/operations/certificateOperations.d.ts +0 -198
  217. package/esm/operations/certificateOperations.d.ts.map +0 -1
  218. package/esm/operations/certificateOperations.js +0 -326
  219. package/esm/operations/certificateOperations.js.map +0 -1
  220. package/esm/operations/index.d.ts.map +0 -1
  221. package/esm/operations/index.js.map +0 -1
  222. package/esm/operations/location.d.ts +0 -52
  223. package/esm/operations/location.d.ts.map +0 -1
  224. package/esm/operations/location.js +0 -93
  225. package/esm/operations/location.js.map +0 -1
  226. package/esm/operations/operations.d.ts +0 -46
  227. package/esm/operations/operations.d.ts.map +0 -1
  228. package/esm/operations/operations.js +0 -77
  229. package/esm/operations/operations.js.map +0 -1
  230. package/esm/operations/poolOperations.d.ts +0 -199
  231. package/esm/operations/poolOperations.d.ts.map +0 -1
  232. package/esm/operations/poolOperations.js +0 -352
  233. package/esm/operations/poolOperations.js.map +0 -1
  234. package/lib/batchManagementClient.ts +0 -55
  235. package/lib/batchManagementClientContext.ts +0 -63
  236. package/lib/models/applicationOperationsMappers.ts +0 -19
  237. package/lib/models/applicationPackageOperationsMappers.ts +0 -16
  238. package/lib/models/batchAccountOperationsMappers.ts +0 -61
  239. package/lib/models/certificateOperationsMappers.ts +0 -60
  240. package/lib/models/index.ts +0 -3252
  241. package/lib/models/locationMappers.ts +0 -17
  242. package/lib/models/operationsMappers.ts +0 -17
  243. package/lib/models/parameters.ts +0 -198
  244. package/lib/models/poolOperationsMappers.ts +0 -61
  245. package/lib/operations/applicationOperations.ts +0 -399
  246. package/lib/operations/applicationPackageOperations.ts +0 -307
  247. package/lib/operations/batchAccountOperations.ts +0 -683
  248. package/lib/operations/certificateOperations.ts +0 -510
  249. package/lib/operations/location.ts +0 -147
  250. package/lib/operations/operations.ts +0 -123
  251. package/lib/operations/poolOperations.ts +0 -550
@@ -0,0 +1,351 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import {
10
+ OperationParameter,
11
+ OperationURLParameter,
12
+ OperationQueryParameter
13
+ } from "@azure/core-client";
14
+ import {
15
+ BatchAccountCreateParameters as BatchAccountCreateParametersMapper,
16
+ BatchAccountUpdateParameters as BatchAccountUpdateParametersMapper,
17
+ BatchAccountRegenerateKeyParameters as BatchAccountRegenerateKeyParametersMapper,
18
+ ActivateApplicationPackageParameters as ActivateApplicationPackageParametersMapper,
19
+ ApplicationPackage as ApplicationPackageMapper,
20
+ Application as ApplicationMapper,
21
+ CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper,
22
+ CertificateCreateOrUpdateParameters as CertificateCreateOrUpdateParametersMapper,
23
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper,
24
+ Pool as PoolMapper
25
+ } from "../models/mappers";
26
+
27
+ export const contentType: OperationParameter = {
28
+ parameterPath: ["options", "contentType"],
29
+ mapper: {
30
+ defaultValue: "application/json",
31
+ isConstant: true,
32
+ serializedName: "Content-Type",
33
+ type: {
34
+ name: "String"
35
+ }
36
+ }
37
+ };
38
+
39
+ export const parameters: OperationParameter = {
40
+ parameterPath: "parameters",
41
+ mapper: BatchAccountCreateParametersMapper
42
+ };
43
+
44
+ export const accept: OperationParameter = {
45
+ parameterPath: "accept",
46
+ mapper: {
47
+ defaultValue: "application/json",
48
+ isConstant: true,
49
+ serializedName: "Accept",
50
+ type: {
51
+ name: "String"
52
+ }
53
+ }
54
+ };
55
+
56
+ export const $host: OperationURLParameter = {
57
+ parameterPath: "$host",
58
+ mapper: {
59
+ serializedName: "$host",
60
+ required: true,
61
+ type: {
62
+ name: "String"
63
+ }
64
+ },
65
+ skipEncoding: true
66
+ };
67
+
68
+ export const resourceGroupName: OperationURLParameter = {
69
+ parameterPath: "resourceGroupName",
70
+ mapper: {
71
+ serializedName: "resourceGroupName",
72
+ required: true,
73
+ type: {
74
+ name: "String"
75
+ }
76
+ }
77
+ };
78
+
79
+ export const accountName: OperationURLParameter = {
80
+ parameterPath: "accountName",
81
+ mapper: {
82
+ constraints: {
83
+ Pattern: new RegExp("^[a-z0-9]+$"),
84
+ MaxLength: 24,
85
+ MinLength: 3
86
+ },
87
+ serializedName: "accountName",
88
+ required: true,
89
+ type: {
90
+ name: "String"
91
+ }
92
+ }
93
+ };
94
+
95
+ export const apiVersion: OperationQueryParameter = {
96
+ parameterPath: "apiVersion",
97
+ mapper: {
98
+ defaultValue: "2021-06-01",
99
+ isConstant: true,
100
+ serializedName: "api-version",
101
+ type: {
102
+ name: "String"
103
+ }
104
+ }
105
+ };
106
+
107
+ export const subscriptionId: OperationURLParameter = {
108
+ parameterPath: "subscriptionId",
109
+ mapper: {
110
+ serializedName: "subscriptionId",
111
+ required: true,
112
+ type: {
113
+ name: "String"
114
+ }
115
+ }
116
+ };
117
+
118
+ export const parameters1: OperationParameter = {
119
+ parameterPath: "parameters",
120
+ mapper: BatchAccountUpdateParametersMapper
121
+ };
122
+
123
+ export const accountName1: OperationURLParameter = {
124
+ parameterPath: "accountName",
125
+ mapper: {
126
+ constraints: {
127
+ Pattern: new RegExp("^[a-zA-Z0-9]+$"),
128
+ MaxLength: 24,
129
+ MinLength: 3
130
+ },
131
+ serializedName: "accountName",
132
+ required: true,
133
+ type: {
134
+ name: "String"
135
+ }
136
+ }
137
+ };
138
+
139
+ export const parameters2: OperationParameter = {
140
+ parameterPath: "parameters",
141
+ mapper: BatchAccountRegenerateKeyParametersMapper
142
+ };
143
+
144
+ export const nextLink: OperationURLParameter = {
145
+ parameterPath: "nextLink",
146
+ mapper: {
147
+ serializedName: "nextLink",
148
+ required: true,
149
+ type: {
150
+ name: "String"
151
+ }
152
+ },
153
+ skipEncoding: true
154
+ };
155
+
156
+ export const parameters3: OperationParameter = {
157
+ parameterPath: "parameters",
158
+ mapper: ActivateApplicationPackageParametersMapper
159
+ };
160
+
161
+ export const applicationName: OperationURLParameter = {
162
+ parameterPath: "applicationName",
163
+ mapper: {
164
+ constraints: {
165
+ Pattern: new RegExp("^[a-zA-Z0-9_-]+$"),
166
+ MaxLength: 64,
167
+ MinLength: 1
168
+ },
169
+ serializedName: "applicationName",
170
+ required: true,
171
+ type: {
172
+ name: "String"
173
+ }
174
+ }
175
+ };
176
+
177
+ export const versionName: OperationURLParameter = {
178
+ parameterPath: "versionName",
179
+ mapper: {
180
+ constraints: {
181
+ Pattern: new RegExp("^[a-zA-Z0-9_-][a-zA-Z0-9_.-]*$"),
182
+ MaxLength: 64,
183
+ MinLength: 1
184
+ },
185
+ serializedName: "versionName",
186
+ required: true,
187
+ type: {
188
+ name: "String"
189
+ }
190
+ }
191
+ };
192
+
193
+ export const parameters4: OperationParameter = {
194
+ parameterPath: ["options", "parameters"],
195
+ mapper: ApplicationPackageMapper
196
+ };
197
+
198
+ export const maxresults: OperationQueryParameter = {
199
+ parameterPath: ["options", "maxresults"],
200
+ mapper: {
201
+ serializedName: "maxresults",
202
+ type: {
203
+ name: "Number"
204
+ }
205
+ }
206
+ };
207
+
208
+ export const parameters5: OperationParameter = {
209
+ parameterPath: ["options", "parameters"],
210
+ mapper: ApplicationMapper
211
+ };
212
+
213
+ export const parameters6: OperationParameter = {
214
+ parameterPath: "parameters",
215
+ mapper: ApplicationMapper
216
+ };
217
+
218
+ export const locationName: OperationURLParameter = {
219
+ parameterPath: "locationName",
220
+ mapper: {
221
+ serializedName: "locationName",
222
+ required: true,
223
+ type: {
224
+ name: "String"
225
+ }
226
+ }
227
+ };
228
+
229
+ export const filter: OperationQueryParameter = {
230
+ parameterPath: ["options", "filter"],
231
+ mapper: {
232
+ serializedName: "$filter",
233
+ type: {
234
+ name: "String"
235
+ }
236
+ }
237
+ };
238
+
239
+ export const parameters7: OperationParameter = {
240
+ parameterPath: "parameters",
241
+ mapper: CheckNameAvailabilityParametersMapper
242
+ };
243
+
244
+ export const select: OperationQueryParameter = {
245
+ parameterPath: ["options", "select"],
246
+ mapper: {
247
+ serializedName: "$select",
248
+ type: {
249
+ name: "String"
250
+ }
251
+ }
252
+ };
253
+
254
+ export const parameters8: OperationParameter = {
255
+ parameterPath: "parameters",
256
+ mapper: CertificateCreateOrUpdateParametersMapper
257
+ };
258
+
259
+ export const certificateName: OperationURLParameter = {
260
+ parameterPath: "certificateName",
261
+ mapper: {
262
+ constraints: {
263
+ Pattern: new RegExp("^[\\w]+-[\\w]+$"),
264
+ MaxLength: 45,
265
+ MinLength: 5
266
+ },
267
+ serializedName: "certificateName",
268
+ required: true,
269
+ type: {
270
+ name: "String"
271
+ }
272
+ }
273
+ };
274
+
275
+ export const ifMatch: OperationParameter = {
276
+ parameterPath: ["options", "ifMatch"],
277
+ mapper: {
278
+ serializedName: "If-Match",
279
+ type: {
280
+ name: "String"
281
+ }
282
+ }
283
+ };
284
+
285
+ export const ifNoneMatch: OperationParameter = {
286
+ parameterPath: ["options", "ifNoneMatch"],
287
+ mapper: {
288
+ serializedName: "If-None-Match",
289
+ type: {
290
+ name: "String"
291
+ }
292
+ }
293
+ };
294
+
295
+ export const privateLinkResourceName: OperationURLParameter = {
296
+ parameterPath: "privateLinkResourceName",
297
+ mapper: {
298
+ constraints: {
299
+ Pattern: new RegExp("^[a-zA-Z0-9_-]+\\.?[a-fA-F0-9-]*$"),
300
+ MaxLength: 101,
301
+ MinLength: 1
302
+ },
303
+ serializedName: "privateLinkResourceName",
304
+ required: true,
305
+ type: {
306
+ name: "String"
307
+ }
308
+ }
309
+ };
310
+
311
+ export const privateEndpointConnectionName: OperationURLParameter = {
312
+ parameterPath: "privateEndpointConnectionName",
313
+ mapper: {
314
+ constraints: {
315
+ Pattern: new RegExp("^[a-zA-Z0-9_-]+\\.?[a-fA-F0-9-]*$"),
316
+ MaxLength: 101,
317
+ MinLength: 1
318
+ },
319
+ serializedName: "privateEndpointConnectionName",
320
+ required: true,
321
+ type: {
322
+ name: "String"
323
+ }
324
+ }
325
+ };
326
+
327
+ export const parameters9: OperationParameter = {
328
+ parameterPath: "parameters",
329
+ mapper: PrivateEndpointConnectionMapper
330
+ };
331
+
332
+ export const parameters10: OperationParameter = {
333
+ parameterPath: "parameters",
334
+ mapper: PoolMapper
335
+ };
336
+
337
+ export const poolName: OperationURLParameter = {
338
+ parameterPath: "poolName",
339
+ mapper: {
340
+ constraints: {
341
+ Pattern: new RegExp("^[a-zA-Z0-9_-]+$"),
342
+ MaxLength: 64,
343
+ MinLength: 1
344
+ },
345
+ serializedName: "poolName",
346
+ required: true,
347
+ type: {
348
+ name: "String"
349
+ }
350
+ }
351
+ };
@@ -0,0 +1,357 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { ApplicationOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import {
16
+ Application,
17
+ ApplicationListNextOptionalParams,
18
+ ApplicationListOptionalParams,
19
+ ApplicationCreateOptionalParams,
20
+ ApplicationCreateResponse,
21
+ ApplicationDeleteOptionalParams,
22
+ ApplicationGetOptionalParams,
23
+ ApplicationGetResponse,
24
+ ApplicationUpdateOptionalParams,
25
+ ApplicationUpdateResponse,
26
+ ApplicationListResponse,
27
+ ApplicationListNextResponse
28
+ } from "../models";
29
+
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing ApplicationOperations operations. */
32
+ export class ApplicationOperationsImpl implements ApplicationOperations {
33
+ private readonly client: BatchManagementClientContext;
34
+
35
+ /**
36
+ * Initialize a new instance of the class ApplicationOperations class.
37
+ * @param client Reference to the service client
38
+ */
39
+ constructor(client: BatchManagementClientContext) {
40
+ this.client = client;
41
+ }
42
+
43
+ /**
44
+ * Lists all of the applications in the specified account.
45
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
46
+ * @param accountName The name of the Batch account.
47
+ * @param options The options parameters.
48
+ */
49
+ public list(
50
+ resourceGroupName: string,
51
+ accountName: string,
52
+ options?: ApplicationListOptionalParams
53
+ ): PagedAsyncIterableIterator<Application> {
54
+ const iter = this.listPagingAll(resourceGroupName, accountName, options);
55
+ return {
56
+ next() {
57
+ return iter.next();
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ },
62
+ byPage: () => {
63
+ return this.listPagingPage(resourceGroupName, accountName, options);
64
+ }
65
+ };
66
+ }
67
+
68
+ private async *listPagingPage(
69
+ resourceGroupName: string,
70
+ accountName: string,
71
+ options?: ApplicationListOptionalParams
72
+ ): AsyncIterableIterator<Application[]> {
73
+ let result = await this._list(resourceGroupName, accountName, options);
74
+ yield result.value || [];
75
+ let continuationToken = result.nextLink;
76
+ while (continuationToken) {
77
+ result = await this._listNext(
78
+ resourceGroupName,
79
+ accountName,
80
+ continuationToken,
81
+ options
82
+ );
83
+ continuationToken = result.nextLink;
84
+ yield result.value || [];
85
+ }
86
+ }
87
+
88
+ private async *listPagingAll(
89
+ resourceGroupName: string,
90
+ accountName: string,
91
+ options?: ApplicationListOptionalParams
92
+ ): AsyncIterableIterator<Application> {
93
+ for await (const page of this.listPagingPage(
94
+ resourceGroupName,
95
+ accountName,
96
+ options
97
+ )) {
98
+ yield* page;
99
+ }
100
+ }
101
+
102
+ /**
103
+ * Adds an application to the specified Batch account.
104
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
105
+ * @param accountName The name of the Batch account.
106
+ * @param applicationName The name of the application. This must be unique within the account.
107
+ * @param options The options parameters.
108
+ */
109
+ create(
110
+ resourceGroupName: string,
111
+ accountName: string,
112
+ applicationName: string,
113
+ options?: ApplicationCreateOptionalParams
114
+ ): Promise<ApplicationCreateResponse> {
115
+ return this.client.sendOperationRequest(
116
+ { resourceGroupName, accountName, applicationName, options },
117
+ createOperationSpec
118
+ );
119
+ }
120
+
121
+ /**
122
+ * Deletes an application.
123
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
124
+ * @param accountName The name of the Batch account.
125
+ * @param applicationName The name of the application. This must be unique within the account.
126
+ * @param options The options parameters.
127
+ */
128
+ delete(
129
+ resourceGroupName: string,
130
+ accountName: string,
131
+ applicationName: string,
132
+ options?: ApplicationDeleteOptionalParams
133
+ ): Promise<void> {
134
+ return this.client.sendOperationRequest(
135
+ { resourceGroupName, accountName, applicationName, options },
136
+ deleteOperationSpec
137
+ );
138
+ }
139
+
140
+ /**
141
+ * Gets information about the specified application.
142
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
143
+ * @param accountName The name of the Batch account.
144
+ * @param applicationName The name of the application. This must be unique within the account.
145
+ * @param options The options parameters.
146
+ */
147
+ get(
148
+ resourceGroupName: string,
149
+ accountName: string,
150
+ applicationName: string,
151
+ options?: ApplicationGetOptionalParams
152
+ ): Promise<ApplicationGetResponse> {
153
+ return this.client.sendOperationRequest(
154
+ { resourceGroupName, accountName, applicationName, options },
155
+ getOperationSpec
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Updates settings for the specified application.
161
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
162
+ * @param accountName The name of the Batch account.
163
+ * @param applicationName The name of the application. This must be unique within the account.
164
+ * @param parameters The parameters for the request.
165
+ * @param options The options parameters.
166
+ */
167
+ update(
168
+ resourceGroupName: string,
169
+ accountName: string,
170
+ applicationName: string,
171
+ parameters: Application,
172
+ options?: ApplicationUpdateOptionalParams
173
+ ): Promise<ApplicationUpdateResponse> {
174
+ return this.client.sendOperationRequest(
175
+ { resourceGroupName, accountName, applicationName, parameters, options },
176
+ updateOperationSpec
177
+ );
178
+ }
179
+
180
+ /**
181
+ * Lists all of the applications in the specified account.
182
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
183
+ * @param accountName The name of the Batch account.
184
+ * @param options The options parameters.
185
+ */
186
+ private _list(
187
+ resourceGroupName: string,
188
+ accountName: string,
189
+ options?: ApplicationListOptionalParams
190
+ ): Promise<ApplicationListResponse> {
191
+ return this.client.sendOperationRequest(
192
+ { resourceGroupName, accountName, options },
193
+ listOperationSpec
194
+ );
195
+ }
196
+
197
+ /**
198
+ * ListNext
199
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
200
+ * @param accountName The name of the Batch account.
201
+ * @param nextLink The nextLink from the previous successful call to the List method.
202
+ * @param options The options parameters.
203
+ */
204
+ private _listNext(
205
+ resourceGroupName: string,
206
+ accountName: string,
207
+ nextLink: string,
208
+ options?: ApplicationListNextOptionalParams
209
+ ): Promise<ApplicationListNextResponse> {
210
+ return this.client.sendOperationRequest(
211
+ { resourceGroupName, accountName, nextLink, options },
212
+ listNextOperationSpec
213
+ );
214
+ }
215
+ }
216
+ // Operation Specifications
217
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
218
+
219
+ const createOperationSpec: coreClient.OperationSpec = {
220
+ path:
221
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}",
222
+ httpMethod: "PUT",
223
+ responses: {
224
+ 200: {
225
+ bodyMapper: Mappers.Application
226
+ },
227
+ default: {
228
+ bodyMapper: Mappers.CloudError
229
+ }
230
+ },
231
+ requestBody: Parameters.parameters5,
232
+ queryParameters: [Parameters.apiVersion],
233
+ urlParameters: [
234
+ Parameters.$host,
235
+ Parameters.resourceGroupName,
236
+ Parameters.subscriptionId,
237
+ Parameters.accountName1,
238
+ Parameters.applicationName
239
+ ],
240
+ headerParameters: [Parameters.contentType, Parameters.accept],
241
+ mediaType: "json",
242
+ serializer
243
+ };
244
+ const deleteOperationSpec: coreClient.OperationSpec = {
245
+ path:
246
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}",
247
+ httpMethod: "DELETE",
248
+ responses: {
249
+ 200: {},
250
+ 204: {},
251
+ default: {
252
+ bodyMapper: Mappers.CloudError
253
+ }
254
+ },
255
+ queryParameters: [Parameters.apiVersion],
256
+ urlParameters: [
257
+ Parameters.$host,
258
+ Parameters.resourceGroupName,
259
+ Parameters.subscriptionId,
260
+ Parameters.accountName1,
261
+ Parameters.applicationName
262
+ ],
263
+ headerParameters: [Parameters.accept],
264
+ serializer
265
+ };
266
+ const getOperationSpec: coreClient.OperationSpec = {
267
+ path:
268
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}",
269
+ httpMethod: "GET",
270
+ responses: {
271
+ 200: {
272
+ bodyMapper: Mappers.Application
273
+ },
274
+ default: {
275
+ bodyMapper: Mappers.CloudError
276
+ }
277
+ },
278
+ queryParameters: [Parameters.apiVersion],
279
+ urlParameters: [
280
+ Parameters.$host,
281
+ Parameters.resourceGroupName,
282
+ Parameters.subscriptionId,
283
+ Parameters.accountName1,
284
+ Parameters.applicationName
285
+ ],
286
+ headerParameters: [Parameters.accept],
287
+ serializer
288
+ };
289
+ const updateOperationSpec: coreClient.OperationSpec = {
290
+ path:
291
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}",
292
+ httpMethod: "PATCH",
293
+ responses: {
294
+ 200: {
295
+ bodyMapper: Mappers.Application
296
+ },
297
+ default: {
298
+ bodyMapper: Mappers.CloudError
299
+ }
300
+ },
301
+ requestBody: Parameters.parameters6,
302
+ queryParameters: [Parameters.apiVersion],
303
+ urlParameters: [
304
+ Parameters.$host,
305
+ Parameters.resourceGroupName,
306
+ Parameters.subscriptionId,
307
+ Parameters.accountName1,
308
+ Parameters.applicationName
309
+ ],
310
+ headerParameters: [Parameters.contentType, Parameters.accept],
311
+ mediaType: "json",
312
+ serializer
313
+ };
314
+ const listOperationSpec: coreClient.OperationSpec = {
315
+ path:
316
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications",
317
+ httpMethod: "GET",
318
+ responses: {
319
+ 200: {
320
+ bodyMapper: Mappers.ListApplicationsResult
321
+ },
322
+ default: {
323
+ bodyMapper: Mappers.CloudError
324
+ }
325
+ },
326
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
327
+ urlParameters: [
328
+ Parameters.$host,
329
+ Parameters.resourceGroupName,
330
+ Parameters.subscriptionId,
331
+ Parameters.accountName1
332
+ ],
333
+ headerParameters: [Parameters.accept],
334
+ serializer
335
+ };
336
+ const listNextOperationSpec: coreClient.OperationSpec = {
337
+ path: "{nextLink}",
338
+ httpMethod: "GET",
339
+ responses: {
340
+ 200: {
341
+ bodyMapper: Mappers.ListApplicationsResult
342
+ },
343
+ default: {
344
+ bodyMapper: Mappers.CloudError
345
+ }
346
+ },
347
+ queryParameters: [Parameters.apiVersion, Parameters.maxresults],
348
+ urlParameters: [
349
+ Parameters.$host,
350
+ Parameters.resourceGroupName,
351
+ Parameters.subscriptionId,
352
+ Parameters.accountName1,
353
+ Parameters.nextLink
354
+ ],
355
+ headerParameters: [Parameters.accept],
356
+ serializer
357
+ };