@azure/arm-rediscache 30.0.0-alpha.20210928.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 (133) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +21 -0
  4. package/README.md +94 -0
  5. package/dist/index.js +4051 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/src/index.d.ts +6 -0
  10. package/dist-esm/src/index.d.ts.map +1 -0
  11. package/dist-esm/src/index.js +13 -0
  12. package/dist-esm/src/index.js.map +1 -0
  13. package/dist-esm/src/lroImpl.d.ts +16 -0
  14. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  15. package/dist-esm/src/lroImpl.js +29 -0
  16. package/dist-esm/src/lroImpl.js.map +1 -0
  17. package/dist-esm/src/models/index.d.ts +1016 -0
  18. package/dist-esm/src/models/index.d.ts.map +1 -0
  19. package/dist-esm/src/models/index.js +77 -0
  20. package/dist-esm/src/models/index.js.map +1 -0
  21. package/dist-esm/src/models/mappers.d.ts +49 -0
  22. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  23. package/dist-esm/src/models/mappers.js +1580 -0
  24. package/dist-esm/src/models/mappers.js.map +1 -0
  25. package/dist-esm/src/models/parameters.d.ts +27 -0
  26. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  27. package/dist-esm/src/models/parameters.js +198 -0
  28. package/dist-esm/src/models/parameters.js.map +1 -0
  29. package/dist-esm/src/operations/firewallRules.d.ts +63 -0
  30. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -0
  31. package/dist-esm/src/operations/firewallRules.js +238 -0
  32. package/dist-esm/src/operations/firewallRules.js.map +1 -0
  33. package/dist-esm/src/operations/index.d.ts +8 -0
  34. package/dist-esm/src/operations/index.d.ts.map +1 -0
  35. package/dist-esm/src/operations/index.js +15 -0
  36. package/dist-esm/src/operations/index.js.map +1 -0
  37. package/dist-esm/src/operations/linkedServer.d.ts +73 -0
  38. package/dist-esm/src/operations/linkedServer.d.ts.map +1 -0
  39. package/dist-esm/src/operations/linkedServer.js +288 -0
  40. package/dist-esm/src/operations/linkedServer.js.map +1 -0
  41. package/dist-esm/src/operations/operations.d.ts +32 -0
  42. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  43. package/dist-esm/src/operations/operations.js +120 -0
  44. package/dist-esm/src/operations/operations.js.map +1 -0
  45. package/dist-esm/src/operations/patchSchedules.d.ts +63 -0
  46. package/dist-esm/src/operations/patchSchedules.d.ts.map +1 -0
  47. package/dist-esm/src/operations/patchSchedules.js +238 -0
  48. package/dist-esm/src/operations/patchSchedules.js.map +1 -0
  49. package/dist-esm/src/operations/privateEndpointConnections.d.ts +69 -0
  50. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  51. package/dist-esm/src/operations/privateEndpointConnections.js +260 -0
  52. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  53. package/dist-esm/src/operations/privateLinkResources.d.ts +30 -0
  54. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  55. package/dist-esm/src/operations/privateLinkResources.js +99 -0
  56. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  57. package/dist-esm/src/operations/redis.d.ts +192 -0
  58. package/dist-esm/src/operations/redis.d.ts.map +1 -0
  59. package/dist-esm/src/operations/redis.js +840 -0
  60. package/dist-esm/src/operations/redis.js.map +1 -0
  61. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts +38 -0
  62. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts.map +1 -0
  63. package/dist-esm/src/operationsInterfaces/firewallRules.js +9 -0
  64. package/dist-esm/src/operationsInterfaces/firewallRules.js.map +1 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  66. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  67. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  68. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  69. package/dist-esm/src/operationsInterfaces/linkedServer.d.ts +48 -0
  70. package/dist-esm/src/operationsInterfaces/linkedServer.d.ts.map +1 -0
  71. package/dist-esm/src/operationsInterfaces/linkedServer.js +9 -0
  72. package/dist-esm/src/operationsInterfaces/linkedServer.js.map +1 -0
  73. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  74. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  75. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  76. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  77. package/dist-esm/src/operationsInterfaces/patchSchedules.d.ts +38 -0
  78. package/dist-esm/src/operationsInterfaces/patchSchedules.d.ts.map +1 -0
  79. package/dist-esm/src/operationsInterfaces/patchSchedules.js +9 -0
  80. package/dist-esm/src/operationsInterfaces/patchSchedules.js.map +1 -0
  81. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +52 -0
  82. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  83. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  84. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  85. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +13 -0
  86. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  87. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  88. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  89. package/dist-esm/src/operationsInterfaces/redis.d.ts +136 -0
  90. package/dist-esm/src/operationsInterfaces/redis.d.ts.map +1 -0
  91. package/dist-esm/src/operationsInterfaces/redis.js +9 -0
  92. package/dist-esm/src/operationsInterfaces/redis.js.map +1 -0
  93. package/dist-esm/src/redisManagementClient.d.ts +22 -0
  94. package/dist-esm/src/redisManagementClient.d.ts.map +1 -0
  95. package/dist-esm/src/redisManagementClient.js +29 -0
  96. package/dist-esm/src/redisManagementClient.js.map +1 -0
  97. package/dist-esm/src/redisManagementClientContext.d.ts +17 -0
  98. package/dist-esm/src/redisManagementClientContext.d.ts.map +1 -0
  99. package/dist-esm/src/redisManagementClientContext.js +50 -0
  100. package/dist-esm/src/redisManagementClientContext.js.map +1 -0
  101. package/dist-esm/test/redis_examples.d.ts +2 -0
  102. package/dist-esm/test/redis_examples.d.ts.map +1 -0
  103. package/dist-esm/test/redis_examples.js +209 -0
  104. package/dist-esm/test/redis_examples.js.map +1 -0
  105. package/package.json +103 -0
  106. package/review/arm-rediscache.api.md +879 -0
  107. package/rollup.config.js +188 -0
  108. package/src/index.ts +13 -0
  109. package/src/lroImpl.ts +34 -0
  110. package/src/models/index.ts +1154 -0
  111. package/src/models/mappers.ts +1709 -0
  112. package/src/models/parameters.ts +240 -0
  113. package/src/operations/firewallRules.ts +314 -0
  114. package/src/operations/index.ts +15 -0
  115. package/src/operations/linkedServer.ts +397 -0
  116. package/src/operations/operations.ts +137 -0
  117. package/src/operations/patchSchedules.ts +327 -0
  118. package/src/operations/privateEndpointConnections.ts +353 -0
  119. package/src/operations/privateLinkResources.ts +135 -0
  120. package/src/operations/redis.ts +1152 -0
  121. package/src/operationsInterfaces/firewallRules.ts +75 -0
  122. package/src/operationsInterfaces/index.ts +15 -0
  123. package/src/operationsInterfaces/linkedServer.ts +97 -0
  124. package/src/operationsInterfaces/operations.ts +22 -0
  125. package/src/operationsInterfaces/patchSchedules.ts +76 -0
  126. package/src/operationsInterfaces/privateEndpointConnections.ts +100 -0
  127. package/src/operationsInterfaces/privateLinkResources.ts +29 -0
  128. package/src/operationsInterfaces/redis.ts +250 -0
  129. package/src/redisManagementClient.ts +61 -0
  130. package/src/redisManagementClientContext.ts +71 -0
  131. package/tsconfig.json +19 -0
  132. package/types/arm-rediscache.d.ts +1509 -0
  133. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,4051 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation.
11
+ * Licensed under the MIT License.
12
+ *
13
+ * Code generated by Microsoft (R) AutoRest Code Generator.
14
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
+ */
16
+ (function (KnownTlsVersion) {
17
+ KnownTlsVersion["One0"] = "1.0";
18
+ KnownTlsVersion["One1"] = "1.1";
19
+ KnownTlsVersion["One2"] = "1.2";
20
+ })(exports.KnownTlsVersion || (exports.KnownTlsVersion = {}));
21
+ (function (KnownPublicNetworkAccess) {
22
+ KnownPublicNetworkAccess["Enabled"] = "Enabled";
23
+ KnownPublicNetworkAccess["Disabled"] = "Disabled";
24
+ })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
25
+ (function (KnownSkuName) {
26
+ KnownSkuName["Basic"] = "Basic";
27
+ KnownSkuName["Standard"] = "Standard";
28
+ KnownSkuName["Premium"] = "Premium";
29
+ })(exports.KnownSkuName || (exports.KnownSkuName = {}));
30
+ (function (KnownSkuFamily) {
31
+ KnownSkuFamily["C"] = "C";
32
+ KnownSkuFamily["P"] = "P";
33
+ })(exports.KnownSkuFamily || (exports.KnownSkuFamily = {}));
34
+ (function (KnownProvisioningState) {
35
+ KnownProvisioningState["Creating"] = "Creating";
36
+ KnownProvisioningState["Deleting"] = "Deleting";
37
+ KnownProvisioningState["Disabled"] = "Disabled";
38
+ KnownProvisioningState["Failed"] = "Failed";
39
+ KnownProvisioningState["Linking"] = "Linking";
40
+ KnownProvisioningState["Provisioning"] = "Provisioning";
41
+ KnownProvisioningState["RecoveringScaleFailure"] = "RecoveringScaleFailure";
42
+ KnownProvisioningState["Scaling"] = "Scaling";
43
+ KnownProvisioningState["Succeeded"] = "Succeeded";
44
+ KnownProvisioningState["Unlinking"] = "Unlinking";
45
+ KnownProvisioningState["Unprovisioning"] = "Unprovisioning";
46
+ KnownProvisioningState["Updating"] = "Updating";
47
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
48
+ (function (KnownPrivateEndpointServiceConnectionStatus) {
49
+ KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
50
+ KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
51
+ KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
52
+ })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
53
+ (function (KnownPrivateEndpointConnectionProvisioningState) {
54
+ KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
55
+ KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
56
+ KnownPrivateEndpointConnectionProvisioningState["Deleting"] = "Deleting";
57
+ KnownPrivateEndpointConnectionProvisioningState["Failed"] = "Failed";
58
+ })(exports.KnownPrivateEndpointConnectionProvisioningState || (exports.KnownPrivateEndpointConnectionProvisioningState = {}));
59
+ (function (KnownRebootType) {
60
+ KnownRebootType["PrimaryNode"] = "PrimaryNode";
61
+ KnownRebootType["SecondaryNode"] = "SecondaryNode";
62
+ KnownRebootType["AllNodes"] = "AllNodes";
63
+ })(exports.KnownRebootType || (exports.KnownRebootType = {}));
64
+ (function (KnownDefaultName) {
65
+ KnownDefaultName["Default"] = "default";
66
+ })(exports.KnownDefaultName || (exports.KnownDefaultName = {}));
67
+
68
+ /*
69
+ * Copyright (c) Microsoft Corporation.
70
+ * Licensed under the MIT License.
71
+ *
72
+ * Code generated by Microsoft (R) AutoRest Code Generator.
73
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
74
+ */
75
+ const OperationListResult = {
76
+ type: {
77
+ name: "Composite",
78
+ className: "OperationListResult",
79
+ modelProperties: {
80
+ value: {
81
+ serializedName: "value",
82
+ type: {
83
+ name: "Sequence",
84
+ element: {
85
+ type: {
86
+ name: "Composite",
87
+ className: "Operation"
88
+ }
89
+ }
90
+ }
91
+ },
92
+ nextLink: {
93
+ serializedName: "nextLink",
94
+ readOnly: true,
95
+ type: {
96
+ name: "String"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ };
102
+ const Operation = {
103
+ type: {
104
+ name: "Composite",
105
+ className: "Operation",
106
+ modelProperties: {
107
+ name: {
108
+ serializedName: "name",
109
+ type: {
110
+ name: "String"
111
+ }
112
+ },
113
+ display: {
114
+ serializedName: "display",
115
+ type: {
116
+ name: "Composite",
117
+ className: "OperationDisplay"
118
+ }
119
+ }
120
+ }
121
+ }
122
+ };
123
+ const OperationDisplay = {
124
+ type: {
125
+ name: "Composite",
126
+ className: "OperationDisplay",
127
+ modelProperties: {
128
+ provider: {
129
+ serializedName: "provider",
130
+ type: {
131
+ name: "String"
132
+ }
133
+ },
134
+ operation: {
135
+ serializedName: "operation",
136
+ type: {
137
+ name: "String"
138
+ }
139
+ },
140
+ resource: {
141
+ serializedName: "resource",
142
+ type: {
143
+ name: "String"
144
+ }
145
+ },
146
+ description: {
147
+ serializedName: "description",
148
+ type: {
149
+ name: "String"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ };
155
+ const ErrorResponse = {
156
+ type: {
157
+ name: "Composite",
158
+ className: "ErrorResponse",
159
+ modelProperties: {
160
+ error: {
161
+ serializedName: "error",
162
+ type: {
163
+ name: "Composite",
164
+ className: "ErrorDetail"
165
+ }
166
+ }
167
+ }
168
+ }
169
+ };
170
+ const ErrorDetail = {
171
+ type: {
172
+ name: "Composite",
173
+ className: "ErrorDetail",
174
+ modelProperties: {
175
+ code: {
176
+ serializedName: "code",
177
+ readOnly: true,
178
+ type: {
179
+ name: "String"
180
+ }
181
+ },
182
+ message: {
183
+ serializedName: "message",
184
+ readOnly: true,
185
+ type: {
186
+ name: "String"
187
+ }
188
+ },
189
+ target: {
190
+ serializedName: "target",
191
+ readOnly: true,
192
+ type: {
193
+ name: "String"
194
+ }
195
+ },
196
+ details: {
197
+ serializedName: "details",
198
+ readOnly: true,
199
+ type: {
200
+ name: "Sequence",
201
+ element: {
202
+ type: {
203
+ name: "Composite",
204
+ className: "ErrorDetail"
205
+ }
206
+ }
207
+ }
208
+ },
209
+ additionalInfo: {
210
+ serializedName: "additionalInfo",
211
+ readOnly: true,
212
+ type: {
213
+ name: "Sequence",
214
+ element: {
215
+ type: {
216
+ name: "Composite",
217
+ className: "ErrorAdditionalInfo"
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+ };
225
+ const ErrorAdditionalInfo = {
226
+ type: {
227
+ name: "Composite",
228
+ className: "ErrorAdditionalInfo",
229
+ modelProperties: {
230
+ type: {
231
+ serializedName: "type",
232
+ readOnly: true,
233
+ type: {
234
+ name: "String"
235
+ }
236
+ },
237
+ info: {
238
+ serializedName: "info",
239
+ readOnly: true,
240
+ type: {
241
+ name: "Dictionary",
242
+ value: { type: { name: "any" } }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ };
248
+ const CheckNameAvailabilityParameters = {
249
+ type: {
250
+ name: "Composite",
251
+ className: "CheckNameAvailabilityParameters",
252
+ modelProperties: {
253
+ name: {
254
+ serializedName: "name",
255
+ required: true,
256
+ type: {
257
+ name: "String"
258
+ }
259
+ },
260
+ type: {
261
+ serializedName: "type",
262
+ required: true,
263
+ type: {
264
+ name: "String"
265
+ }
266
+ }
267
+ }
268
+ }
269
+ };
270
+ const NotificationListResponse = {
271
+ type: {
272
+ name: "Composite",
273
+ className: "NotificationListResponse",
274
+ modelProperties: {
275
+ value: {
276
+ serializedName: "value",
277
+ type: {
278
+ name: "Sequence",
279
+ element: {
280
+ type: {
281
+ name: "Composite",
282
+ className: "UpgradeNotification"
283
+ }
284
+ }
285
+ }
286
+ },
287
+ nextLink: {
288
+ serializedName: "nextLink",
289
+ readOnly: true,
290
+ type: {
291
+ name: "String"
292
+ }
293
+ }
294
+ }
295
+ }
296
+ };
297
+ const UpgradeNotification = {
298
+ type: {
299
+ name: "Composite",
300
+ className: "UpgradeNotification",
301
+ modelProperties: {
302
+ name: {
303
+ serializedName: "name",
304
+ readOnly: true,
305
+ type: {
306
+ name: "String"
307
+ }
308
+ },
309
+ timestamp: {
310
+ serializedName: "timestamp",
311
+ readOnly: true,
312
+ type: {
313
+ name: "DateTime"
314
+ }
315
+ },
316
+ upsellNotification: {
317
+ serializedName: "upsellNotification",
318
+ readOnly: true,
319
+ type: {
320
+ name: "Dictionary",
321
+ value: { type: { name: "String" } }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ };
327
+ const RedisCreateParameters = {
328
+ type: {
329
+ name: "Composite",
330
+ className: "RedisCreateParameters",
331
+ modelProperties: {
332
+ zones: {
333
+ serializedName: "zones",
334
+ type: {
335
+ name: "Sequence",
336
+ element: {
337
+ type: {
338
+ name: "String"
339
+ }
340
+ }
341
+ }
342
+ },
343
+ location: {
344
+ serializedName: "location",
345
+ required: true,
346
+ type: {
347
+ name: "String"
348
+ }
349
+ },
350
+ tags: {
351
+ serializedName: "tags",
352
+ type: {
353
+ name: "Dictionary",
354
+ value: { type: { name: "String" } }
355
+ }
356
+ },
357
+ redisConfiguration: {
358
+ serializedName: "properties.redisConfiguration",
359
+ type: {
360
+ name: "Composite",
361
+ className: "RedisCommonPropertiesRedisConfiguration"
362
+ }
363
+ },
364
+ redisVersion: {
365
+ serializedName: "properties.redisVersion",
366
+ type: {
367
+ name: "String"
368
+ }
369
+ },
370
+ enableNonSslPort: {
371
+ serializedName: "properties.enableNonSslPort",
372
+ type: {
373
+ name: "Boolean"
374
+ }
375
+ },
376
+ replicasPerMaster: {
377
+ serializedName: "properties.replicasPerMaster",
378
+ type: {
379
+ name: "Number"
380
+ }
381
+ },
382
+ replicasPerPrimary: {
383
+ serializedName: "properties.replicasPerPrimary",
384
+ type: {
385
+ name: "Number"
386
+ }
387
+ },
388
+ tenantSettings: {
389
+ serializedName: "properties.tenantSettings",
390
+ type: {
391
+ name: "Dictionary",
392
+ value: { type: { name: "String" } }
393
+ }
394
+ },
395
+ shardCount: {
396
+ serializedName: "properties.shardCount",
397
+ type: {
398
+ name: "Number"
399
+ }
400
+ },
401
+ minimumTlsVersion: {
402
+ serializedName: "properties.minimumTlsVersion",
403
+ type: {
404
+ name: "String"
405
+ }
406
+ },
407
+ publicNetworkAccess: {
408
+ serializedName: "properties.publicNetworkAccess",
409
+ type: {
410
+ name: "String"
411
+ }
412
+ },
413
+ sku: {
414
+ serializedName: "properties.sku",
415
+ type: {
416
+ name: "Composite",
417
+ className: "Sku"
418
+ }
419
+ },
420
+ subnetId: {
421
+ constraints: {
422
+ Pattern: new RegExp("^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$")
423
+ },
424
+ serializedName: "properties.subnetId",
425
+ type: {
426
+ name: "String"
427
+ }
428
+ },
429
+ staticIP: {
430
+ constraints: {
431
+ Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$")
432
+ },
433
+ serializedName: "properties.staticIP",
434
+ type: {
435
+ name: "String"
436
+ }
437
+ }
438
+ }
439
+ }
440
+ };
441
+ const RedisCommonProperties = {
442
+ type: {
443
+ name: "Composite",
444
+ className: "RedisCommonProperties",
445
+ modelProperties: {
446
+ redisConfiguration: {
447
+ serializedName: "redisConfiguration",
448
+ type: {
449
+ name: "Composite",
450
+ className: "RedisCommonPropertiesRedisConfiguration"
451
+ }
452
+ },
453
+ redisVersion: {
454
+ serializedName: "redisVersion",
455
+ type: {
456
+ name: "String"
457
+ }
458
+ },
459
+ enableNonSslPort: {
460
+ serializedName: "enableNonSslPort",
461
+ type: {
462
+ name: "Boolean"
463
+ }
464
+ },
465
+ replicasPerMaster: {
466
+ serializedName: "replicasPerMaster",
467
+ type: {
468
+ name: "Number"
469
+ }
470
+ },
471
+ replicasPerPrimary: {
472
+ serializedName: "replicasPerPrimary",
473
+ type: {
474
+ name: "Number"
475
+ }
476
+ },
477
+ tenantSettings: {
478
+ serializedName: "tenantSettings",
479
+ type: {
480
+ name: "Dictionary",
481
+ value: { type: { name: "String" } }
482
+ }
483
+ },
484
+ shardCount: {
485
+ serializedName: "shardCount",
486
+ type: {
487
+ name: "Number"
488
+ }
489
+ },
490
+ minimumTlsVersion: {
491
+ serializedName: "minimumTlsVersion",
492
+ type: {
493
+ name: "String"
494
+ }
495
+ },
496
+ publicNetworkAccess: {
497
+ serializedName: "publicNetworkAccess",
498
+ type: {
499
+ name: "String"
500
+ }
501
+ }
502
+ }
503
+ }
504
+ };
505
+ const RedisCommonPropertiesRedisConfiguration = {
506
+ type: {
507
+ name: "Composite",
508
+ className: "RedisCommonPropertiesRedisConfiguration",
509
+ additionalProperties: { type: { name: "Object" } },
510
+ modelProperties: {
511
+ rdbBackupEnabled: {
512
+ serializedName: "rdb-backup-enabled",
513
+ type: {
514
+ name: "String"
515
+ }
516
+ },
517
+ rdbBackupFrequency: {
518
+ serializedName: "rdb-backup-frequency",
519
+ type: {
520
+ name: "String"
521
+ }
522
+ },
523
+ rdbBackupMaxSnapshotCount: {
524
+ serializedName: "rdb-backup-max-snapshot-count",
525
+ type: {
526
+ name: "String"
527
+ }
528
+ },
529
+ rdbStorageConnectionString: {
530
+ serializedName: "rdb-storage-connection-string",
531
+ type: {
532
+ name: "String"
533
+ }
534
+ },
535
+ aofStorageConnectionString0: {
536
+ serializedName: "aof-storage-connection-string-0",
537
+ type: {
538
+ name: "String"
539
+ }
540
+ },
541
+ aofStorageConnectionString1: {
542
+ serializedName: "aof-storage-connection-string-1",
543
+ type: {
544
+ name: "String"
545
+ }
546
+ },
547
+ maxfragmentationmemoryReserved: {
548
+ serializedName: "maxfragmentationmemory-reserved",
549
+ type: {
550
+ name: "String"
551
+ }
552
+ },
553
+ maxmemoryPolicy: {
554
+ serializedName: "maxmemory-policy",
555
+ type: {
556
+ name: "String"
557
+ }
558
+ },
559
+ maxmemoryReserved: {
560
+ serializedName: "maxmemory-reserved",
561
+ type: {
562
+ name: "String"
563
+ }
564
+ },
565
+ maxmemoryDelta: {
566
+ serializedName: "maxmemory-delta",
567
+ type: {
568
+ name: "String"
569
+ }
570
+ },
571
+ maxclients: {
572
+ serializedName: "maxclients",
573
+ readOnly: true,
574
+ type: {
575
+ name: "String"
576
+ }
577
+ }
578
+ }
579
+ }
580
+ };
581
+ const Sku = {
582
+ type: {
583
+ name: "Composite",
584
+ className: "Sku",
585
+ modelProperties: {
586
+ name: {
587
+ serializedName: "name",
588
+ required: true,
589
+ type: {
590
+ name: "String"
591
+ }
592
+ },
593
+ family: {
594
+ serializedName: "family",
595
+ required: true,
596
+ type: {
597
+ name: "String"
598
+ }
599
+ },
600
+ capacity: {
601
+ serializedName: "capacity",
602
+ required: true,
603
+ type: {
604
+ name: "Number"
605
+ }
606
+ }
607
+ }
608
+ }
609
+ };
610
+ const Resource = {
611
+ type: {
612
+ name: "Composite",
613
+ className: "Resource",
614
+ modelProperties: {
615
+ id: {
616
+ serializedName: "id",
617
+ readOnly: true,
618
+ type: {
619
+ name: "String"
620
+ }
621
+ },
622
+ name: {
623
+ serializedName: "name",
624
+ readOnly: true,
625
+ type: {
626
+ name: "String"
627
+ }
628
+ },
629
+ type: {
630
+ serializedName: "type",
631
+ readOnly: true,
632
+ type: {
633
+ name: "String"
634
+ }
635
+ }
636
+ }
637
+ }
638
+ };
639
+ const RedisAccessKeys = {
640
+ type: {
641
+ name: "Composite",
642
+ className: "RedisAccessKeys",
643
+ modelProperties: {
644
+ primaryKey: {
645
+ serializedName: "primaryKey",
646
+ readOnly: true,
647
+ type: {
648
+ name: "String"
649
+ }
650
+ },
651
+ secondaryKey: {
652
+ serializedName: "secondaryKey",
653
+ readOnly: true,
654
+ type: {
655
+ name: "String"
656
+ }
657
+ }
658
+ }
659
+ }
660
+ };
661
+ const RedisLinkedServer = {
662
+ type: {
663
+ name: "Composite",
664
+ className: "RedisLinkedServer",
665
+ modelProperties: {
666
+ id: {
667
+ serializedName: "id",
668
+ readOnly: true,
669
+ type: {
670
+ name: "String"
671
+ }
672
+ }
673
+ }
674
+ }
675
+ };
676
+ const RedisInstanceDetails = {
677
+ type: {
678
+ name: "Composite",
679
+ className: "RedisInstanceDetails",
680
+ modelProperties: {
681
+ sslPort: {
682
+ serializedName: "sslPort",
683
+ readOnly: true,
684
+ type: {
685
+ name: "Number"
686
+ }
687
+ },
688
+ nonSslPort: {
689
+ serializedName: "nonSslPort",
690
+ readOnly: true,
691
+ type: {
692
+ name: "Number"
693
+ }
694
+ },
695
+ zone: {
696
+ serializedName: "zone",
697
+ readOnly: true,
698
+ type: {
699
+ name: "String"
700
+ }
701
+ },
702
+ shardId: {
703
+ serializedName: "shardId",
704
+ readOnly: true,
705
+ type: {
706
+ name: "Number"
707
+ }
708
+ },
709
+ isMaster: {
710
+ serializedName: "isMaster",
711
+ readOnly: true,
712
+ type: {
713
+ name: "Boolean"
714
+ }
715
+ },
716
+ isPrimary: {
717
+ serializedName: "isPrimary",
718
+ readOnly: true,
719
+ type: {
720
+ name: "Boolean"
721
+ }
722
+ }
723
+ }
724
+ }
725
+ };
726
+ const PrivateEndpoint = {
727
+ type: {
728
+ name: "Composite",
729
+ className: "PrivateEndpoint",
730
+ modelProperties: {
731
+ id: {
732
+ serializedName: "id",
733
+ readOnly: true,
734
+ type: {
735
+ name: "String"
736
+ }
737
+ }
738
+ }
739
+ }
740
+ };
741
+ const PrivateLinkServiceConnectionState = {
742
+ type: {
743
+ name: "Composite",
744
+ className: "PrivateLinkServiceConnectionState",
745
+ modelProperties: {
746
+ status: {
747
+ serializedName: "status",
748
+ type: {
749
+ name: "String"
750
+ }
751
+ },
752
+ description: {
753
+ serializedName: "description",
754
+ type: {
755
+ name: "String"
756
+ }
757
+ },
758
+ actionsRequired: {
759
+ serializedName: "actionsRequired",
760
+ type: {
761
+ name: "String"
762
+ }
763
+ }
764
+ }
765
+ }
766
+ };
767
+ const RedisUpdateParameters = {
768
+ type: {
769
+ name: "Composite",
770
+ className: "RedisUpdateParameters",
771
+ modelProperties: {
772
+ tags: {
773
+ serializedName: "tags",
774
+ type: {
775
+ name: "Dictionary",
776
+ value: { type: { name: "String" } }
777
+ }
778
+ },
779
+ redisConfiguration: {
780
+ serializedName: "properties.redisConfiguration",
781
+ type: {
782
+ name: "Composite",
783
+ className: "RedisCommonPropertiesRedisConfiguration"
784
+ }
785
+ },
786
+ redisVersion: {
787
+ serializedName: "properties.redisVersion",
788
+ type: {
789
+ name: "String"
790
+ }
791
+ },
792
+ enableNonSslPort: {
793
+ serializedName: "properties.enableNonSslPort",
794
+ type: {
795
+ name: "Boolean"
796
+ }
797
+ },
798
+ replicasPerMaster: {
799
+ serializedName: "properties.replicasPerMaster",
800
+ type: {
801
+ name: "Number"
802
+ }
803
+ },
804
+ replicasPerPrimary: {
805
+ serializedName: "properties.replicasPerPrimary",
806
+ type: {
807
+ name: "Number"
808
+ }
809
+ },
810
+ tenantSettings: {
811
+ serializedName: "properties.tenantSettings",
812
+ type: {
813
+ name: "Dictionary",
814
+ value: { type: { name: "String" } }
815
+ }
816
+ },
817
+ shardCount: {
818
+ serializedName: "properties.shardCount",
819
+ type: {
820
+ name: "Number"
821
+ }
822
+ },
823
+ minimumTlsVersion: {
824
+ serializedName: "properties.minimumTlsVersion",
825
+ type: {
826
+ name: "String"
827
+ }
828
+ },
829
+ publicNetworkAccess: {
830
+ serializedName: "properties.publicNetworkAccess",
831
+ type: {
832
+ name: "String"
833
+ }
834
+ },
835
+ sku: {
836
+ serializedName: "properties.sku",
837
+ type: {
838
+ name: "Composite",
839
+ className: "Sku"
840
+ }
841
+ }
842
+ }
843
+ }
844
+ };
845
+ const RedisListResult = {
846
+ type: {
847
+ name: "Composite",
848
+ className: "RedisListResult",
849
+ modelProperties: {
850
+ value: {
851
+ serializedName: "value",
852
+ type: {
853
+ name: "Sequence",
854
+ element: {
855
+ type: {
856
+ name: "Composite",
857
+ className: "RedisResource"
858
+ }
859
+ }
860
+ }
861
+ },
862
+ nextLink: {
863
+ serializedName: "nextLink",
864
+ readOnly: true,
865
+ type: {
866
+ name: "String"
867
+ }
868
+ }
869
+ }
870
+ }
871
+ };
872
+ const RedisRegenerateKeyParameters = {
873
+ type: {
874
+ name: "Composite",
875
+ className: "RedisRegenerateKeyParameters",
876
+ modelProperties: {
877
+ keyType: {
878
+ serializedName: "keyType",
879
+ required: true,
880
+ type: {
881
+ name: "Enum",
882
+ allowedValues: ["Primary", "Secondary"]
883
+ }
884
+ }
885
+ }
886
+ }
887
+ };
888
+ const RedisRebootParameters = {
889
+ type: {
890
+ name: "Composite",
891
+ className: "RedisRebootParameters",
892
+ modelProperties: {
893
+ rebootType: {
894
+ serializedName: "rebootType",
895
+ type: {
896
+ name: "String"
897
+ }
898
+ },
899
+ shardId: {
900
+ serializedName: "shardId",
901
+ type: {
902
+ name: "Number"
903
+ }
904
+ },
905
+ ports: {
906
+ serializedName: "ports",
907
+ type: {
908
+ name: "Sequence",
909
+ element: {
910
+ type: {
911
+ name: "Number"
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+ }
918
+ };
919
+ const RedisForceRebootResponse = {
920
+ type: {
921
+ name: "Composite",
922
+ className: "RedisForceRebootResponse",
923
+ modelProperties: {
924
+ message: {
925
+ serializedName: "message",
926
+ readOnly: true,
927
+ type: {
928
+ name: "String"
929
+ }
930
+ }
931
+ }
932
+ }
933
+ };
934
+ const ImportRDBParameters = {
935
+ type: {
936
+ name: "Composite",
937
+ className: "ImportRDBParameters",
938
+ modelProperties: {
939
+ format: {
940
+ serializedName: "format",
941
+ type: {
942
+ name: "String"
943
+ }
944
+ },
945
+ files: {
946
+ serializedName: "files",
947
+ required: true,
948
+ type: {
949
+ name: "Sequence",
950
+ element: {
951
+ type: {
952
+ name: "String"
953
+ }
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }
959
+ };
960
+ const ExportRDBParameters = {
961
+ type: {
962
+ name: "Composite",
963
+ className: "ExportRDBParameters",
964
+ modelProperties: {
965
+ format: {
966
+ serializedName: "format",
967
+ type: {
968
+ name: "String"
969
+ }
970
+ },
971
+ prefix: {
972
+ serializedName: "prefix",
973
+ required: true,
974
+ type: {
975
+ name: "String"
976
+ }
977
+ },
978
+ container: {
979
+ serializedName: "container",
980
+ required: true,
981
+ type: {
982
+ name: "String"
983
+ }
984
+ }
985
+ }
986
+ }
987
+ };
988
+ const RedisFirewallRuleListResult = {
989
+ type: {
990
+ name: "Composite",
991
+ className: "RedisFirewallRuleListResult",
992
+ modelProperties: {
993
+ value: {
994
+ serializedName: "value",
995
+ type: {
996
+ name: "Sequence",
997
+ element: {
998
+ type: {
999
+ name: "Composite",
1000
+ className: "RedisFirewallRule"
1001
+ }
1002
+ }
1003
+ }
1004
+ },
1005
+ nextLink: {
1006
+ serializedName: "nextLink",
1007
+ readOnly: true,
1008
+ type: {
1009
+ name: "String"
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+ };
1015
+ const RedisPatchScheduleListResult = {
1016
+ type: {
1017
+ name: "Composite",
1018
+ className: "RedisPatchScheduleListResult",
1019
+ modelProperties: {
1020
+ value: {
1021
+ serializedName: "value",
1022
+ type: {
1023
+ name: "Sequence",
1024
+ element: {
1025
+ type: {
1026
+ name: "Composite",
1027
+ className: "RedisPatchSchedule"
1028
+ }
1029
+ }
1030
+ }
1031
+ },
1032
+ nextLink: {
1033
+ serializedName: "nextLink",
1034
+ readOnly: true,
1035
+ type: {
1036
+ name: "String"
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ };
1042
+ const ScheduleEntry = {
1043
+ type: {
1044
+ name: "Composite",
1045
+ className: "ScheduleEntry",
1046
+ modelProperties: {
1047
+ dayOfWeek: {
1048
+ serializedName: "dayOfWeek",
1049
+ required: true,
1050
+ type: {
1051
+ name: "Enum",
1052
+ allowedValues: [
1053
+ "Monday",
1054
+ "Tuesday",
1055
+ "Wednesday",
1056
+ "Thursday",
1057
+ "Friday",
1058
+ "Saturday",
1059
+ "Sunday",
1060
+ "Everyday",
1061
+ "Weekend"
1062
+ ]
1063
+ }
1064
+ },
1065
+ startHourUtc: {
1066
+ serializedName: "startHourUtc",
1067
+ required: true,
1068
+ type: {
1069
+ name: "Number"
1070
+ }
1071
+ },
1072
+ maintenanceWindow: {
1073
+ serializedName: "maintenanceWindow",
1074
+ type: {
1075
+ name: "TimeSpan"
1076
+ }
1077
+ }
1078
+ }
1079
+ }
1080
+ };
1081
+ const RedisLinkedServerCreateParameters = {
1082
+ type: {
1083
+ name: "Composite",
1084
+ className: "RedisLinkedServerCreateParameters",
1085
+ modelProperties: {
1086
+ linkedRedisCacheId: {
1087
+ serializedName: "properties.linkedRedisCacheId",
1088
+ required: true,
1089
+ type: {
1090
+ name: "String"
1091
+ }
1092
+ },
1093
+ linkedRedisCacheLocation: {
1094
+ serializedName: "properties.linkedRedisCacheLocation",
1095
+ required: true,
1096
+ type: {
1097
+ name: "String"
1098
+ }
1099
+ },
1100
+ serverRole: {
1101
+ serializedName: "properties.serverRole",
1102
+ required: true,
1103
+ type: {
1104
+ name: "Enum",
1105
+ allowedValues: ["Primary", "Secondary"]
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ };
1111
+ const RedisLinkedServerCreateProperties = {
1112
+ type: {
1113
+ name: "Composite",
1114
+ className: "RedisLinkedServerCreateProperties",
1115
+ modelProperties: {
1116
+ linkedRedisCacheId: {
1117
+ serializedName: "linkedRedisCacheId",
1118
+ required: true,
1119
+ type: {
1120
+ name: "String"
1121
+ }
1122
+ },
1123
+ linkedRedisCacheLocation: {
1124
+ serializedName: "linkedRedisCacheLocation",
1125
+ required: true,
1126
+ type: {
1127
+ name: "String"
1128
+ }
1129
+ },
1130
+ serverRole: {
1131
+ serializedName: "serverRole",
1132
+ required: true,
1133
+ type: {
1134
+ name: "Enum",
1135
+ allowedValues: ["Primary", "Secondary"]
1136
+ }
1137
+ }
1138
+ }
1139
+ }
1140
+ };
1141
+ const RedisLinkedServerWithPropertiesList = {
1142
+ type: {
1143
+ name: "Composite",
1144
+ className: "RedisLinkedServerWithPropertiesList",
1145
+ modelProperties: {
1146
+ value: {
1147
+ serializedName: "value",
1148
+ type: {
1149
+ name: "Sequence",
1150
+ element: {
1151
+ type: {
1152
+ name: "Composite",
1153
+ className: "RedisLinkedServerWithProperties"
1154
+ }
1155
+ }
1156
+ }
1157
+ },
1158
+ nextLink: {
1159
+ serializedName: "nextLink",
1160
+ readOnly: true,
1161
+ type: {
1162
+ name: "String"
1163
+ }
1164
+ }
1165
+ }
1166
+ }
1167
+ };
1168
+ const PrivateEndpointConnectionListResult = {
1169
+ type: {
1170
+ name: "Composite",
1171
+ className: "PrivateEndpointConnectionListResult",
1172
+ modelProperties: {
1173
+ value: {
1174
+ serializedName: "value",
1175
+ type: {
1176
+ name: "Sequence",
1177
+ element: {
1178
+ type: {
1179
+ name: "Composite",
1180
+ className: "PrivateEndpointConnection"
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ }
1187
+ };
1188
+ const PrivateLinkResourceListResult = {
1189
+ type: {
1190
+ name: "Composite",
1191
+ className: "PrivateLinkResourceListResult",
1192
+ modelProperties: {
1193
+ value: {
1194
+ serializedName: "value",
1195
+ type: {
1196
+ name: "Sequence",
1197
+ element: {
1198
+ type: {
1199
+ name: "Composite",
1200
+ className: "PrivateLinkResource"
1201
+ }
1202
+ }
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+ };
1208
+ const RedisCreateProperties = {
1209
+ type: {
1210
+ name: "Composite",
1211
+ className: "RedisCreateProperties",
1212
+ modelProperties: Object.assign(Object.assign({}, RedisCommonProperties.type.modelProperties), { sku: {
1213
+ serializedName: "sku",
1214
+ type: {
1215
+ name: "Composite",
1216
+ className: "Sku"
1217
+ }
1218
+ }, subnetId: {
1219
+ constraints: {
1220
+ Pattern: new RegExp("^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$")
1221
+ },
1222
+ serializedName: "subnetId",
1223
+ type: {
1224
+ name: "String"
1225
+ }
1226
+ }, staticIP: {
1227
+ constraints: {
1228
+ Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$")
1229
+ },
1230
+ serializedName: "staticIP",
1231
+ type: {
1232
+ name: "String"
1233
+ }
1234
+ } })
1235
+ }
1236
+ };
1237
+ const RedisUpdateProperties = {
1238
+ type: {
1239
+ name: "Composite",
1240
+ className: "RedisUpdateProperties",
1241
+ modelProperties: Object.assign(Object.assign({}, RedisCommonProperties.type.modelProperties), { sku: {
1242
+ serializedName: "sku",
1243
+ type: {
1244
+ name: "Composite",
1245
+ className: "Sku"
1246
+ }
1247
+ } })
1248
+ }
1249
+ };
1250
+ const TrackedResource = {
1251
+ type: {
1252
+ name: "Composite",
1253
+ className: "TrackedResource",
1254
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1255
+ serializedName: "tags",
1256
+ type: {
1257
+ name: "Dictionary",
1258
+ value: { type: { name: "String" } }
1259
+ }
1260
+ }, location: {
1261
+ serializedName: "location",
1262
+ required: true,
1263
+ type: {
1264
+ name: "String"
1265
+ }
1266
+ } })
1267
+ }
1268
+ };
1269
+ const PrivateEndpointConnection = {
1270
+ type: {
1271
+ name: "Composite",
1272
+ className: "PrivateEndpointConnection",
1273
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { privateEndpoint: {
1274
+ serializedName: "properties.privateEndpoint",
1275
+ type: {
1276
+ name: "Composite",
1277
+ className: "PrivateEndpoint"
1278
+ }
1279
+ }, privateLinkServiceConnectionState: {
1280
+ serializedName: "properties.privateLinkServiceConnectionState",
1281
+ type: {
1282
+ name: "Composite",
1283
+ className: "PrivateLinkServiceConnectionState"
1284
+ }
1285
+ }, provisioningState: {
1286
+ serializedName: "properties.provisioningState",
1287
+ readOnly: true,
1288
+ type: {
1289
+ name: "String"
1290
+ }
1291
+ } })
1292
+ }
1293
+ };
1294
+ const ProxyResource = {
1295
+ type: {
1296
+ name: "Composite",
1297
+ className: "ProxyResource",
1298
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
1299
+ }
1300
+ };
1301
+ const PrivateLinkResource = {
1302
+ type: {
1303
+ name: "Composite",
1304
+ className: "PrivateLinkResource",
1305
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { groupId: {
1306
+ serializedName: "properties.groupId",
1307
+ readOnly: true,
1308
+ type: {
1309
+ name: "String"
1310
+ }
1311
+ }, requiredMembers: {
1312
+ serializedName: "properties.requiredMembers",
1313
+ readOnly: true,
1314
+ type: {
1315
+ name: "Sequence",
1316
+ element: {
1317
+ type: {
1318
+ name: "String"
1319
+ }
1320
+ }
1321
+ }
1322
+ }, requiredZoneNames: {
1323
+ serializedName: "properties.requiredZoneNames",
1324
+ type: {
1325
+ name: "Sequence",
1326
+ element: {
1327
+ type: {
1328
+ name: "String"
1329
+ }
1330
+ }
1331
+ }
1332
+ } })
1333
+ }
1334
+ };
1335
+ const RedisLinkedServerProperties = {
1336
+ type: {
1337
+ name: "Composite",
1338
+ className: "RedisLinkedServerProperties",
1339
+ modelProperties: Object.assign(Object.assign({}, RedisLinkedServerCreateProperties.type.modelProperties), { provisioningState: {
1340
+ serializedName: "provisioningState",
1341
+ readOnly: true,
1342
+ type: {
1343
+ name: "String"
1344
+ }
1345
+ } })
1346
+ }
1347
+ };
1348
+ const RedisProperties = {
1349
+ type: {
1350
+ name: "Composite",
1351
+ className: "RedisProperties",
1352
+ modelProperties: Object.assign(Object.assign({}, RedisCreateProperties.type.modelProperties), { provisioningState: {
1353
+ serializedName: "provisioningState",
1354
+ readOnly: true,
1355
+ type: {
1356
+ name: "String"
1357
+ }
1358
+ }, hostName: {
1359
+ serializedName: "hostName",
1360
+ readOnly: true,
1361
+ type: {
1362
+ name: "String"
1363
+ }
1364
+ }, port: {
1365
+ serializedName: "port",
1366
+ readOnly: true,
1367
+ type: {
1368
+ name: "Number"
1369
+ }
1370
+ }, sslPort: {
1371
+ serializedName: "sslPort",
1372
+ readOnly: true,
1373
+ type: {
1374
+ name: "Number"
1375
+ }
1376
+ }, accessKeys: {
1377
+ serializedName: "accessKeys",
1378
+ type: {
1379
+ name: "Composite",
1380
+ className: "RedisAccessKeys"
1381
+ }
1382
+ }, linkedServers: {
1383
+ serializedName: "linkedServers",
1384
+ readOnly: true,
1385
+ type: {
1386
+ name: "Sequence",
1387
+ element: {
1388
+ type: {
1389
+ name: "Composite",
1390
+ className: "RedisLinkedServer"
1391
+ }
1392
+ }
1393
+ }
1394
+ }, instances: {
1395
+ serializedName: "instances",
1396
+ readOnly: true,
1397
+ type: {
1398
+ name: "Sequence",
1399
+ element: {
1400
+ type: {
1401
+ name: "Composite",
1402
+ className: "RedisInstanceDetails"
1403
+ }
1404
+ }
1405
+ }
1406
+ }, privateEndpointConnections: {
1407
+ serializedName: "privateEndpointConnections",
1408
+ readOnly: true,
1409
+ type: {
1410
+ name: "Sequence",
1411
+ element: {
1412
+ type: {
1413
+ name: "Composite",
1414
+ className: "PrivateEndpointConnection"
1415
+ }
1416
+ }
1417
+ }
1418
+ } })
1419
+ }
1420
+ };
1421
+ const RedisResource = {
1422
+ type: {
1423
+ name: "Composite",
1424
+ className: "RedisResource",
1425
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { zones: {
1426
+ serializedName: "zones",
1427
+ type: {
1428
+ name: "Sequence",
1429
+ element: {
1430
+ type: {
1431
+ name: "String"
1432
+ }
1433
+ }
1434
+ }
1435
+ }, redisConfiguration: {
1436
+ serializedName: "properties.redisConfiguration",
1437
+ type: {
1438
+ name: "Composite",
1439
+ className: "RedisCommonPropertiesRedisConfiguration"
1440
+ }
1441
+ }, redisVersion: {
1442
+ serializedName: "properties.redisVersion",
1443
+ type: {
1444
+ name: "String"
1445
+ }
1446
+ }, enableNonSslPort: {
1447
+ serializedName: "properties.enableNonSslPort",
1448
+ type: {
1449
+ name: "Boolean"
1450
+ }
1451
+ }, replicasPerMaster: {
1452
+ serializedName: "properties.replicasPerMaster",
1453
+ type: {
1454
+ name: "Number"
1455
+ }
1456
+ }, replicasPerPrimary: {
1457
+ serializedName: "properties.replicasPerPrimary",
1458
+ type: {
1459
+ name: "Number"
1460
+ }
1461
+ }, tenantSettings: {
1462
+ serializedName: "properties.tenantSettings",
1463
+ type: {
1464
+ name: "Dictionary",
1465
+ value: { type: { name: "String" } }
1466
+ }
1467
+ }, shardCount: {
1468
+ serializedName: "properties.shardCount",
1469
+ type: {
1470
+ name: "Number"
1471
+ }
1472
+ }, minimumTlsVersion: {
1473
+ serializedName: "properties.minimumTlsVersion",
1474
+ type: {
1475
+ name: "String"
1476
+ }
1477
+ }, publicNetworkAccess: {
1478
+ serializedName: "properties.publicNetworkAccess",
1479
+ type: {
1480
+ name: "String"
1481
+ }
1482
+ }, sku: {
1483
+ serializedName: "properties.sku",
1484
+ type: {
1485
+ name: "Composite",
1486
+ className: "Sku"
1487
+ }
1488
+ }, subnetId: {
1489
+ constraints: {
1490
+ Pattern: new RegExp("^\\/subscriptions\\/[^/]*\\/resourceGroups\\/[^/]*\\/providers\\/Microsoft.(ClassicNetwork|Network)\\/virtualNetworks\\/[^/]*\\/subnets\\/[^/]*$")
1491
+ },
1492
+ serializedName: "properties.subnetId",
1493
+ type: {
1494
+ name: "String"
1495
+ }
1496
+ }, staticIP: {
1497
+ constraints: {
1498
+ Pattern: new RegExp("^\\d+\\.\\d+\\.\\d+\\.\\d+$")
1499
+ },
1500
+ serializedName: "properties.staticIP",
1501
+ type: {
1502
+ name: "String"
1503
+ }
1504
+ }, provisioningState: {
1505
+ serializedName: "properties.provisioningState",
1506
+ readOnly: true,
1507
+ type: {
1508
+ name: "String"
1509
+ }
1510
+ }, hostName: {
1511
+ serializedName: "properties.hostName",
1512
+ readOnly: true,
1513
+ type: {
1514
+ name: "String"
1515
+ }
1516
+ }, port: {
1517
+ serializedName: "properties.port",
1518
+ readOnly: true,
1519
+ type: {
1520
+ name: "Number"
1521
+ }
1522
+ }, sslPort: {
1523
+ serializedName: "properties.sslPort",
1524
+ readOnly: true,
1525
+ type: {
1526
+ name: "Number"
1527
+ }
1528
+ }, accessKeys: {
1529
+ serializedName: "properties.accessKeys",
1530
+ type: {
1531
+ name: "Composite",
1532
+ className: "RedisAccessKeys"
1533
+ }
1534
+ }, linkedServers: {
1535
+ serializedName: "properties.linkedServers",
1536
+ readOnly: true,
1537
+ type: {
1538
+ name: "Sequence",
1539
+ element: {
1540
+ type: {
1541
+ name: "Composite",
1542
+ className: "RedisLinkedServer"
1543
+ }
1544
+ }
1545
+ }
1546
+ }, instances: {
1547
+ serializedName: "properties.instances",
1548
+ readOnly: true,
1549
+ type: {
1550
+ name: "Sequence",
1551
+ element: {
1552
+ type: {
1553
+ name: "Composite",
1554
+ className: "RedisInstanceDetails"
1555
+ }
1556
+ }
1557
+ }
1558
+ }, privateEndpointConnections: {
1559
+ serializedName: "properties.privateEndpointConnections",
1560
+ readOnly: true,
1561
+ type: {
1562
+ name: "Sequence",
1563
+ element: {
1564
+ type: {
1565
+ name: "Composite",
1566
+ className: "PrivateEndpointConnection"
1567
+ }
1568
+ }
1569
+ }
1570
+ } })
1571
+ }
1572
+ };
1573
+ const RedisFirewallRule = {
1574
+ type: {
1575
+ name: "Composite",
1576
+ className: "RedisFirewallRule",
1577
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { startIP: {
1578
+ serializedName: "properties.startIP",
1579
+ required: true,
1580
+ type: {
1581
+ name: "String"
1582
+ }
1583
+ }, endIP: {
1584
+ serializedName: "properties.endIP",
1585
+ required: true,
1586
+ type: {
1587
+ name: "String"
1588
+ }
1589
+ } })
1590
+ }
1591
+ };
1592
+ const RedisPatchSchedule = {
1593
+ type: {
1594
+ name: "Composite",
1595
+ className: "RedisPatchSchedule",
1596
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { scheduleEntries: {
1597
+ serializedName: "properties.scheduleEntries",
1598
+ required: true,
1599
+ type: {
1600
+ name: "Sequence",
1601
+ element: {
1602
+ type: {
1603
+ name: "Composite",
1604
+ className: "ScheduleEntry"
1605
+ }
1606
+ }
1607
+ }
1608
+ } })
1609
+ }
1610
+ };
1611
+ const RedisLinkedServerWithProperties = {
1612
+ type: {
1613
+ name: "Composite",
1614
+ className: "RedisLinkedServerWithProperties",
1615
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { linkedRedisCacheId: {
1616
+ serializedName: "properties.linkedRedisCacheId",
1617
+ type: {
1618
+ name: "String"
1619
+ }
1620
+ }, linkedRedisCacheLocation: {
1621
+ serializedName: "properties.linkedRedisCacheLocation",
1622
+ type: {
1623
+ name: "String"
1624
+ }
1625
+ }, serverRole: {
1626
+ serializedName: "properties.serverRole",
1627
+ type: {
1628
+ name: "Enum",
1629
+ allowedValues: ["Primary", "Secondary"]
1630
+ }
1631
+ }, provisioningState: {
1632
+ serializedName: "properties.provisioningState",
1633
+ readOnly: true,
1634
+ type: {
1635
+ name: "String"
1636
+ }
1637
+ } })
1638
+ }
1639
+ };
1640
+ const RedisFirewallRuleCreateParameters = {
1641
+ type: {
1642
+ name: "Composite",
1643
+ className: "RedisFirewallRuleCreateParameters",
1644
+ modelProperties: Object.assign({}, RedisFirewallRule.type.modelProperties)
1645
+ }
1646
+ };
1647
+
1648
+ var Mappers = /*#__PURE__*/Object.freeze({
1649
+ __proto__: null,
1650
+ OperationListResult: OperationListResult,
1651
+ Operation: Operation,
1652
+ OperationDisplay: OperationDisplay,
1653
+ ErrorResponse: ErrorResponse,
1654
+ ErrorDetail: ErrorDetail,
1655
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1656
+ CheckNameAvailabilityParameters: CheckNameAvailabilityParameters,
1657
+ NotificationListResponse: NotificationListResponse,
1658
+ UpgradeNotification: UpgradeNotification,
1659
+ RedisCreateParameters: RedisCreateParameters,
1660
+ RedisCommonProperties: RedisCommonProperties,
1661
+ RedisCommonPropertiesRedisConfiguration: RedisCommonPropertiesRedisConfiguration,
1662
+ Sku: Sku,
1663
+ Resource: Resource,
1664
+ RedisAccessKeys: RedisAccessKeys,
1665
+ RedisLinkedServer: RedisLinkedServer,
1666
+ RedisInstanceDetails: RedisInstanceDetails,
1667
+ PrivateEndpoint: PrivateEndpoint,
1668
+ PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
1669
+ RedisUpdateParameters: RedisUpdateParameters,
1670
+ RedisListResult: RedisListResult,
1671
+ RedisRegenerateKeyParameters: RedisRegenerateKeyParameters,
1672
+ RedisRebootParameters: RedisRebootParameters,
1673
+ RedisForceRebootResponse: RedisForceRebootResponse,
1674
+ ImportRDBParameters: ImportRDBParameters,
1675
+ ExportRDBParameters: ExportRDBParameters,
1676
+ RedisFirewallRuleListResult: RedisFirewallRuleListResult,
1677
+ RedisPatchScheduleListResult: RedisPatchScheduleListResult,
1678
+ ScheduleEntry: ScheduleEntry,
1679
+ RedisLinkedServerCreateParameters: RedisLinkedServerCreateParameters,
1680
+ RedisLinkedServerCreateProperties: RedisLinkedServerCreateProperties,
1681
+ RedisLinkedServerWithPropertiesList: RedisLinkedServerWithPropertiesList,
1682
+ PrivateEndpointConnectionListResult: PrivateEndpointConnectionListResult,
1683
+ PrivateLinkResourceListResult: PrivateLinkResourceListResult,
1684
+ RedisCreateProperties: RedisCreateProperties,
1685
+ RedisUpdateProperties: RedisUpdateProperties,
1686
+ TrackedResource: TrackedResource,
1687
+ PrivateEndpointConnection: PrivateEndpointConnection,
1688
+ ProxyResource: ProxyResource,
1689
+ PrivateLinkResource: PrivateLinkResource,
1690
+ RedisLinkedServerProperties: RedisLinkedServerProperties,
1691
+ RedisProperties: RedisProperties,
1692
+ RedisResource: RedisResource,
1693
+ RedisFirewallRule: RedisFirewallRule,
1694
+ RedisPatchSchedule: RedisPatchSchedule,
1695
+ RedisLinkedServerWithProperties: RedisLinkedServerWithProperties,
1696
+ RedisFirewallRuleCreateParameters: RedisFirewallRuleCreateParameters
1697
+ });
1698
+
1699
+ /*
1700
+ * Copyright (c) Microsoft Corporation.
1701
+ * Licensed under the MIT License.
1702
+ *
1703
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1704
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1705
+ */
1706
+ const accept = {
1707
+ parameterPath: "accept",
1708
+ mapper: {
1709
+ defaultValue: "application/json",
1710
+ isConstant: true,
1711
+ serializedName: "Accept",
1712
+ type: {
1713
+ name: "String"
1714
+ }
1715
+ }
1716
+ };
1717
+ const $host = {
1718
+ parameterPath: "$host",
1719
+ mapper: {
1720
+ serializedName: "$host",
1721
+ required: true,
1722
+ type: {
1723
+ name: "String"
1724
+ }
1725
+ },
1726
+ skipEncoding: true
1727
+ };
1728
+ const apiVersion = {
1729
+ parameterPath: "apiVersion",
1730
+ mapper: {
1731
+ defaultValue: "2020-12-01",
1732
+ isConstant: true,
1733
+ serializedName: "api-version",
1734
+ type: {
1735
+ name: "String"
1736
+ }
1737
+ }
1738
+ };
1739
+ const nextLink = {
1740
+ parameterPath: "nextLink",
1741
+ mapper: {
1742
+ serializedName: "nextLink",
1743
+ required: true,
1744
+ type: {
1745
+ name: "String"
1746
+ }
1747
+ },
1748
+ skipEncoding: true
1749
+ };
1750
+ const contentType = {
1751
+ parameterPath: ["options", "contentType"],
1752
+ mapper: {
1753
+ defaultValue: "application/json",
1754
+ isConstant: true,
1755
+ serializedName: "Content-Type",
1756
+ type: {
1757
+ name: "String"
1758
+ }
1759
+ }
1760
+ };
1761
+ const parameters = {
1762
+ parameterPath: "parameters",
1763
+ mapper: CheckNameAvailabilityParameters
1764
+ };
1765
+ const subscriptionId = {
1766
+ parameterPath: "subscriptionId",
1767
+ mapper: {
1768
+ serializedName: "subscriptionId",
1769
+ required: true,
1770
+ type: {
1771
+ name: "String"
1772
+ }
1773
+ }
1774
+ };
1775
+ const resourceGroupName = {
1776
+ parameterPath: "resourceGroupName",
1777
+ mapper: {
1778
+ serializedName: "resourceGroupName",
1779
+ required: true,
1780
+ type: {
1781
+ name: "String"
1782
+ }
1783
+ }
1784
+ };
1785
+ const name = {
1786
+ parameterPath: "name",
1787
+ mapper: {
1788
+ serializedName: "name",
1789
+ required: true,
1790
+ type: {
1791
+ name: "String"
1792
+ }
1793
+ }
1794
+ };
1795
+ const history = {
1796
+ parameterPath: "history",
1797
+ mapper: {
1798
+ serializedName: "history",
1799
+ required: true,
1800
+ type: {
1801
+ name: "Number"
1802
+ }
1803
+ }
1804
+ };
1805
+ const parameters1 = {
1806
+ parameterPath: "parameters",
1807
+ mapper: RedisCreateParameters
1808
+ };
1809
+ const parameters2 = {
1810
+ parameterPath: "parameters",
1811
+ mapper: RedisUpdateParameters
1812
+ };
1813
+ const parameters3 = {
1814
+ parameterPath: "parameters",
1815
+ mapper: RedisRegenerateKeyParameters
1816
+ };
1817
+ const parameters4 = {
1818
+ parameterPath: "parameters",
1819
+ mapper: RedisRebootParameters
1820
+ };
1821
+ const parameters5 = {
1822
+ parameterPath: "parameters",
1823
+ mapper: ImportRDBParameters
1824
+ };
1825
+ const parameters6 = {
1826
+ parameterPath: "parameters",
1827
+ mapper: ExportRDBParameters
1828
+ };
1829
+ const cacheName = {
1830
+ parameterPath: "cacheName",
1831
+ mapper: {
1832
+ serializedName: "cacheName",
1833
+ required: true,
1834
+ type: {
1835
+ name: "String"
1836
+ }
1837
+ }
1838
+ };
1839
+ const parameters7 = {
1840
+ parameterPath: "parameters",
1841
+ mapper: RedisFirewallRule
1842
+ };
1843
+ const ruleName = {
1844
+ parameterPath: "ruleName",
1845
+ mapper: {
1846
+ serializedName: "ruleName",
1847
+ required: true,
1848
+ type: {
1849
+ name: "String"
1850
+ }
1851
+ }
1852
+ };
1853
+ const parameters8 = {
1854
+ parameterPath: "parameters",
1855
+ mapper: RedisPatchSchedule
1856
+ };
1857
+ const defaultParam = {
1858
+ parameterPath: "defaultParam",
1859
+ mapper: {
1860
+ serializedName: "default",
1861
+ required: true,
1862
+ type: {
1863
+ name: "String"
1864
+ }
1865
+ }
1866
+ };
1867
+ const parameters9 = {
1868
+ parameterPath: "parameters",
1869
+ mapper: RedisLinkedServerCreateParameters
1870
+ };
1871
+ const linkedServerName = {
1872
+ parameterPath: "linkedServerName",
1873
+ mapper: {
1874
+ serializedName: "linkedServerName",
1875
+ required: true,
1876
+ type: {
1877
+ name: "String"
1878
+ }
1879
+ }
1880
+ };
1881
+ const privateEndpointConnectionName = {
1882
+ parameterPath: "privateEndpointConnectionName",
1883
+ mapper: {
1884
+ serializedName: "privateEndpointConnectionName",
1885
+ required: true,
1886
+ type: {
1887
+ name: "String"
1888
+ }
1889
+ }
1890
+ };
1891
+ const properties = {
1892
+ parameterPath: "properties",
1893
+ mapper: PrivateEndpointConnection
1894
+ };
1895
+
1896
+ /*
1897
+ * Copyright (c) Microsoft Corporation.
1898
+ * Licensed under the MIT License.
1899
+ *
1900
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1901
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1902
+ */
1903
+ /// <reference lib="esnext.asynciterable" />
1904
+ /** Class containing Operations operations. */
1905
+ class OperationsImpl {
1906
+ /**
1907
+ * Initialize a new instance of the class Operations class.
1908
+ * @param client Reference to the service client
1909
+ */
1910
+ constructor(client) {
1911
+ this.client = client;
1912
+ }
1913
+ /**
1914
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
1915
+ * @param options The options parameters.
1916
+ */
1917
+ list(options) {
1918
+ const iter = this.listPagingAll(options);
1919
+ return {
1920
+ next() {
1921
+ return iter.next();
1922
+ },
1923
+ [Symbol.asyncIterator]() {
1924
+ return this;
1925
+ },
1926
+ byPage: () => {
1927
+ return this.listPagingPage(options);
1928
+ }
1929
+ };
1930
+ }
1931
+ listPagingPage(options) {
1932
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1933
+ let result = yield tslib.__await(this._list(options));
1934
+ yield yield tslib.__await(result.value || []);
1935
+ let continuationToken = result.nextLink;
1936
+ while (continuationToken) {
1937
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1938
+ continuationToken = result.nextLink;
1939
+ yield yield tslib.__await(result.value || []);
1940
+ }
1941
+ });
1942
+ }
1943
+ listPagingAll(options) {
1944
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1945
+ var e_1, _a;
1946
+ try {
1947
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1948
+ const page = _c.value;
1949
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1950
+ }
1951
+ }
1952
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1953
+ finally {
1954
+ try {
1955
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1956
+ }
1957
+ finally { if (e_1) throw e_1.error; }
1958
+ }
1959
+ });
1960
+ }
1961
+ /**
1962
+ * Lists all of the available REST API operations of the Microsoft.Cache provider.
1963
+ * @param options The options parameters.
1964
+ */
1965
+ _list(options) {
1966
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1967
+ }
1968
+ /**
1969
+ * ListNext
1970
+ * @param nextLink The nextLink from the previous successful call to the List method.
1971
+ * @param options The options parameters.
1972
+ */
1973
+ _listNext(nextLink, options) {
1974
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1975
+ }
1976
+ }
1977
+ // Operation Specifications
1978
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1979
+ const listOperationSpec = {
1980
+ path: "/providers/Microsoft.Cache/operations",
1981
+ httpMethod: "GET",
1982
+ responses: {
1983
+ 200: {
1984
+ bodyMapper: OperationListResult
1985
+ },
1986
+ default: {
1987
+ bodyMapper: ErrorResponse
1988
+ }
1989
+ },
1990
+ queryParameters: [apiVersion],
1991
+ urlParameters: [$host],
1992
+ headerParameters: [accept],
1993
+ serializer
1994
+ };
1995
+ const listNextOperationSpec = {
1996
+ path: "{nextLink}",
1997
+ httpMethod: "GET",
1998
+ responses: {
1999
+ 200: {
2000
+ bodyMapper: OperationListResult
2001
+ },
2002
+ default: {
2003
+ bodyMapper: ErrorResponse
2004
+ }
2005
+ },
2006
+ queryParameters: [apiVersion],
2007
+ urlParameters: [$host, nextLink],
2008
+ headerParameters: [accept],
2009
+ serializer
2010
+ };
2011
+
2012
+ /*
2013
+ * Copyright (c) Microsoft Corporation.
2014
+ * Licensed under the MIT License.
2015
+ *
2016
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2017
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2018
+ */
2019
+ class LroImpl {
2020
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
2021
+ this.sendOperationFn = sendOperationFn;
2022
+ this.args = args;
2023
+ this.spec = spec;
2024
+ this.requestPath = requestPath;
2025
+ this.requestMethod = requestMethod;
2026
+ }
2027
+ sendInitialRequest() {
2028
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2029
+ return this.sendOperationFn(this.args, this.spec);
2030
+ });
2031
+ }
2032
+ sendPollRequest(path) {
2033
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2034
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
2035
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
2036
+ });
2037
+ }
2038
+ }
2039
+
2040
+ /*
2041
+ * Copyright (c) Microsoft Corporation.
2042
+ * Licensed under the MIT License.
2043
+ *
2044
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2045
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2046
+ */
2047
+ /// <reference lib="esnext.asynciterable" />
2048
+ /** Class containing Redis operations. */
2049
+ class RedisImpl {
2050
+ /**
2051
+ * Initialize a new instance of the class Redis class.
2052
+ * @param client Reference to the service client
2053
+ */
2054
+ constructor(client) {
2055
+ this.client = client;
2056
+ }
2057
+ /**
2058
+ * Gets any upgrade notifications for a Redis cache.
2059
+ * @param resourceGroupName The name of the resource group.
2060
+ * @param name The name of the Redis cache.
2061
+ * @param history how many minutes in past to look for upgrade notifications
2062
+ * @param options The options parameters.
2063
+ */
2064
+ listUpgradeNotifications(resourceGroupName, name, history, options) {
2065
+ const iter = this.listUpgradeNotificationsPagingAll(resourceGroupName, name, history, options);
2066
+ return {
2067
+ next() {
2068
+ return iter.next();
2069
+ },
2070
+ [Symbol.asyncIterator]() {
2071
+ return this;
2072
+ },
2073
+ byPage: () => {
2074
+ return this.listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options);
2075
+ }
2076
+ };
2077
+ }
2078
+ listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options) {
2079
+ return tslib.__asyncGenerator(this, arguments, function* listUpgradeNotificationsPagingPage_1() {
2080
+ let result = yield tslib.__await(this._listUpgradeNotifications(resourceGroupName, name, history, options));
2081
+ yield yield tslib.__await(result.value || []);
2082
+ let continuationToken = result.nextLink;
2083
+ while (continuationToken) {
2084
+ result = yield tslib.__await(this._listUpgradeNotificationsNext(resourceGroupName, name, history, continuationToken, options));
2085
+ continuationToken = result.nextLink;
2086
+ yield yield tslib.__await(result.value || []);
2087
+ }
2088
+ });
2089
+ }
2090
+ listUpgradeNotificationsPagingAll(resourceGroupName, name, history, options) {
2091
+ return tslib.__asyncGenerator(this, arguments, function* listUpgradeNotificationsPagingAll_1() {
2092
+ var e_1, _a;
2093
+ try {
2094
+ for (var _b = tslib.__asyncValues(this.listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2095
+ const page = _c.value;
2096
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2097
+ }
2098
+ }
2099
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2100
+ finally {
2101
+ try {
2102
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2103
+ }
2104
+ finally { if (e_1) throw e_1.error; }
2105
+ }
2106
+ });
2107
+ }
2108
+ /**
2109
+ * Lists all Redis caches in a resource group.
2110
+ * @param resourceGroupName The name of the resource group.
2111
+ * @param options The options parameters.
2112
+ */
2113
+ listByResourceGroup(resourceGroupName, options) {
2114
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
2115
+ return {
2116
+ next() {
2117
+ return iter.next();
2118
+ },
2119
+ [Symbol.asyncIterator]() {
2120
+ return this;
2121
+ },
2122
+ byPage: () => {
2123
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
2124
+ }
2125
+ };
2126
+ }
2127
+ listByResourceGroupPagingPage(resourceGroupName, options) {
2128
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2129
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2130
+ yield yield tslib.__await(result.value || []);
2131
+ let continuationToken = result.nextLink;
2132
+ while (continuationToken) {
2133
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2134
+ continuationToken = result.nextLink;
2135
+ yield yield tslib.__await(result.value || []);
2136
+ }
2137
+ });
2138
+ }
2139
+ listByResourceGroupPagingAll(resourceGroupName, options) {
2140
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
2141
+ var e_2, _a;
2142
+ try {
2143
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2144
+ const page = _c.value;
2145
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2146
+ }
2147
+ }
2148
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2149
+ finally {
2150
+ try {
2151
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2152
+ }
2153
+ finally { if (e_2) throw e_2.error; }
2154
+ }
2155
+ });
2156
+ }
2157
+ /**
2158
+ * Gets all Redis caches in the specified subscription.
2159
+ * @param options The options parameters.
2160
+ */
2161
+ listBySubscription(options) {
2162
+ const iter = this.listBySubscriptionPagingAll(options);
2163
+ return {
2164
+ next() {
2165
+ return iter.next();
2166
+ },
2167
+ [Symbol.asyncIterator]() {
2168
+ return this;
2169
+ },
2170
+ byPage: () => {
2171
+ return this.listBySubscriptionPagingPage(options);
2172
+ }
2173
+ };
2174
+ }
2175
+ listBySubscriptionPagingPage(options) {
2176
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
2177
+ let result = yield tslib.__await(this._listBySubscription(options));
2178
+ yield yield tslib.__await(result.value || []);
2179
+ let continuationToken = result.nextLink;
2180
+ while (continuationToken) {
2181
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
2182
+ continuationToken = result.nextLink;
2183
+ yield yield tslib.__await(result.value || []);
2184
+ }
2185
+ });
2186
+ }
2187
+ listBySubscriptionPagingAll(options) {
2188
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
2189
+ var e_3, _a;
2190
+ try {
2191
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2192
+ const page = _c.value;
2193
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2194
+ }
2195
+ }
2196
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2197
+ finally {
2198
+ try {
2199
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2200
+ }
2201
+ finally { if (e_3) throw e_3.error; }
2202
+ }
2203
+ });
2204
+ }
2205
+ /**
2206
+ * Checks that the redis cache name is valid and is not already in use.
2207
+ * @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only
2208
+ * supported resource type is 'Microsoft.Cache/redis'
2209
+ * @param options The options parameters.
2210
+ */
2211
+ checkNameAvailability(parameters, options) {
2212
+ return this.client.sendOperationRequest({ parameters, options }, checkNameAvailabilityOperationSpec);
2213
+ }
2214
+ /**
2215
+ * Gets any upgrade notifications for a Redis cache.
2216
+ * @param resourceGroupName The name of the resource group.
2217
+ * @param name The name of the Redis cache.
2218
+ * @param history how many minutes in past to look for upgrade notifications
2219
+ * @param options The options parameters.
2220
+ */
2221
+ _listUpgradeNotifications(resourceGroupName, name, history, options) {
2222
+ return this.client.sendOperationRequest({ resourceGroupName, name, history, options }, listUpgradeNotificationsOperationSpec);
2223
+ }
2224
+ /**
2225
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
2226
+ * @param resourceGroupName The name of the resource group.
2227
+ * @param name The name of the Redis cache.
2228
+ * @param parameters Parameters supplied to the Create Redis operation.
2229
+ * @param options The options parameters.
2230
+ */
2231
+ beginCreate(resourceGroupName, name, parameters, options) {
2232
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2233
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2234
+ return this.client.sendOperationRequest(args, spec);
2235
+ });
2236
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2237
+ var _a;
2238
+ let currentRawResponse = undefined;
2239
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2240
+ const callback = (rawResponse, flatResponse) => {
2241
+ currentRawResponse = rawResponse;
2242
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2243
+ };
2244
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2245
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2246
+ return {
2247
+ flatResponse,
2248
+ rawResponse: {
2249
+ statusCode: currentRawResponse.status,
2250
+ body: currentRawResponse.parsedBody,
2251
+ headers: currentRawResponse.headers.toJSON()
2252
+ }
2253
+ };
2254
+ });
2255
+ const lro = new LroImpl(sendOperation, { resourceGroupName, name, parameters, options }, createOperationSpec);
2256
+ return new coreLro.LroEngine(lro, {
2257
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2258
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2259
+ });
2260
+ });
2261
+ }
2262
+ /**
2263
+ * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
2264
+ * @param resourceGroupName The name of the resource group.
2265
+ * @param name The name of the Redis cache.
2266
+ * @param parameters Parameters supplied to the Create Redis operation.
2267
+ * @param options The options parameters.
2268
+ */
2269
+ beginCreateAndWait(resourceGroupName, name, parameters, options) {
2270
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2271
+ const poller = yield this.beginCreate(resourceGroupName, name, parameters, options);
2272
+ return poller.pollUntilDone();
2273
+ });
2274
+ }
2275
+ /**
2276
+ * Update an existing Redis cache.
2277
+ * @param resourceGroupName The name of the resource group.
2278
+ * @param name The name of the Redis cache.
2279
+ * @param parameters Parameters supplied to the Update Redis operation.
2280
+ * @param options The options parameters.
2281
+ */
2282
+ update(resourceGroupName, name, parameters, options) {
2283
+ return this.client.sendOperationRequest({ resourceGroupName, name, parameters, options }, updateOperationSpec);
2284
+ }
2285
+ /**
2286
+ * Deletes a Redis cache.
2287
+ * @param resourceGroupName The name of the resource group.
2288
+ * @param name The name of the Redis cache.
2289
+ * @param options The options parameters.
2290
+ */
2291
+ beginDelete(resourceGroupName, name, options) {
2292
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2293
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2294
+ return this.client.sendOperationRequest(args, spec);
2295
+ });
2296
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2297
+ var _a;
2298
+ let currentRawResponse = undefined;
2299
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2300
+ const callback = (rawResponse, flatResponse) => {
2301
+ currentRawResponse = rawResponse;
2302
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2303
+ };
2304
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2305
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2306
+ return {
2307
+ flatResponse,
2308
+ rawResponse: {
2309
+ statusCode: currentRawResponse.status,
2310
+ body: currentRawResponse.parsedBody,
2311
+ headers: currentRawResponse.headers.toJSON()
2312
+ }
2313
+ };
2314
+ });
2315
+ const lro = new LroImpl(sendOperation, { resourceGroupName, name, options }, deleteOperationSpec);
2316
+ return new coreLro.LroEngine(lro, {
2317
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2318
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2319
+ });
2320
+ });
2321
+ }
2322
+ /**
2323
+ * Deletes a Redis cache.
2324
+ * @param resourceGroupName The name of the resource group.
2325
+ * @param name The name of the Redis cache.
2326
+ * @param options The options parameters.
2327
+ */
2328
+ beginDeleteAndWait(resourceGroupName, name, options) {
2329
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2330
+ const poller = yield this.beginDelete(resourceGroupName, name, options);
2331
+ return poller.pollUntilDone();
2332
+ });
2333
+ }
2334
+ /**
2335
+ * Gets a Redis cache (resource description).
2336
+ * @param resourceGroupName The name of the resource group.
2337
+ * @param name The name of the Redis cache.
2338
+ * @param options The options parameters.
2339
+ */
2340
+ get(resourceGroupName, name, options) {
2341
+ return this.client.sendOperationRequest({ resourceGroupName, name, options }, getOperationSpec);
2342
+ }
2343
+ /**
2344
+ * Lists all Redis caches in a resource group.
2345
+ * @param resourceGroupName The name of the resource group.
2346
+ * @param options The options parameters.
2347
+ */
2348
+ _listByResourceGroup(resourceGroupName, options) {
2349
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2350
+ }
2351
+ /**
2352
+ * Gets all Redis caches in the specified subscription.
2353
+ * @param options The options parameters.
2354
+ */
2355
+ _listBySubscription(options) {
2356
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
2357
+ }
2358
+ /**
2359
+ * Retrieve a Redis cache's access keys. This operation requires write permission to the cache
2360
+ * resource.
2361
+ * @param resourceGroupName The name of the resource group.
2362
+ * @param name The name of the Redis cache.
2363
+ * @param options The options parameters.
2364
+ */
2365
+ listKeys(resourceGroupName, name, options) {
2366
+ return this.client.sendOperationRequest({ resourceGroupName, name, options }, listKeysOperationSpec);
2367
+ }
2368
+ /**
2369
+ * Regenerate Redis cache's access keys. This operation requires write permission to the cache
2370
+ * resource.
2371
+ * @param resourceGroupName The name of the resource group.
2372
+ * @param name The name of the Redis cache.
2373
+ * @param parameters Specifies which key to regenerate.
2374
+ * @param options The options parameters.
2375
+ */
2376
+ regenerateKey(resourceGroupName, name, parameters, options) {
2377
+ return this.client.sendOperationRequest({ resourceGroupName, name, parameters, options }, regenerateKeyOperationSpec);
2378
+ }
2379
+ /**
2380
+ * Reboot specified Redis node(s). This operation requires write permission to the cache resource.
2381
+ * There can be potential data loss.
2382
+ * @param resourceGroupName The name of the resource group.
2383
+ * @param name The name of the Redis cache.
2384
+ * @param parameters Specifies which Redis node(s) to reboot.
2385
+ * @param options The options parameters.
2386
+ */
2387
+ forceReboot(resourceGroupName, name, parameters, options) {
2388
+ return this.client.sendOperationRequest({ resourceGroupName, name, parameters, options }, forceRebootOperationSpec);
2389
+ }
2390
+ /**
2391
+ * Import data into Redis cache.
2392
+ * @param resourceGroupName The name of the resource group.
2393
+ * @param name The name of the Redis cache.
2394
+ * @param parameters Parameters for Redis import operation.
2395
+ * @param options The options parameters.
2396
+ */
2397
+ beginImportData(resourceGroupName, name, parameters, options) {
2398
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2399
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2400
+ return this.client.sendOperationRequest(args, spec);
2401
+ });
2402
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2403
+ var _a;
2404
+ let currentRawResponse = undefined;
2405
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2406
+ const callback = (rawResponse, flatResponse) => {
2407
+ currentRawResponse = rawResponse;
2408
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2409
+ };
2410
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2411
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2412
+ return {
2413
+ flatResponse,
2414
+ rawResponse: {
2415
+ statusCode: currentRawResponse.status,
2416
+ body: currentRawResponse.parsedBody,
2417
+ headers: currentRawResponse.headers.toJSON()
2418
+ }
2419
+ };
2420
+ });
2421
+ const lro = new LroImpl(sendOperation, { resourceGroupName, name, parameters, options }, importDataOperationSpec);
2422
+ return new coreLro.LroEngine(lro, {
2423
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2424
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2425
+ });
2426
+ });
2427
+ }
2428
+ /**
2429
+ * Import data into Redis cache.
2430
+ * @param resourceGroupName The name of the resource group.
2431
+ * @param name The name of the Redis cache.
2432
+ * @param parameters Parameters for Redis import operation.
2433
+ * @param options The options parameters.
2434
+ */
2435
+ beginImportDataAndWait(resourceGroupName, name, parameters, options) {
2436
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2437
+ const poller = yield this.beginImportData(resourceGroupName, name, parameters, options);
2438
+ return poller.pollUntilDone();
2439
+ });
2440
+ }
2441
+ /**
2442
+ * Export data from the redis cache to blobs in a container.
2443
+ * @param resourceGroupName The name of the resource group.
2444
+ * @param name The name of the Redis cache.
2445
+ * @param parameters Parameters for Redis export operation.
2446
+ * @param options The options parameters.
2447
+ */
2448
+ beginExportData(resourceGroupName, name, parameters, options) {
2449
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2450
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2451
+ return this.client.sendOperationRequest(args, spec);
2452
+ });
2453
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2454
+ var _a;
2455
+ let currentRawResponse = undefined;
2456
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2457
+ const callback = (rawResponse, flatResponse) => {
2458
+ currentRawResponse = rawResponse;
2459
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2460
+ };
2461
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2462
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2463
+ return {
2464
+ flatResponse,
2465
+ rawResponse: {
2466
+ statusCode: currentRawResponse.status,
2467
+ body: currentRawResponse.parsedBody,
2468
+ headers: currentRawResponse.headers.toJSON()
2469
+ }
2470
+ };
2471
+ });
2472
+ const lro = new LroImpl(sendOperation, { resourceGroupName, name, parameters, options }, exportDataOperationSpec);
2473
+ return new coreLro.LroEngine(lro, {
2474
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2475
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2476
+ });
2477
+ });
2478
+ }
2479
+ /**
2480
+ * Export data from the redis cache to blobs in a container.
2481
+ * @param resourceGroupName The name of the resource group.
2482
+ * @param name The name of the Redis cache.
2483
+ * @param parameters Parameters for Redis export operation.
2484
+ * @param options The options parameters.
2485
+ */
2486
+ beginExportDataAndWait(resourceGroupName, name, parameters, options) {
2487
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2488
+ const poller = yield this.beginExportData(resourceGroupName, name, parameters, options);
2489
+ return poller.pollUntilDone();
2490
+ });
2491
+ }
2492
+ /**
2493
+ * ListUpgradeNotificationsNext
2494
+ * @param resourceGroupName The name of the resource group.
2495
+ * @param name The name of the Redis cache.
2496
+ * @param history how many minutes in past to look for upgrade notifications
2497
+ * @param nextLink The nextLink from the previous successful call to the ListUpgradeNotifications
2498
+ * method.
2499
+ * @param options The options parameters.
2500
+ */
2501
+ _listUpgradeNotificationsNext(resourceGroupName, name, history, nextLink, options) {
2502
+ return this.client.sendOperationRequest({ resourceGroupName, name, history, nextLink, options }, listUpgradeNotificationsNextOperationSpec);
2503
+ }
2504
+ /**
2505
+ * ListByResourceGroupNext
2506
+ * @param resourceGroupName The name of the resource group.
2507
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
2508
+ * @param options The options parameters.
2509
+ */
2510
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2511
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2512
+ }
2513
+ /**
2514
+ * ListBySubscriptionNext
2515
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
2516
+ * @param options The options parameters.
2517
+ */
2518
+ _listBySubscriptionNext(nextLink, options) {
2519
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
2520
+ }
2521
+ }
2522
+ // Operation Specifications
2523
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
2524
+ const checkNameAvailabilityOperationSpec = {
2525
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/CheckNameAvailability",
2526
+ httpMethod: "POST",
2527
+ responses: {
2528
+ 200: {},
2529
+ default: {
2530
+ bodyMapper: ErrorResponse
2531
+ }
2532
+ },
2533
+ requestBody: parameters,
2534
+ queryParameters: [apiVersion],
2535
+ urlParameters: [$host, subscriptionId],
2536
+ headerParameters: [accept, contentType],
2537
+ mediaType: "json",
2538
+ serializer: serializer$1
2539
+ };
2540
+ const listUpgradeNotificationsOperationSpec = {
2541
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listUpgradeNotifications",
2542
+ httpMethod: "GET",
2543
+ responses: {
2544
+ 200: {
2545
+ bodyMapper: NotificationListResponse
2546
+ },
2547
+ default: {
2548
+ bodyMapper: ErrorResponse
2549
+ }
2550
+ },
2551
+ queryParameters: [apiVersion, history],
2552
+ urlParameters: [
2553
+ $host,
2554
+ subscriptionId,
2555
+ resourceGroupName,
2556
+ name
2557
+ ],
2558
+ headerParameters: [accept],
2559
+ serializer: serializer$1
2560
+ };
2561
+ const createOperationSpec = {
2562
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}",
2563
+ httpMethod: "PUT",
2564
+ responses: {
2565
+ 200: {
2566
+ bodyMapper: RedisResource
2567
+ },
2568
+ 201: {
2569
+ bodyMapper: RedisResource
2570
+ },
2571
+ 202: {
2572
+ bodyMapper: RedisResource
2573
+ },
2574
+ 204: {
2575
+ bodyMapper: RedisResource
2576
+ },
2577
+ default: {
2578
+ bodyMapper: ErrorResponse
2579
+ }
2580
+ },
2581
+ requestBody: parameters1,
2582
+ queryParameters: [apiVersion],
2583
+ urlParameters: [
2584
+ $host,
2585
+ subscriptionId,
2586
+ resourceGroupName,
2587
+ name
2588
+ ],
2589
+ headerParameters: [accept, contentType],
2590
+ mediaType: "json",
2591
+ serializer: serializer$1
2592
+ };
2593
+ const updateOperationSpec = {
2594
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}",
2595
+ httpMethod: "PATCH",
2596
+ responses: {
2597
+ 200: {
2598
+ bodyMapper: RedisResource
2599
+ },
2600
+ default: {
2601
+ bodyMapper: ErrorResponse
2602
+ }
2603
+ },
2604
+ requestBody: parameters2,
2605
+ queryParameters: [apiVersion],
2606
+ urlParameters: [
2607
+ $host,
2608
+ subscriptionId,
2609
+ resourceGroupName,
2610
+ name
2611
+ ],
2612
+ headerParameters: [accept, contentType],
2613
+ mediaType: "json",
2614
+ serializer: serializer$1
2615
+ };
2616
+ const deleteOperationSpec = {
2617
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}",
2618
+ httpMethod: "DELETE",
2619
+ responses: {
2620
+ 200: {},
2621
+ 201: {},
2622
+ 202: {},
2623
+ 204: {},
2624
+ default: {
2625
+ bodyMapper: ErrorResponse
2626
+ }
2627
+ },
2628
+ queryParameters: [apiVersion],
2629
+ urlParameters: [
2630
+ $host,
2631
+ subscriptionId,
2632
+ resourceGroupName,
2633
+ name
2634
+ ],
2635
+ headerParameters: [accept],
2636
+ serializer: serializer$1
2637
+ };
2638
+ const getOperationSpec = {
2639
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}",
2640
+ httpMethod: "GET",
2641
+ responses: {
2642
+ 200: {
2643
+ bodyMapper: RedisResource
2644
+ },
2645
+ default: {
2646
+ bodyMapper: ErrorResponse
2647
+ }
2648
+ },
2649
+ queryParameters: [apiVersion],
2650
+ urlParameters: [
2651
+ $host,
2652
+ subscriptionId,
2653
+ resourceGroupName,
2654
+ name
2655
+ ],
2656
+ headerParameters: [accept],
2657
+ serializer: serializer$1
2658
+ };
2659
+ const listByResourceGroupOperationSpec = {
2660
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis",
2661
+ httpMethod: "GET",
2662
+ responses: {
2663
+ 200: {
2664
+ bodyMapper: RedisListResult
2665
+ },
2666
+ default: {
2667
+ bodyMapper: ErrorResponse
2668
+ }
2669
+ },
2670
+ queryParameters: [apiVersion],
2671
+ urlParameters: [
2672
+ $host,
2673
+ subscriptionId,
2674
+ resourceGroupName
2675
+ ],
2676
+ headerParameters: [accept],
2677
+ serializer: serializer$1
2678
+ };
2679
+ const listBySubscriptionOperationSpec = {
2680
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/redis",
2681
+ httpMethod: "GET",
2682
+ responses: {
2683
+ 200: {
2684
+ bodyMapper: RedisListResult
2685
+ },
2686
+ default: {
2687
+ bodyMapper: ErrorResponse
2688
+ }
2689
+ },
2690
+ queryParameters: [apiVersion],
2691
+ urlParameters: [$host, subscriptionId],
2692
+ headerParameters: [accept],
2693
+ serializer: serializer$1
2694
+ };
2695
+ const listKeysOperationSpec = {
2696
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys",
2697
+ httpMethod: "POST",
2698
+ responses: {
2699
+ 200: {
2700
+ bodyMapper: RedisAccessKeys
2701
+ },
2702
+ default: {
2703
+ bodyMapper: ErrorResponse
2704
+ }
2705
+ },
2706
+ queryParameters: [apiVersion],
2707
+ urlParameters: [
2708
+ $host,
2709
+ subscriptionId,
2710
+ resourceGroupName,
2711
+ name
2712
+ ],
2713
+ headerParameters: [accept],
2714
+ serializer: serializer$1
2715
+ };
2716
+ const regenerateKeyOperationSpec = {
2717
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/regenerateKey",
2718
+ httpMethod: "POST",
2719
+ responses: {
2720
+ 200: {
2721
+ bodyMapper: RedisAccessKeys
2722
+ },
2723
+ default: {
2724
+ bodyMapper: ErrorResponse
2725
+ }
2726
+ },
2727
+ requestBody: parameters3,
2728
+ queryParameters: [apiVersion],
2729
+ urlParameters: [
2730
+ $host,
2731
+ subscriptionId,
2732
+ resourceGroupName,
2733
+ name
2734
+ ],
2735
+ headerParameters: [accept, contentType],
2736
+ mediaType: "json",
2737
+ serializer: serializer$1
2738
+ };
2739
+ const forceRebootOperationSpec = {
2740
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/forceReboot",
2741
+ httpMethod: "POST",
2742
+ responses: {
2743
+ 200: {
2744
+ bodyMapper: RedisForceRebootResponse
2745
+ },
2746
+ default: {
2747
+ bodyMapper: ErrorResponse
2748
+ }
2749
+ },
2750
+ requestBody: parameters4,
2751
+ queryParameters: [apiVersion],
2752
+ urlParameters: [
2753
+ $host,
2754
+ subscriptionId,
2755
+ resourceGroupName,
2756
+ name
2757
+ ],
2758
+ headerParameters: [accept, contentType],
2759
+ mediaType: "json",
2760
+ serializer: serializer$1
2761
+ };
2762
+ const importDataOperationSpec = {
2763
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/import",
2764
+ httpMethod: "POST",
2765
+ responses: {
2766
+ 200: {},
2767
+ 201: {},
2768
+ 202: {},
2769
+ 204: {},
2770
+ default: {
2771
+ bodyMapper: ErrorResponse
2772
+ }
2773
+ },
2774
+ requestBody: parameters5,
2775
+ queryParameters: [apiVersion],
2776
+ urlParameters: [
2777
+ $host,
2778
+ subscriptionId,
2779
+ resourceGroupName,
2780
+ name
2781
+ ],
2782
+ headerParameters: [accept, contentType],
2783
+ mediaType: "json",
2784
+ serializer: serializer$1
2785
+ };
2786
+ const exportDataOperationSpec = {
2787
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/export",
2788
+ httpMethod: "POST",
2789
+ responses: {
2790
+ 200: {},
2791
+ 201: {},
2792
+ 202: {},
2793
+ 204: {},
2794
+ default: {
2795
+ bodyMapper: ErrorResponse
2796
+ }
2797
+ },
2798
+ requestBody: parameters6,
2799
+ queryParameters: [apiVersion],
2800
+ urlParameters: [
2801
+ $host,
2802
+ subscriptionId,
2803
+ resourceGroupName,
2804
+ name
2805
+ ],
2806
+ headerParameters: [accept, contentType],
2807
+ mediaType: "json",
2808
+ serializer: serializer$1
2809
+ };
2810
+ const listUpgradeNotificationsNextOperationSpec = {
2811
+ path: "{nextLink}",
2812
+ httpMethod: "GET",
2813
+ responses: {
2814
+ 200: {
2815
+ bodyMapper: NotificationListResponse
2816
+ },
2817
+ default: {
2818
+ bodyMapper: ErrorResponse
2819
+ }
2820
+ },
2821
+ queryParameters: [apiVersion, history],
2822
+ urlParameters: [
2823
+ $host,
2824
+ nextLink,
2825
+ subscriptionId,
2826
+ resourceGroupName,
2827
+ name
2828
+ ],
2829
+ headerParameters: [accept],
2830
+ serializer: serializer$1
2831
+ };
2832
+ const listByResourceGroupNextOperationSpec = {
2833
+ path: "{nextLink}",
2834
+ httpMethod: "GET",
2835
+ responses: {
2836
+ 200: {
2837
+ bodyMapper: RedisListResult
2838
+ },
2839
+ default: {
2840
+ bodyMapper: ErrorResponse
2841
+ }
2842
+ },
2843
+ queryParameters: [apiVersion],
2844
+ urlParameters: [
2845
+ $host,
2846
+ nextLink,
2847
+ subscriptionId,
2848
+ resourceGroupName
2849
+ ],
2850
+ headerParameters: [accept],
2851
+ serializer: serializer$1
2852
+ };
2853
+ const listBySubscriptionNextOperationSpec = {
2854
+ path: "{nextLink}",
2855
+ httpMethod: "GET",
2856
+ responses: {
2857
+ 200: {
2858
+ bodyMapper: RedisListResult
2859
+ },
2860
+ default: {
2861
+ bodyMapper: ErrorResponse
2862
+ }
2863
+ },
2864
+ queryParameters: [apiVersion],
2865
+ urlParameters: [
2866
+ $host,
2867
+ nextLink,
2868
+ subscriptionId
2869
+ ],
2870
+ headerParameters: [accept],
2871
+ serializer: serializer$1
2872
+ };
2873
+
2874
+ /*
2875
+ * Copyright (c) Microsoft Corporation.
2876
+ * Licensed under the MIT License.
2877
+ *
2878
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2879
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2880
+ */
2881
+ /// <reference lib="esnext.asynciterable" />
2882
+ /** Class containing FirewallRules operations. */
2883
+ class FirewallRulesImpl {
2884
+ /**
2885
+ * Initialize a new instance of the class FirewallRules class.
2886
+ * @param client Reference to the service client
2887
+ */
2888
+ constructor(client) {
2889
+ this.client = client;
2890
+ }
2891
+ /**
2892
+ * Gets all firewall rules in the specified redis cache.
2893
+ * @param resourceGroupName The name of the resource group.
2894
+ * @param cacheName The name of the Redis cache.
2895
+ * @param options The options parameters.
2896
+ */
2897
+ list(resourceGroupName, cacheName, options) {
2898
+ const iter = this.listPagingAll(resourceGroupName, cacheName, options);
2899
+ return {
2900
+ next() {
2901
+ return iter.next();
2902
+ },
2903
+ [Symbol.asyncIterator]() {
2904
+ return this;
2905
+ },
2906
+ byPage: () => {
2907
+ return this.listPagingPage(resourceGroupName, cacheName, options);
2908
+ }
2909
+ };
2910
+ }
2911
+ listPagingPage(resourceGroupName, cacheName, options) {
2912
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2913
+ let result = yield tslib.__await(this._list(resourceGroupName, cacheName, options));
2914
+ yield yield tslib.__await(result.value || []);
2915
+ let continuationToken = result.nextLink;
2916
+ while (continuationToken) {
2917
+ result = yield tslib.__await(this._listNext(resourceGroupName, cacheName, continuationToken, options));
2918
+ continuationToken = result.nextLink;
2919
+ yield yield tslib.__await(result.value || []);
2920
+ }
2921
+ });
2922
+ }
2923
+ listPagingAll(resourceGroupName, cacheName, options) {
2924
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2925
+ var e_1, _a;
2926
+ try {
2927
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, cacheName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2928
+ const page = _c.value;
2929
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2930
+ }
2931
+ }
2932
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2933
+ finally {
2934
+ try {
2935
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2936
+ }
2937
+ finally { if (e_1) throw e_1.error; }
2938
+ }
2939
+ });
2940
+ }
2941
+ /**
2942
+ * Gets all firewall rules in the specified redis cache.
2943
+ * @param resourceGroupName The name of the resource group.
2944
+ * @param cacheName The name of the Redis cache.
2945
+ * @param options The options parameters.
2946
+ */
2947
+ _list(resourceGroupName, cacheName, options) {
2948
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, options }, listOperationSpec$1);
2949
+ }
2950
+ /**
2951
+ * Create or update a redis cache firewall rule
2952
+ * @param resourceGroupName The name of the resource group.
2953
+ * @param cacheName The name of the Redis cache.
2954
+ * @param ruleName The name of the firewall rule.
2955
+ * @param parameters Parameters supplied to the create or update redis firewall rule operation.
2956
+ * @param options The options parameters.
2957
+ */
2958
+ createOrUpdate(resourceGroupName, cacheName, ruleName, parameters, options) {
2959
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, ruleName, parameters, options }, createOrUpdateOperationSpec);
2960
+ }
2961
+ /**
2962
+ * Gets a single firewall rule in a specified redis cache.
2963
+ * @param resourceGroupName The name of the resource group.
2964
+ * @param cacheName The name of the Redis cache.
2965
+ * @param ruleName The name of the firewall rule.
2966
+ * @param options The options parameters.
2967
+ */
2968
+ get(resourceGroupName, cacheName, ruleName, options) {
2969
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, ruleName, options }, getOperationSpec$1);
2970
+ }
2971
+ /**
2972
+ * Deletes a single firewall rule in a specified redis cache.
2973
+ * @param resourceGroupName The name of the resource group.
2974
+ * @param cacheName The name of the Redis cache.
2975
+ * @param ruleName The name of the firewall rule.
2976
+ * @param options The options parameters.
2977
+ */
2978
+ delete(resourceGroupName, cacheName, ruleName, options) {
2979
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, ruleName, options }, deleteOperationSpec$1);
2980
+ }
2981
+ /**
2982
+ * ListNext
2983
+ * @param resourceGroupName The name of the resource group.
2984
+ * @param cacheName The name of the Redis cache.
2985
+ * @param nextLink The nextLink from the previous successful call to the List method.
2986
+ * @param options The options parameters.
2987
+ */
2988
+ _listNext(resourceGroupName, cacheName, nextLink, options) {
2989
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, nextLink, options }, listNextOperationSpec$1);
2990
+ }
2991
+ }
2992
+ // Operation Specifications
2993
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
2994
+ const listOperationSpec$1 = {
2995
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules",
2996
+ httpMethod: "GET",
2997
+ responses: {
2998
+ 200: {
2999
+ bodyMapper: RedisFirewallRuleListResult
3000
+ },
3001
+ default: {
3002
+ bodyMapper: ErrorResponse
3003
+ }
3004
+ },
3005
+ queryParameters: [apiVersion],
3006
+ urlParameters: [
3007
+ $host,
3008
+ subscriptionId,
3009
+ resourceGroupName,
3010
+ cacheName
3011
+ ],
3012
+ headerParameters: [accept],
3013
+ serializer: serializer$2
3014
+ };
3015
+ const createOrUpdateOperationSpec = {
3016
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}",
3017
+ httpMethod: "PUT",
3018
+ responses: {
3019
+ 200: {
3020
+ bodyMapper: RedisFirewallRule
3021
+ },
3022
+ 201: {
3023
+ bodyMapper: RedisFirewallRule
3024
+ },
3025
+ default: {
3026
+ bodyMapper: ErrorResponse
3027
+ }
3028
+ },
3029
+ requestBody: parameters7,
3030
+ queryParameters: [apiVersion],
3031
+ urlParameters: [
3032
+ $host,
3033
+ subscriptionId,
3034
+ resourceGroupName,
3035
+ cacheName,
3036
+ ruleName
3037
+ ],
3038
+ headerParameters: [accept, contentType],
3039
+ mediaType: "json",
3040
+ serializer: serializer$2
3041
+ };
3042
+ const getOperationSpec$1 = {
3043
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}",
3044
+ httpMethod: "GET",
3045
+ responses: {
3046
+ 200: {
3047
+ bodyMapper: RedisFirewallRule
3048
+ },
3049
+ default: {
3050
+ bodyMapper: ErrorResponse
3051
+ }
3052
+ },
3053
+ queryParameters: [apiVersion],
3054
+ urlParameters: [
3055
+ $host,
3056
+ subscriptionId,
3057
+ resourceGroupName,
3058
+ cacheName,
3059
+ ruleName
3060
+ ],
3061
+ headerParameters: [accept],
3062
+ serializer: serializer$2
3063
+ };
3064
+ const deleteOperationSpec$1 = {
3065
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}",
3066
+ httpMethod: "DELETE",
3067
+ responses: {
3068
+ 200: {},
3069
+ 204: {},
3070
+ default: {
3071
+ bodyMapper: ErrorResponse
3072
+ }
3073
+ },
3074
+ queryParameters: [apiVersion],
3075
+ urlParameters: [
3076
+ $host,
3077
+ subscriptionId,
3078
+ resourceGroupName,
3079
+ cacheName,
3080
+ ruleName
3081
+ ],
3082
+ headerParameters: [accept],
3083
+ serializer: serializer$2
3084
+ };
3085
+ const listNextOperationSpec$1 = {
3086
+ path: "{nextLink}",
3087
+ httpMethod: "GET",
3088
+ responses: {
3089
+ 200: {
3090
+ bodyMapper: RedisFirewallRuleListResult
3091
+ },
3092
+ default: {
3093
+ bodyMapper: ErrorResponse
3094
+ }
3095
+ },
3096
+ queryParameters: [apiVersion],
3097
+ urlParameters: [
3098
+ $host,
3099
+ nextLink,
3100
+ subscriptionId,
3101
+ resourceGroupName,
3102
+ cacheName
3103
+ ],
3104
+ headerParameters: [accept],
3105
+ serializer: serializer$2
3106
+ };
3107
+
3108
+ /*
3109
+ * Copyright (c) Microsoft Corporation.
3110
+ * Licensed under the MIT License.
3111
+ *
3112
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3113
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3114
+ */
3115
+ /// <reference lib="esnext.asynciterable" />
3116
+ /** Class containing PatchSchedules operations. */
3117
+ class PatchSchedulesImpl {
3118
+ /**
3119
+ * Initialize a new instance of the class PatchSchedules class.
3120
+ * @param client Reference to the service client
3121
+ */
3122
+ constructor(client) {
3123
+ this.client = client;
3124
+ }
3125
+ /**
3126
+ * Gets all patch schedules in the specified redis cache (there is only one).
3127
+ * @param resourceGroupName The name of the resource group.
3128
+ * @param cacheName The name of the Redis cache.
3129
+ * @param options The options parameters.
3130
+ */
3131
+ listByRedisResource(resourceGroupName, cacheName, options) {
3132
+ const iter = this.listByRedisResourcePagingAll(resourceGroupName, cacheName, options);
3133
+ return {
3134
+ next() {
3135
+ return iter.next();
3136
+ },
3137
+ [Symbol.asyncIterator]() {
3138
+ return this;
3139
+ },
3140
+ byPage: () => {
3141
+ return this.listByRedisResourcePagingPage(resourceGroupName, cacheName, options);
3142
+ }
3143
+ };
3144
+ }
3145
+ listByRedisResourcePagingPage(resourceGroupName, cacheName, options) {
3146
+ return tslib.__asyncGenerator(this, arguments, function* listByRedisResourcePagingPage_1() {
3147
+ let result = yield tslib.__await(this._listByRedisResource(resourceGroupName, cacheName, options));
3148
+ yield yield tslib.__await(result.value || []);
3149
+ let continuationToken = result.nextLink;
3150
+ while (continuationToken) {
3151
+ result = yield tslib.__await(this._listByRedisResourceNext(resourceGroupName, cacheName, continuationToken, options));
3152
+ continuationToken = result.nextLink;
3153
+ yield yield tslib.__await(result.value || []);
3154
+ }
3155
+ });
3156
+ }
3157
+ listByRedisResourcePagingAll(resourceGroupName, cacheName, options) {
3158
+ return tslib.__asyncGenerator(this, arguments, function* listByRedisResourcePagingAll_1() {
3159
+ var e_1, _a;
3160
+ try {
3161
+ for (var _b = tslib.__asyncValues(this.listByRedisResourcePagingPage(resourceGroupName, cacheName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3162
+ const page = _c.value;
3163
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3164
+ }
3165
+ }
3166
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3167
+ finally {
3168
+ try {
3169
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3170
+ }
3171
+ finally { if (e_1) throw e_1.error; }
3172
+ }
3173
+ });
3174
+ }
3175
+ /**
3176
+ * Gets all patch schedules in the specified redis cache (there is only one).
3177
+ * @param resourceGroupName The name of the resource group.
3178
+ * @param cacheName The name of the Redis cache.
3179
+ * @param options The options parameters.
3180
+ */
3181
+ _listByRedisResource(resourceGroupName, cacheName, options) {
3182
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, options }, listByRedisResourceOperationSpec);
3183
+ }
3184
+ /**
3185
+ * Create or replace the patching schedule for Redis cache.
3186
+ * @param resourceGroupName The name of the resource group.
3187
+ * @param name The name of the Redis cache.
3188
+ * @param parameters Parameters to set the patching schedule for Redis cache.
3189
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
3190
+ * @param options The options parameters.
3191
+ */
3192
+ createOrUpdate(resourceGroupName, name, parameters, defaultParam, options) {
3193
+ return this.client.sendOperationRequest({ resourceGroupName, name, parameters, defaultParam, options }, createOrUpdateOperationSpec$1);
3194
+ }
3195
+ /**
3196
+ * Deletes the patching schedule of a redis cache.
3197
+ * @param resourceGroupName The name of the resource group.
3198
+ * @param name The name of the redis cache.
3199
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
3200
+ * @param options The options parameters.
3201
+ */
3202
+ delete(resourceGroupName, name, defaultParam, options) {
3203
+ return this.client.sendOperationRequest({ resourceGroupName, name, defaultParam, options }, deleteOperationSpec$2);
3204
+ }
3205
+ /**
3206
+ * Gets the patching schedule of a redis cache.
3207
+ * @param resourceGroupName The name of the resource group.
3208
+ * @param name The name of the redis cache.
3209
+ * @param defaultParam Default string modeled as parameter for auto generation to work correctly.
3210
+ * @param options The options parameters.
3211
+ */
3212
+ get(resourceGroupName, name, defaultParam, options) {
3213
+ return this.client.sendOperationRequest({ resourceGroupName, name, defaultParam, options }, getOperationSpec$2);
3214
+ }
3215
+ /**
3216
+ * ListByRedisResourceNext
3217
+ * @param resourceGroupName The name of the resource group.
3218
+ * @param cacheName The name of the Redis cache.
3219
+ * @param nextLink The nextLink from the previous successful call to the ListByRedisResource method.
3220
+ * @param options The options parameters.
3221
+ */
3222
+ _listByRedisResourceNext(resourceGroupName, cacheName, nextLink, options) {
3223
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, nextLink, options }, listByRedisResourceNextOperationSpec);
3224
+ }
3225
+ }
3226
+ // Operation Specifications
3227
+ const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
3228
+ const listByRedisResourceOperationSpec = {
3229
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/patchSchedules",
3230
+ httpMethod: "GET",
3231
+ responses: {
3232
+ 200: {
3233
+ bodyMapper: RedisPatchScheduleListResult
3234
+ },
3235
+ default: {
3236
+ bodyMapper: ErrorResponse
3237
+ }
3238
+ },
3239
+ queryParameters: [apiVersion],
3240
+ urlParameters: [
3241
+ $host,
3242
+ subscriptionId,
3243
+ resourceGroupName,
3244
+ cacheName
3245
+ ],
3246
+ headerParameters: [accept],
3247
+ serializer: serializer$3
3248
+ };
3249
+ const createOrUpdateOperationSpec$1 = {
3250
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}",
3251
+ httpMethod: "PUT",
3252
+ responses: {
3253
+ 200: {
3254
+ bodyMapper: RedisPatchSchedule
3255
+ },
3256
+ 201: {
3257
+ bodyMapper: RedisPatchSchedule
3258
+ },
3259
+ default: {
3260
+ bodyMapper: ErrorResponse
3261
+ }
3262
+ },
3263
+ requestBody: parameters8,
3264
+ queryParameters: [apiVersion],
3265
+ urlParameters: [
3266
+ $host,
3267
+ subscriptionId,
3268
+ resourceGroupName,
3269
+ name,
3270
+ defaultParam
3271
+ ],
3272
+ headerParameters: [accept, contentType],
3273
+ mediaType: "json",
3274
+ serializer: serializer$3
3275
+ };
3276
+ const deleteOperationSpec$2 = {
3277
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}",
3278
+ httpMethod: "DELETE",
3279
+ responses: {
3280
+ 200: {},
3281
+ 204: {},
3282
+ default: {
3283
+ bodyMapper: ErrorResponse
3284
+ }
3285
+ },
3286
+ queryParameters: [apiVersion],
3287
+ urlParameters: [
3288
+ $host,
3289
+ subscriptionId,
3290
+ resourceGroupName,
3291
+ name,
3292
+ defaultParam
3293
+ ],
3294
+ headerParameters: [accept],
3295
+ serializer: serializer$3
3296
+ };
3297
+ const getOperationSpec$2 = {
3298
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}",
3299
+ httpMethod: "GET",
3300
+ responses: {
3301
+ 200: {
3302
+ bodyMapper: RedisPatchSchedule
3303
+ },
3304
+ default: {
3305
+ bodyMapper: ErrorResponse
3306
+ }
3307
+ },
3308
+ queryParameters: [apiVersion],
3309
+ urlParameters: [
3310
+ $host,
3311
+ subscriptionId,
3312
+ resourceGroupName,
3313
+ name,
3314
+ defaultParam
3315
+ ],
3316
+ headerParameters: [accept],
3317
+ serializer: serializer$3
3318
+ };
3319
+ const listByRedisResourceNextOperationSpec = {
3320
+ path: "{nextLink}",
3321
+ httpMethod: "GET",
3322
+ responses: {
3323
+ 200: {
3324
+ bodyMapper: RedisPatchScheduleListResult
3325
+ },
3326
+ default: {
3327
+ bodyMapper: ErrorResponse
3328
+ }
3329
+ },
3330
+ queryParameters: [apiVersion],
3331
+ urlParameters: [
3332
+ $host,
3333
+ nextLink,
3334
+ subscriptionId,
3335
+ resourceGroupName,
3336
+ cacheName
3337
+ ],
3338
+ headerParameters: [accept],
3339
+ serializer: serializer$3
3340
+ };
3341
+
3342
+ /*
3343
+ * Copyright (c) Microsoft Corporation.
3344
+ * Licensed under the MIT License.
3345
+ *
3346
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3347
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3348
+ */
3349
+ /// <reference lib="esnext.asynciterable" />
3350
+ /** Class containing LinkedServer operations. */
3351
+ class LinkedServerImpl {
3352
+ /**
3353
+ * Initialize a new instance of the class LinkedServer class.
3354
+ * @param client Reference to the service client
3355
+ */
3356
+ constructor(client) {
3357
+ this.client = client;
3358
+ }
3359
+ /**
3360
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
3361
+ * @param resourceGroupName The name of the resource group.
3362
+ * @param name The name of the redis cache.
3363
+ * @param options The options parameters.
3364
+ */
3365
+ list(resourceGroupName, name, options) {
3366
+ const iter = this.listPagingAll(resourceGroupName, name, options);
3367
+ return {
3368
+ next() {
3369
+ return iter.next();
3370
+ },
3371
+ [Symbol.asyncIterator]() {
3372
+ return this;
3373
+ },
3374
+ byPage: () => {
3375
+ return this.listPagingPage(resourceGroupName, name, options);
3376
+ }
3377
+ };
3378
+ }
3379
+ listPagingPage(resourceGroupName, name, options) {
3380
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3381
+ let result = yield tslib.__await(this._list(resourceGroupName, name, options));
3382
+ yield yield tslib.__await(result.value || []);
3383
+ let continuationToken = result.nextLink;
3384
+ while (continuationToken) {
3385
+ result = yield tslib.__await(this._listNext(resourceGroupName, name, continuationToken, options));
3386
+ continuationToken = result.nextLink;
3387
+ yield yield tslib.__await(result.value || []);
3388
+ }
3389
+ });
3390
+ }
3391
+ listPagingAll(resourceGroupName, name, options) {
3392
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3393
+ var e_1, _a;
3394
+ try {
3395
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, name, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3396
+ const page = _c.value;
3397
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3398
+ }
3399
+ }
3400
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3401
+ finally {
3402
+ try {
3403
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3404
+ }
3405
+ finally { if (e_1) throw e_1.error; }
3406
+ }
3407
+ });
3408
+ }
3409
+ /**
3410
+ * Adds a linked server to the Redis cache (requires Premium SKU).
3411
+ * @param resourceGroupName The name of the resource group.
3412
+ * @param name The name of the Redis cache.
3413
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
3414
+ * @param parameters Parameters supplied to the Create Linked server operation.
3415
+ * @param options The options parameters.
3416
+ */
3417
+ beginCreate(resourceGroupName, name, linkedServerName, parameters, options) {
3418
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3419
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3420
+ return this.client.sendOperationRequest(args, spec);
3421
+ });
3422
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3423
+ var _a;
3424
+ let currentRawResponse = undefined;
3425
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3426
+ const callback = (rawResponse, flatResponse) => {
3427
+ currentRawResponse = rawResponse;
3428
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3429
+ };
3430
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3431
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3432
+ return {
3433
+ flatResponse,
3434
+ rawResponse: {
3435
+ statusCode: currentRawResponse.status,
3436
+ body: currentRawResponse.parsedBody,
3437
+ headers: currentRawResponse.headers.toJSON()
3438
+ }
3439
+ };
3440
+ });
3441
+ const lro = new LroImpl(sendOperation, { resourceGroupName, name, linkedServerName, parameters, options }, createOperationSpec$1);
3442
+ return new coreLro.LroEngine(lro, {
3443
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3444
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3445
+ });
3446
+ });
3447
+ }
3448
+ /**
3449
+ * Adds a linked server to the Redis cache (requires Premium SKU).
3450
+ * @param resourceGroupName The name of the resource group.
3451
+ * @param name The name of the Redis cache.
3452
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
3453
+ * @param parameters Parameters supplied to the Create Linked server operation.
3454
+ * @param options The options parameters.
3455
+ */
3456
+ beginCreateAndWait(resourceGroupName, name, linkedServerName, parameters, options) {
3457
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3458
+ const poller = yield this.beginCreate(resourceGroupName, name, linkedServerName, parameters, options);
3459
+ return poller.pollUntilDone();
3460
+ });
3461
+ }
3462
+ /**
3463
+ * Deletes the linked server from a redis cache (requires Premium SKU).
3464
+ * @param resourceGroupName The name of the resource group.
3465
+ * @param name The name of the redis cache.
3466
+ * @param linkedServerName The name of the linked server that is being added to the Redis cache.
3467
+ * @param options The options parameters.
3468
+ */
3469
+ delete(resourceGroupName, name, linkedServerName, options) {
3470
+ return this.client.sendOperationRequest({ resourceGroupName, name, linkedServerName, options }, deleteOperationSpec$3);
3471
+ }
3472
+ /**
3473
+ * Gets the detailed information about a linked server of a redis cache (requires Premium SKU).
3474
+ * @param resourceGroupName The name of the resource group.
3475
+ * @param name The name of the redis cache.
3476
+ * @param linkedServerName The name of the linked server.
3477
+ * @param options The options parameters.
3478
+ */
3479
+ get(resourceGroupName, name, linkedServerName, options) {
3480
+ return this.client.sendOperationRequest({ resourceGroupName, name, linkedServerName, options }, getOperationSpec$3);
3481
+ }
3482
+ /**
3483
+ * Gets the list of linked servers associated with this redis cache (requires Premium SKU).
3484
+ * @param resourceGroupName The name of the resource group.
3485
+ * @param name The name of the redis cache.
3486
+ * @param options The options parameters.
3487
+ */
3488
+ _list(resourceGroupName, name, options) {
3489
+ return this.client.sendOperationRequest({ resourceGroupName, name, options }, listOperationSpec$2);
3490
+ }
3491
+ /**
3492
+ * ListNext
3493
+ * @param resourceGroupName The name of the resource group.
3494
+ * @param name The name of the redis cache.
3495
+ * @param nextLink The nextLink from the previous successful call to the List method.
3496
+ * @param options The options parameters.
3497
+ */
3498
+ _listNext(resourceGroupName, name, nextLink, options) {
3499
+ return this.client.sendOperationRequest({ resourceGroupName, name, nextLink, options }, listNextOperationSpec$2);
3500
+ }
3501
+ }
3502
+ // Operation Specifications
3503
+ const serializer$4 = coreClient.createSerializer(Mappers, /* isXml */ false);
3504
+ const createOperationSpec$1 = {
3505
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}",
3506
+ httpMethod: "PUT",
3507
+ responses: {
3508
+ 200: {
3509
+ bodyMapper: RedisLinkedServerWithProperties
3510
+ },
3511
+ 201: {
3512
+ bodyMapper: RedisLinkedServerWithProperties
3513
+ },
3514
+ 202: {
3515
+ bodyMapper: RedisLinkedServerWithProperties
3516
+ },
3517
+ 204: {
3518
+ bodyMapper: RedisLinkedServerWithProperties
3519
+ },
3520
+ default: {
3521
+ bodyMapper: ErrorResponse
3522
+ }
3523
+ },
3524
+ requestBody: parameters9,
3525
+ queryParameters: [apiVersion],
3526
+ urlParameters: [
3527
+ $host,
3528
+ subscriptionId,
3529
+ resourceGroupName,
3530
+ name,
3531
+ linkedServerName
3532
+ ],
3533
+ headerParameters: [accept, contentType],
3534
+ mediaType: "json",
3535
+ serializer: serializer$4
3536
+ };
3537
+ const deleteOperationSpec$3 = {
3538
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}",
3539
+ httpMethod: "DELETE",
3540
+ responses: {
3541
+ 200: {},
3542
+ 204: {},
3543
+ default: {
3544
+ bodyMapper: ErrorResponse
3545
+ }
3546
+ },
3547
+ queryParameters: [apiVersion],
3548
+ urlParameters: [
3549
+ $host,
3550
+ subscriptionId,
3551
+ resourceGroupName,
3552
+ name,
3553
+ linkedServerName
3554
+ ],
3555
+ headerParameters: [accept],
3556
+ serializer: serializer$4
3557
+ };
3558
+ const getOperationSpec$3 = {
3559
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}",
3560
+ httpMethod: "GET",
3561
+ responses: {
3562
+ 200: {
3563
+ bodyMapper: RedisLinkedServerWithProperties
3564
+ },
3565
+ default: {
3566
+ bodyMapper: ErrorResponse
3567
+ }
3568
+ },
3569
+ queryParameters: [apiVersion],
3570
+ urlParameters: [
3571
+ $host,
3572
+ subscriptionId,
3573
+ resourceGroupName,
3574
+ name,
3575
+ linkedServerName
3576
+ ],
3577
+ headerParameters: [accept],
3578
+ serializer: serializer$4
3579
+ };
3580
+ const listOperationSpec$2 = {
3581
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers",
3582
+ httpMethod: "GET",
3583
+ responses: {
3584
+ 200: {
3585
+ bodyMapper: RedisLinkedServerWithPropertiesList
3586
+ },
3587
+ default: {
3588
+ bodyMapper: ErrorResponse
3589
+ }
3590
+ },
3591
+ queryParameters: [apiVersion],
3592
+ urlParameters: [
3593
+ $host,
3594
+ subscriptionId,
3595
+ resourceGroupName,
3596
+ name
3597
+ ],
3598
+ headerParameters: [accept],
3599
+ serializer: serializer$4
3600
+ };
3601
+ const listNextOperationSpec$2 = {
3602
+ path: "{nextLink}",
3603
+ httpMethod: "GET",
3604
+ responses: {
3605
+ 200: {
3606
+ bodyMapper: RedisLinkedServerWithPropertiesList
3607
+ },
3608
+ default: {
3609
+ bodyMapper: ErrorResponse
3610
+ }
3611
+ },
3612
+ queryParameters: [apiVersion],
3613
+ urlParameters: [
3614
+ $host,
3615
+ nextLink,
3616
+ subscriptionId,
3617
+ resourceGroupName,
3618
+ name
3619
+ ],
3620
+ headerParameters: [accept],
3621
+ serializer: serializer$4
3622
+ };
3623
+
3624
+ /*
3625
+ * Copyright (c) Microsoft Corporation.
3626
+ * Licensed under the MIT License.
3627
+ *
3628
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3629
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3630
+ */
3631
+ /// <reference lib="esnext.asynciterable" />
3632
+ /** Class containing PrivateEndpointConnections operations. */
3633
+ class PrivateEndpointConnectionsImpl {
3634
+ /**
3635
+ * Initialize a new instance of the class PrivateEndpointConnections class.
3636
+ * @param client Reference to the service client
3637
+ */
3638
+ constructor(client) {
3639
+ this.client = client;
3640
+ }
3641
+ /**
3642
+ * List all the private endpoint connections associated with the redis cache.
3643
+ * @param resourceGroupName The name of the resource group.
3644
+ * @param cacheName The name of the Redis cache.
3645
+ * @param options The options parameters.
3646
+ */
3647
+ list(resourceGroupName, cacheName, options) {
3648
+ const iter = this.listPagingAll(resourceGroupName, cacheName, options);
3649
+ return {
3650
+ next() {
3651
+ return iter.next();
3652
+ },
3653
+ [Symbol.asyncIterator]() {
3654
+ return this;
3655
+ },
3656
+ byPage: () => {
3657
+ return this.listPagingPage(resourceGroupName, cacheName, options);
3658
+ }
3659
+ };
3660
+ }
3661
+ listPagingPage(resourceGroupName, cacheName, options) {
3662
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3663
+ let result = yield tslib.__await(this._list(resourceGroupName, cacheName, options));
3664
+ yield yield tslib.__await(result.value || []);
3665
+ });
3666
+ }
3667
+ listPagingAll(resourceGroupName, cacheName, options) {
3668
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3669
+ var e_1, _a;
3670
+ try {
3671
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, cacheName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3672
+ const page = _c.value;
3673
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3674
+ }
3675
+ }
3676
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3677
+ finally {
3678
+ try {
3679
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3680
+ }
3681
+ finally { if (e_1) throw e_1.error; }
3682
+ }
3683
+ });
3684
+ }
3685
+ /**
3686
+ * List all the private endpoint connections associated with the redis cache.
3687
+ * @param resourceGroupName The name of the resource group.
3688
+ * @param cacheName The name of the Redis cache.
3689
+ * @param options The options parameters.
3690
+ */
3691
+ _list(resourceGroupName, cacheName, options) {
3692
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, options }, listOperationSpec$3);
3693
+ }
3694
+ /**
3695
+ * Gets the specified private endpoint connection associated with the redis cache.
3696
+ * @param resourceGroupName The name of the resource group.
3697
+ * @param cacheName The name of the Redis cache.
3698
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3699
+ * Azure resource
3700
+ * @param options The options parameters.
3701
+ */
3702
+ get(resourceGroupName, cacheName, privateEndpointConnectionName, options) {
3703
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, privateEndpointConnectionName, options }, getOperationSpec$4);
3704
+ }
3705
+ /**
3706
+ * Update the state of specified private endpoint connection associated with the redis cache.
3707
+ * @param resourceGroupName The name of the resource group.
3708
+ * @param cacheName The name of the Redis cache.
3709
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3710
+ * Azure resource
3711
+ * @param properties The private endpoint connection properties.
3712
+ * @param options The options parameters.
3713
+ */
3714
+ beginPut(resourceGroupName, cacheName, privateEndpointConnectionName, properties, options) {
3715
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3716
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3717
+ return this.client.sendOperationRequest(args, spec);
3718
+ });
3719
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3720
+ var _a;
3721
+ let currentRawResponse = undefined;
3722
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3723
+ const callback = (rawResponse, flatResponse) => {
3724
+ currentRawResponse = rawResponse;
3725
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3726
+ };
3727
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3728
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3729
+ return {
3730
+ flatResponse,
3731
+ rawResponse: {
3732
+ statusCode: currentRawResponse.status,
3733
+ body: currentRawResponse.parsedBody,
3734
+ headers: currentRawResponse.headers.toJSON()
3735
+ }
3736
+ };
3737
+ });
3738
+ const lro = new LroImpl(sendOperation, {
3739
+ resourceGroupName,
3740
+ cacheName,
3741
+ privateEndpointConnectionName,
3742
+ properties,
3743
+ options
3744
+ }, putOperationSpec);
3745
+ return new coreLro.LroEngine(lro, {
3746
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3747
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3748
+ });
3749
+ });
3750
+ }
3751
+ /**
3752
+ * Update the state of specified private endpoint connection associated with the redis cache.
3753
+ * @param resourceGroupName The name of the resource group.
3754
+ * @param cacheName The name of the Redis cache.
3755
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3756
+ * Azure resource
3757
+ * @param properties The private endpoint connection properties.
3758
+ * @param options The options parameters.
3759
+ */
3760
+ beginPutAndWait(resourceGroupName, cacheName, privateEndpointConnectionName, properties, options) {
3761
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3762
+ const poller = yield this.beginPut(resourceGroupName, cacheName, privateEndpointConnectionName, properties, options);
3763
+ return poller.pollUntilDone();
3764
+ });
3765
+ }
3766
+ /**
3767
+ * Deletes the specified private endpoint connection associated with the redis cache.
3768
+ * @param resourceGroupName The name of the resource group.
3769
+ * @param cacheName The name of the Redis cache.
3770
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3771
+ * Azure resource
3772
+ * @param options The options parameters.
3773
+ */
3774
+ delete(resourceGroupName, cacheName, privateEndpointConnectionName, options) {
3775
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, privateEndpointConnectionName, options }, deleteOperationSpec$4);
3776
+ }
3777
+ }
3778
+ // Operation Specifications
3779
+ const serializer$5 = coreClient.createSerializer(Mappers, /* isXml */ false);
3780
+ const listOperationSpec$3 = {
3781
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections",
3782
+ httpMethod: "GET",
3783
+ responses: {
3784
+ 200: {
3785
+ bodyMapper: PrivateEndpointConnectionListResult
3786
+ },
3787
+ default: {
3788
+ bodyMapper: ErrorResponse
3789
+ }
3790
+ },
3791
+ queryParameters: [apiVersion],
3792
+ urlParameters: [
3793
+ $host,
3794
+ subscriptionId,
3795
+ resourceGroupName,
3796
+ cacheName
3797
+ ],
3798
+ headerParameters: [accept],
3799
+ serializer: serializer$5
3800
+ };
3801
+ const getOperationSpec$4 = {
3802
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}",
3803
+ httpMethod: "GET",
3804
+ responses: {
3805
+ 200: {
3806
+ bodyMapper: PrivateEndpointConnection
3807
+ },
3808
+ default: {
3809
+ bodyMapper: ErrorResponse
3810
+ }
3811
+ },
3812
+ queryParameters: [apiVersion],
3813
+ urlParameters: [
3814
+ $host,
3815
+ subscriptionId,
3816
+ resourceGroupName,
3817
+ cacheName,
3818
+ privateEndpointConnectionName
3819
+ ],
3820
+ headerParameters: [accept],
3821
+ serializer: serializer$5
3822
+ };
3823
+ const putOperationSpec = {
3824
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}",
3825
+ httpMethod: "PUT",
3826
+ responses: {
3827
+ 200: {
3828
+ bodyMapper: PrivateEndpointConnection
3829
+ },
3830
+ 201: {
3831
+ bodyMapper: PrivateEndpointConnection
3832
+ },
3833
+ 202: {
3834
+ bodyMapper: PrivateEndpointConnection
3835
+ },
3836
+ 204: {
3837
+ bodyMapper: PrivateEndpointConnection
3838
+ },
3839
+ default: {
3840
+ bodyMapper: ErrorResponse
3841
+ }
3842
+ },
3843
+ requestBody: properties,
3844
+ queryParameters: [apiVersion],
3845
+ urlParameters: [
3846
+ $host,
3847
+ subscriptionId,
3848
+ resourceGroupName,
3849
+ cacheName,
3850
+ privateEndpointConnectionName
3851
+ ],
3852
+ headerParameters: [accept, contentType],
3853
+ mediaType: "json",
3854
+ serializer: serializer$5
3855
+ };
3856
+ const deleteOperationSpec$4 = {
3857
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}",
3858
+ httpMethod: "DELETE",
3859
+ responses: {
3860
+ 200: {},
3861
+ 204: {},
3862
+ default: {
3863
+ bodyMapper: ErrorResponse
3864
+ }
3865
+ },
3866
+ queryParameters: [apiVersion],
3867
+ urlParameters: [
3868
+ $host,
3869
+ subscriptionId,
3870
+ resourceGroupName,
3871
+ cacheName,
3872
+ privateEndpointConnectionName
3873
+ ],
3874
+ headerParameters: [accept],
3875
+ serializer: serializer$5
3876
+ };
3877
+
3878
+ /*
3879
+ * Copyright (c) Microsoft Corporation.
3880
+ * Licensed under the MIT License.
3881
+ *
3882
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3883
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3884
+ */
3885
+ /// <reference lib="esnext.asynciterable" />
3886
+ /** Class containing PrivateLinkResources operations. */
3887
+ class PrivateLinkResourcesImpl {
3888
+ /**
3889
+ * Initialize a new instance of the class PrivateLinkResources class.
3890
+ * @param client Reference to the service client
3891
+ */
3892
+ constructor(client) {
3893
+ this.client = client;
3894
+ }
3895
+ /**
3896
+ * Gets the private link resources that need to be created for a redis cache.
3897
+ * @param resourceGroupName The name of the resource group.
3898
+ * @param cacheName The name of the Redis cache.
3899
+ * @param options The options parameters.
3900
+ */
3901
+ listByRedisCache(resourceGroupName, cacheName, options) {
3902
+ const iter = this.listByRedisCachePagingAll(resourceGroupName, cacheName, options);
3903
+ return {
3904
+ next() {
3905
+ return iter.next();
3906
+ },
3907
+ [Symbol.asyncIterator]() {
3908
+ return this;
3909
+ },
3910
+ byPage: () => {
3911
+ return this.listByRedisCachePagingPage(resourceGroupName, cacheName, options);
3912
+ }
3913
+ };
3914
+ }
3915
+ listByRedisCachePagingPage(resourceGroupName, cacheName, options) {
3916
+ return tslib.__asyncGenerator(this, arguments, function* listByRedisCachePagingPage_1() {
3917
+ let result = yield tslib.__await(this._listByRedisCache(resourceGroupName, cacheName, options));
3918
+ yield yield tslib.__await(result.value || []);
3919
+ });
3920
+ }
3921
+ listByRedisCachePagingAll(resourceGroupName, cacheName, options) {
3922
+ return tslib.__asyncGenerator(this, arguments, function* listByRedisCachePagingAll_1() {
3923
+ var e_1, _a;
3924
+ try {
3925
+ for (var _b = tslib.__asyncValues(this.listByRedisCachePagingPage(resourceGroupName, cacheName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3926
+ const page = _c.value;
3927
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3928
+ }
3929
+ }
3930
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3931
+ finally {
3932
+ try {
3933
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3934
+ }
3935
+ finally { if (e_1) throw e_1.error; }
3936
+ }
3937
+ });
3938
+ }
3939
+ /**
3940
+ * Gets the private link resources that need to be created for a redis cache.
3941
+ * @param resourceGroupName The name of the resource group.
3942
+ * @param cacheName The name of the Redis cache.
3943
+ * @param options The options parameters.
3944
+ */
3945
+ _listByRedisCache(resourceGroupName, cacheName, options) {
3946
+ return this.client.sendOperationRequest({ resourceGroupName, cacheName, options }, listByRedisCacheOperationSpec);
3947
+ }
3948
+ }
3949
+ // Operation Specifications
3950
+ const serializer$6 = coreClient.createSerializer(Mappers, /* isXml */ false);
3951
+ const listByRedisCacheOperationSpec = {
3952
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateLinkResources",
3953
+ httpMethod: "GET",
3954
+ responses: {
3955
+ 200: {
3956
+ bodyMapper: PrivateLinkResourceListResult
3957
+ },
3958
+ default: {
3959
+ bodyMapper: ErrorResponse
3960
+ }
3961
+ },
3962
+ queryParameters: [apiVersion],
3963
+ urlParameters: [
3964
+ $host,
3965
+ subscriptionId,
3966
+ resourceGroupName,
3967
+ cacheName
3968
+ ],
3969
+ headerParameters: [accept],
3970
+ serializer: serializer$6
3971
+ };
3972
+
3973
+ /*
3974
+ * Copyright (c) Microsoft Corporation.
3975
+ * Licensed under the MIT License.
3976
+ *
3977
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3978
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3979
+ */
3980
+ class RedisManagementClientContext extends coreClient.ServiceClient {
3981
+ /**
3982
+ * Initializes a new instance of the RedisManagementClientContext class.
3983
+ * @param credentials Subscription credentials which uniquely identify client subscription.
3984
+ * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure
3985
+ * subscription. The subscription ID forms part of the URI for every service call.
3986
+ * @param options The parameter options
3987
+ */
3988
+ constructor(credentials, subscriptionId, options) {
3989
+ if (credentials === undefined) {
3990
+ throw new Error("'credentials' cannot be null");
3991
+ }
3992
+ if (subscriptionId === undefined) {
3993
+ throw new Error("'subscriptionId' cannot be null");
3994
+ }
3995
+ // Initializing default values for options
3996
+ if (!options) {
3997
+ options = {};
3998
+ }
3999
+ const defaults = {
4000
+ requestContentType: "application/json; charset=utf-8",
4001
+ credential: credentials
4002
+ };
4003
+ const packageDetails = `azsdk-js-arm-rediscache/30.0.0-beta.1`;
4004
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4005
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4006
+ : `${packageDetails}`;
4007
+ if (!options.credentialScopes) {
4008
+ options.credentialScopes = ["https://management.azure.com/.default"];
4009
+ }
4010
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
4011
+ userAgentPrefix
4012
+ }, baseUri: options.endpoint || "https://management.azure.com" });
4013
+ super(optionsWithDefaults);
4014
+ // Parameter assignments
4015
+ this.subscriptionId = subscriptionId;
4016
+ // Assigning values to Constant parameters
4017
+ this.$host = options.$host || "https://management.azure.com";
4018
+ this.apiVersion = options.apiVersion || "2020-12-01";
4019
+ }
4020
+ }
4021
+
4022
+ /*
4023
+ * Copyright (c) Microsoft Corporation.
4024
+ * Licensed under the MIT License.
4025
+ *
4026
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4027
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4028
+ */
4029
+ class RedisManagementClient extends RedisManagementClientContext {
4030
+ /**
4031
+ * Initializes a new instance of the RedisManagementClient class.
4032
+ * @param credentials Subscription credentials which uniquely identify client subscription.
4033
+ * @param subscriptionId Gets subscription credentials which uniquely identify the Microsoft Azure
4034
+ * subscription. The subscription ID forms part of the URI for every service call.
4035
+ * @param options The parameter options
4036
+ */
4037
+ constructor(credentials, subscriptionId, options) {
4038
+ super(credentials, subscriptionId, options);
4039
+ this.operations = new OperationsImpl(this);
4040
+ this.redis = new RedisImpl(this);
4041
+ this.firewallRules = new FirewallRulesImpl(this);
4042
+ this.patchSchedules = new PatchSchedulesImpl(this);
4043
+ this.linkedServer = new LinkedServerImpl(this);
4044
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
4045
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
4046
+ }
4047
+ }
4048
+
4049
+ exports.RedisManagementClient = RedisManagementClient;
4050
+ exports.RedisManagementClientContext = RedisManagementClientContext;
4051
+ //# sourceMappingURL=index.js.map