@azure/arm-hybridconnectivity 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +108 -0
  4. package/dist/index.js +1809 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js +63 -0
  11. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/endpointsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/endpointsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/endpointsDeleteSample.js +37 -0
  15. package/dist-esm/samples-dev/endpointsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/endpointsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/endpointsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/endpointsGetSample.js +54 -0
  19. package/dist-esm/samples-dev/endpointsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/endpointsListCredentialsSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/endpointsListCredentialsSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/endpointsListCredentialsSample.js +43 -0
  23. package/dist-esm/samples-dev/endpointsListCredentialsSample.js.map +1 -0
  24. package/dist-esm/samples-dev/endpointsListIngressGatewayCredentialsSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/endpointsListIngressGatewayCredentialsSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/endpointsListIngressGatewayCredentialsSample.js +41 -0
  27. package/dist-esm/samples-dev/endpointsListIngressGatewayCredentialsSample.js.map +1 -0
  28. package/dist-esm/samples-dev/endpointsListManagedProxyDetailsSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/endpointsListManagedProxyDetailsSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/endpointsListManagedProxyDetailsSample.js +42 -0
  31. package/dist-esm/samples-dev/endpointsListManagedProxyDetailsSample.js.map +1 -0
  32. package/dist-esm/samples-dev/endpointsListSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/endpointsListSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/endpointsListSample.js +57 -0
  35. package/dist-esm/samples-dev/endpointsListSample.js.map +1 -0
  36. package/dist-esm/samples-dev/endpointsUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/endpointsUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/endpointsUpdateSample.js +40 -0
  39. package/dist-esm/samples-dev/endpointsUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsListSample.js +56 -0
  43. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/serviceConfigurationsCreateOrupdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/serviceConfigurationsCreateOrupdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/serviceConfigurationsCreateOrupdateSample.js +64 -0
  47. package/dist-esm/samples-dev/serviceConfigurationsCreateOrupdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/serviceConfigurationsDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/serviceConfigurationsDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/serviceConfigurationsDeleteSample.js +38 -0
  51. package/dist-esm/samples-dev/serviceConfigurationsDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/serviceConfigurationsGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/serviceConfigurationsGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/serviceConfigurationsGetSample.js +56 -0
  55. package/dist-esm/samples-dev/serviceConfigurationsGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/serviceConfigurationsListByEndpointResourceSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/serviceConfigurationsListByEndpointResourceSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/serviceConfigurationsListByEndpointResourceSample.js +58 -0
  59. package/dist-esm/samples-dev/serviceConfigurationsListByEndpointResourceSample.js.map +1 -0
  60. package/dist-esm/samples-dev/serviceConfigurationsUpdateSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/serviceConfigurationsUpdateSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/serviceConfigurationsUpdateSample.js +41 -0
  63. package/dist-esm/samples-dev/serviceConfigurationsUpdateSample.js.map +1 -0
  64. package/dist-esm/src/hybridConnectivityManagementAPI.d.ts +20 -0
  65. package/dist-esm/src/hybridConnectivityManagementAPI.d.ts.map +1 -0
  66. package/dist-esm/src/hybridConnectivityManagementAPI.js +96 -0
  67. package/dist-esm/src/hybridConnectivityManagementAPI.js.map +1 -0
  68. package/dist-esm/src/index.d.ts +6 -0
  69. package/dist-esm/src/index.d.ts.map +1 -0
  70. package/dist-esm/src/index.js +13 -0
  71. package/dist-esm/src/index.js.map +1 -0
  72. package/dist-esm/src/models/index.d.ts +477 -0
  73. package/dist-esm/src/models/index.d.ts.map +1 -0
  74. package/dist-esm/src/models/index.js +66 -0
  75. package/dist-esm/src/models/index.js.map +1 -0
  76. package/dist-esm/src/models/mappers.d.ts +23 -0
  77. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  78. package/dist-esm/src/models/mappers.js +631 -0
  79. package/dist-esm/src/models/mappers.js.map +1 -0
  80. package/dist-esm/src/models/parameters.d.ts +17 -0
  81. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  82. package/dist-esm/src/models/parameters.js +135 -0
  83. package/dist-esm/src/models/parameters.js.map +1 -0
  84. package/dist-esm/src/operations/endpoints.d.ts +97 -0
  85. package/dist-esm/src/operations/endpoints.d.ts.map +1 -0
  86. package/dist-esm/src/operations/endpoints.js +370 -0
  87. package/dist-esm/src/operations/endpoints.js.map +1 -0
  88. package/dist-esm/src/operations/index.d.ts +4 -0
  89. package/dist-esm/src/operations/index.d.ts.map +1 -0
  90. package/dist-esm/src/operations/index.js +11 -0
  91. package/dist-esm/src/operations/index.js.map +1 -0
  92. package/dist-esm/src/operations/operations.d.ts +32 -0
  93. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operations/operations.js +138 -0
  95. package/dist-esm/src/operations/operations.js.map +1 -0
  96. package/dist-esm/src/operations/serviceConfigurations.d.ts +79 -0
  97. package/dist-esm/src/operations/serviceConfigurations.d.ts.map +1 -0
  98. package/dist-esm/src/operations/serviceConfigurations.js +304 -0
  99. package/dist-esm/src/operations/serviceConfigurations.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/endpoints.d.ts +72 -0
  101. package/dist-esm/src/operationsInterfaces/endpoints.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/endpoints.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/endpoints.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  105. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  107. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  109. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/serviceConfigurations.d.ts +52 -0
  113. package/dist-esm/src/operationsInterfaces/serviceConfigurations.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/serviceConfigurations.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/serviceConfigurations.js.map +1 -0
  116. package/dist-esm/src/pagingHelper.d.ts +13 -0
  117. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  118. package/dist-esm/src/pagingHelper.js +32 -0
  119. package/dist-esm/src/pagingHelper.js.map +1 -0
  120. package/dist-esm/test/hybridconnectivity_operations_test.spec.d.ts +4 -0
  121. package/dist-esm/test/hybridconnectivity_operations_test.spec.d.ts.map +1 -0
  122. package/dist-esm/test/hybridconnectivity_operations_test.spec.js +122 -0
  123. package/dist-esm/test/hybridconnectivity_operations_test.spec.js.map +1 -0
  124. package/package.json +122 -0
  125. package/review/arm-hybridconnectivity.api.md +388 -0
  126. package/rollup.config.js +122 -0
  127. package/src/hybridConnectivityManagementAPI.ts +144 -0
  128. package/src/index.ts +13 -0
  129. package/src/models/index.ts +552 -0
  130. package/src/models/mappers.ts +664 -0
  131. package/src/models/parameters.ts +162 -0
  132. package/src/operations/endpoints.ts +469 -0
  133. package/src/operations/index.ts +11 -0
  134. package/src/operations/operations.ts +149 -0
  135. package/src/operations/serviceConfigurations.ts +401 -0
  136. package/src/operationsInterfaces/endpoints.ts +132 -0
  137. package/src/operationsInterfaces/index.ts +11 -0
  138. package/src/operationsInterfaces/operations.ts +22 -0
  139. package/src/operationsInterfaces/serviceConfigurations.ts +98 -0
  140. package/src/pagingHelper.ts +39 -0
  141. package/tsconfig.json +33 -0
  142. package/types/arm-hybridconnectivity.d.ts +700 -0
  143. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,1809 @@
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 coreRestPipeline = require('@azure/core-rest-pipeline');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
28
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
29
+
30
+ /*
31
+ * Copyright (c) Microsoft Corporation.
32
+ * Licensed under the MIT License.
33
+ *
34
+ * Code generated by Microsoft (R) AutoRest Code Generator.
35
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
36
+ */
37
+ const pageMap = new WeakMap();
38
+ /**
39
+ * Given the last `.value` produced by the `byPage` iterator,
40
+ * returns a continuation token that can be used to begin paging from
41
+ * that point later.
42
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
43
+ * @returns The continuation token that can be passed into byPage() during future calls.
44
+ */
45
+ function getContinuationToken(page) {
46
+ var _a;
47
+ if (typeof page !== "object" || page === null) {
48
+ return undefined;
49
+ }
50
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
51
+ }
52
+ function setContinuationToken(page, continuationToken) {
53
+ var _a;
54
+ if (typeof page !== "object" || page === null || !continuationToken) {
55
+ return;
56
+ }
57
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
58
+ pageInfo.continuationToken = continuationToken;
59
+ pageMap.set(page, pageInfo);
60
+ }
61
+
62
+ /*
63
+ * Copyright (c) Microsoft Corporation.
64
+ * Licensed under the MIT License.
65
+ *
66
+ * Code generated by Microsoft (R) AutoRest Code Generator.
67
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
68
+ */
69
+ /** Known values of {@link Origin} that the service accepts. */
70
+ exports.KnownOrigin = void 0;
71
+ (function (KnownOrigin) {
72
+ /** User */
73
+ KnownOrigin["User"] = "user";
74
+ /** System */
75
+ KnownOrigin["System"] = "system";
76
+ /** UserSystem */
77
+ KnownOrigin["UserSystem"] = "user,system";
78
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
79
+ /** Known values of {@link ActionType} that the service accepts. */
80
+ exports.KnownActionType = void 0;
81
+ (function (KnownActionType) {
82
+ /** Internal */
83
+ KnownActionType["Internal"] = "Internal";
84
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
85
+ /** Known values of {@link Type} that the service accepts. */
86
+ exports.KnownType = void 0;
87
+ (function (KnownType) {
88
+ /** Default */
89
+ KnownType["Default"] = "default";
90
+ /** Custom */
91
+ KnownType["Custom"] = "custom";
92
+ })(exports.KnownType || (exports.KnownType = {}));
93
+ /** Known values of {@link CreatedByType} that the service accepts. */
94
+ exports.KnownCreatedByType = void 0;
95
+ (function (KnownCreatedByType) {
96
+ /** User */
97
+ KnownCreatedByType["User"] = "User";
98
+ /** Application */
99
+ KnownCreatedByType["Application"] = "Application";
100
+ /** ManagedIdentity */
101
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
102
+ /** Key */
103
+ KnownCreatedByType["Key"] = "Key";
104
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
105
+ /** Known values of {@link ServiceName} that the service accepts. */
106
+ exports.KnownServiceName = void 0;
107
+ (function (KnownServiceName) {
108
+ /** SSH */
109
+ KnownServiceName["SSH"] = "SSH";
110
+ /** WAC */
111
+ KnownServiceName["WAC"] = "WAC";
112
+ })(exports.KnownServiceName || (exports.KnownServiceName = {}));
113
+ /** Known values of {@link ProvisioningState} that the service accepts. */
114
+ exports.KnownProvisioningState = void 0;
115
+ (function (KnownProvisioningState) {
116
+ /** Succeeded */
117
+ KnownProvisioningState["Succeeded"] = "Succeeded";
118
+ /** Creating */
119
+ KnownProvisioningState["Creating"] = "Creating";
120
+ /** Updating */
121
+ KnownProvisioningState["Updating"] = "Updating";
122
+ /** Failed */
123
+ KnownProvisioningState["Failed"] = "Failed";
124
+ /** Canceled */
125
+ KnownProvisioningState["Canceled"] = "Canceled";
126
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
127
+
128
+ /*
129
+ * Copyright (c) Microsoft Corporation.
130
+ * Licensed under the MIT License.
131
+ *
132
+ * Code generated by Microsoft (R) AutoRest Code Generator.
133
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
134
+ */
135
+ const OperationListResult = {
136
+ type: {
137
+ name: "Composite",
138
+ className: "OperationListResult",
139
+ modelProperties: {
140
+ value: {
141
+ serializedName: "value",
142
+ readOnly: true,
143
+ type: {
144
+ name: "Sequence",
145
+ element: {
146
+ type: {
147
+ name: "Composite",
148
+ className: "Operation"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ nextLink: {
154
+ serializedName: "nextLink",
155
+ readOnly: true,
156
+ type: {
157
+ name: "String"
158
+ }
159
+ }
160
+ }
161
+ }
162
+ };
163
+ const Operation = {
164
+ type: {
165
+ name: "Composite",
166
+ className: "Operation",
167
+ modelProperties: {
168
+ name: {
169
+ serializedName: "name",
170
+ readOnly: true,
171
+ type: {
172
+ name: "String"
173
+ }
174
+ },
175
+ isDataAction: {
176
+ serializedName: "isDataAction",
177
+ readOnly: true,
178
+ type: {
179
+ name: "Boolean"
180
+ }
181
+ },
182
+ display: {
183
+ serializedName: "display",
184
+ type: {
185
+ name: "Composite",
186
+ className: "OperationDisplay"
187
+ }
188
+ },
189
+ origin: {
190
+ serializedName: "origin",
191
+ readOnly: true,
192
+ type: {
193
+ name: "String"
194
+ }
195
+ },
196
+ actionType: {
197
+ serializedName: "actionType",
198
+ readOnly: true,
199
+ type: {
200
+ name: "String"
201
+ }
202
+ }
203
+ }
204
+ }
205
+ };
206
+ const OperationDisplay = {
207
+ type: {
208
+ name: "Composite",
209
+ className: "OperationDisplay",
210
+ modelProperties: {
211
+ provider: {
212
+ serializedName: "provider",
213
+ readOnly: true,
214
+ type: {
215
+ name: "String"
216
+ }
217
+ },
218
+ resource: {
219
+ serializedName: "resource",
220
+ readOnly: true,
221
+ type: {
222
+ name: "String"
223
+ }
224
+ },
225
+ operation: {
226
+ serializedName: "operation",
227
+ readOnly: true,
228
+ type: {
229
+ name: "String"
230
+ }
231
+ },
232
+ description: {
233
+ serializedName: "description",
234
+ readOnly: true,
235
+ type: {
236
+ name: "String"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ };
242
+ const ErrorResponse = {
243
+ type: {
244
+ name: "Composite",
245
+ className: "ErrorResponse",
246
+ modelProperties: {
247
+ error: {
248
+ serializedName: "error",
249
+ type: {
250
+ name: "Composite",
251
+ className: "ErrorDetail"
252
+ }
253
+ }
254
+ }
255
+ }
256
+ };
257
+ const ErrorDetail = {
258
+ type: {
259
+ name: "Composite",
260
+ className: "ErrorDetail",
261
+ modelProperties: {
262
+ code: {
263
+ serializedName: "code",
264
+ readOnly: true,
265
+ type: {
266
+ name: "String"
267
+ }
268
+ },
269
+ message: {
270
+ serializedName: "message",
271
+ readOnly: true,
272
+ type: {
273
+ name: "String"
274
+ }
275
+ },
276
+ target: {
277
+ serializedName: "target",
278
+ readOnly: true,
279
+ type: {
280
+ name: "String"
281
+ }
282
+ },
283
+ details: {
284
+ serializedName: "details",
285
+ readOnly: true,
286
+ type: {
287
+ name: "Sequence",
288
+ element: {
289
+ type: {
290
+ name: "Composite",
291
+ className: "ErrorDetail"
292
+ }
293
+ }
294
+ }
295
+ },
296
+ additionalInfo: {
297
+ serializedName: "additionalInfo",
298
+ readOnly: true,
299
+ type: {
300
+ name: "Sequence",
301
+ element: {
302
+ type: {
303
+ name: "Composite",
304
+ className: "ErrorAdditionalInfo"
305
+ }
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ };
312
+ const ErrorAdditionalInfo = {
313
+ type: {
314
+ name: "Composite",
315
+ className: "ErrorAdditionalInfo",
316
+ modelProperties: {
317
+ type: {
318
+ serializedName: "type",
319
+ readOnly: true,
320
+ type: {
321
+ name: "String"
322
+ }
323
+ },
324
+ info: {
325
+ serializedName: "info",
326
+ readOnly: true,
327
+ type: {
328
+ name: "Dictionary",
329
+ value: { type: { name: "any" } }
330
+ }
331
+ }
332
+ }
333
+ }
334
+ };
335
+ const EndpointsList = {
336
+ type: {
337
+ name: "Composite",
338
+ className: "EndpointsList",
339
+ modelProperties: {
340
+ nextLink: {
341
+ serializedName: "nextLink",
342
+ type: {
343
+ name: "String"
344
+ }
345
+ },
346
+ value: {
347
+ serializedName: "value",
348
+ type: {
349
+ name: "Sequence",
350
+ element: {
351
+ type: {
352
+ name: "Composite",
353
+ className: "EndpointResource"
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ };
361
+ const EndpointProperties = {
362
+ type: {
363
+ name: "Composite",
364
+ className: "EndpointProperties",
365
+ modelProperties: {
366
+ type: {
367
+ serializedName: "type",
368
+ required: true,
369
+ type: {
370
+ name: "String"
371
+ }
372
+ },
373
+ resourceId: {
374
+ serializedName: "resourceId",
375
+ type: {
376
+ name: "String"
377
+ }
378
+ },
379
+ provisioningState: {
380
+ serializedName: "provisioningState",
381
+ readOnly: true,
382
+ type: {
383
+ name: "String"
384
+ }
385
+ }
386
+ }
387
+ }
388
+ };
389
+ const Resource = {
390
+ type: {
391
+ name: "Composite",
392
+ className: "Resource",
393
+ modelProperties: {
394
+ id: {
395
+ serializedName: "id",
396
+ readOnly: true,
397
+ type: {
398
+ name: "String"
399
+ }
400
+ },
401
+ name: {
402
+ serializedName: "name",
403
+ readOnly: true,
404
+ type: {
405
+ name: "String"
406
+ }
407
+ },
408
+ type: {
409
+ serializedName: "type",
410
+ readOnly: true,
411
+ type: {
412
+ name: "String"
413
+ }
414
+ },
415
+ systemData: {
416
+ serializedName: "systemData",
417
+ type: {
418
+ name: "Composite",
419
+ className: "SystemData"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ };
425
+ const SystemData = {
426
+ type: {
427
+ name: "Composite",
428
+ className: "SystemData",
429
+ modelProperties: {
430
+ createdBy: {
431
+ serializedName: "createdBy",
432
+ type: {
433
+ name: "String"
434
+ }
435
+ },
436
+ createdByType: {
437
+ serializedName: "createdByType",
438
+ type: {
439
+ name: "String"
440
+ }
441
+ },
442
+ createdAt: {
443
+ serializedName: "createdAt",
444
+ type: {
445
+ name: "DateTime"
446
+ }
447
+ },
448
+ lastModifiedBy: {
449
+ serializedName: "lastModifiedBy",
450
+ type: {
451
+ name: "String"
452
+ }
453
+ },
454
+ lastModifiedByType: {
455
+ serializedName: "lastModifiedByType",
456
+ type: {
457
+ name: "String"
458
+ }
459
+ },
460
+ lastModifiedAt: {
461
+ serializedName: "lastModifiedAt",
462
+ type: {
463
+ name: "DateTime"
464
+ }
465
+ }
466
+ }
467
+ }
468
+ };
469
+ const ServiceConfigurationList = {
470
+ type: {
471
+ name: "Composite",
472
+ className: "ServiceConfigurationList",
473
+ modelProperties: {
474
+ value: {
475
+ serializedName: "value",
476
+ type: {
477
+ name: "Sequence",
478
+ element: {
479
+ type: {
480
+ name: "Composite",
481
+ className: "ServiceConfigurationResource"
482
+ }
483
+ }
484
+ }
485
+ },
486
+ nextLink: {
487
+ serializedName: "nextLink",
488
+ type: {
489
+ name: "String"
490
+ }
491
+ }
492
+ }
493
+ }
494
+ };
495
+ const ServiceConfigurationResourcePatch = {
496
+ type: {
497
+ name: "Composite",
498
+ className: "ServiceConfigurationResourcePatch",
499
+ modelProperties: {
500
+ port: {
501
+ serializedName: "properties.port",
502
+ type: {
503
+ name: "Number"
504
+ }
505
+ }
506
+ }
507
+ }
508
+ };
509
+ const ListCredentialsRequest = {
510
+ type: {
511
+ name: "Composite",
512
+ className: "ListCredentialsRequest",
513
+ modelProperties: {
514
+ serviceName: {
515
+ serializedName: "serviceName",
516
+ type: {
517
+ name: "String"
518
+ }
519
+ }
520
+ }
521
+ }
522
+ };
523
+ const EndpointAccessResource = {
524
+ type: {
525
+ name: "Composite",
526
+ className: "EndpointAccessResource",
527
+ modelProperties: {
528
+ namespaceName: {
529
+ constraints: {
530
+ MaxLength: 200,
531
+ MinLength: 1
532
+ },
533
+ serializedName: "relay.namespaceName",
534
+ type: {
535
+ name: "String"
536
+ }
537
+ },
538
+ namespaceNameSuffix: {
539
+ constraints: {
540
+ MaxLength: 100,
541
+ MinLength: 1
542
+ },
543
+ serializedName: "relay.namespaceNameSuffix",
544
+ type: {
545
+ name: "String"
546
+ }
547
+ },
548
+ hybridConnectionName: {
549
+ serializedName: "relay.hybridConnectionName",
550
+ type: {
551
+ name: "String"
552
+ }
553
+ },
554
+ accessKey: {
555
+ serializedName: "relay.accessKey",
556
+ readOnly: true,
557
+ type: {
558
+ name: "String"
559
+ }
560
+ },
561
+ expiresOn: {
562
+ serializedName: "relay.expiresOn",
563
+ type: {
564
+ name: "Number"
565
+ }
566
+ },
567
+ serviceConfigurationToken: {
568
+ serializedName: "relay.serviceConfigurationToken",
569
+ type: {
570
+ name: "String"
571
+ }
572
+ }
573
+ }
574
+ }
575
+ };
576
+ const ListIngressGatewayCredentialsRequest = {
577
+ type: {
578
+ name: "Composite",
579
+ className: "ListIngressGatewayCredentialsRequest",
580
+ modelProperties: {
581
+ serviceName: {
582
+ serializedName: "serviceName",
583
+ type: {
584
+ name: "String"
585
+ }
586
+ }
587
+ }
588
+ }
589
+ };
590
+ const IngressGatewayResource = {
591
+ type: {
592
+ name: "Composite",
593
+ className: "IngressGatewayResource",
594
+ modelProperties: {
595
+ hostname: {
596
+ serializedName: "ingress.hostname",
597
+ type: {
598
+ name: "String"
599
+ }
600
+ },
601
+ serverId: {
602
+ serializedName: "ingress.aadProfile.serverId",
603
+ type: {
604
+ name: "String"
605
+ }
606
+ },
607
+ tenantId: {
608
+ serializedName: "ingress.aadProfile.tenantId",
609
+ type: {
610
+ name: "String"
611
+ }
612
+ },
613
+ namespaceName: {
614
+ constraints: {
615
+ MaxLength: 200,
616
+ MinLength: 1
617
+ },
618
+ serializedName: "relay.namespaceName",
619
+ type: {
620
+ name: "String"
621
+ }
622
+ },
623
+ namespaceNameSuffix: {
624
+ constraints: {
625
+ MaxLength: 100,
626
+ MinLength: 1
627
+ },
628
+ serializedName: "relay.namespaceNameSuffix",
629
+ type: {
630
+ name: "String"
631
+ }
632
+ },
633
+ hybridConnectionName: {
634
+ serializedName: "relay.hybridConnectionName",
635
+ type: {
636
+ name: "String"
637
+ }
638
+ },
639
+ accessKey: {
640
+ serializedName: "relay.accessKey",
641
+ readOnly: true,
642
+ type: {
643
+ name: "String"
644
+ }
645
+ },
646
+ expiresOn: {
647
+ serializedName: "relay.expiresOn",
648
+ type: {
649
+ name: "Number"
650
+ }
651
+ },
652
+ serviceConfigurationToken: {
653
+ serializedName: "relay.serviceConfigurationToken",
654
+ type: {
655
+ name: "String"
656
+ }
657
+ }
658
+ }
659
+ }
660
+ };
661
+ const ManagedProxyRequest = {
662
+ type: {
663
+ name: "Composite",
664
+ className: "ManagedProxyRequest",
665
+ modelProperties: {
666
+ service: {
667
+ serializedName: "service",
668
+ required: true,
669
+ type: {
670
+ name: "String"
671
+ }
672
+ },
673
+ hostname: {
674
+ serializedName: "hostname",
675
+ type: {
676
+ name: "String"
677
+ }
678
+ },
679
+ serviceName: {
680
+ serializedName: "serviceName",
681
+ type: {
682
+ name: "String"
683
+ }
684
+ }
685
+ }
686
+ }
687
+ };
688
+ const ManagedProxyResource = {
689
+ type: {
690
+ name: "Composite",
691
+ className: "ManagedProxyResource",
692
+ modelProperties: {
693
+ proxy: {
694
+ serializedName: "proxy",
695
+ required: true,
696
+ type: {
697
+ name: "String"
698
+ }
699
+ },
700
+ expiresOn: {
701
+ serializedName: "expiresOn",
702
+ required: true,
703
+ type: {
704
+ name: "Number"
705
+ }
706
+ }
707
+ }
708
+ }
709
+ };
710
+ const ProxyResource = {
711
+ type: {
712
+ name: "Composite",
713
+ className: "ProxyResource",
714
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
715
+ }
716
+ };
717
+ const EndpointResource = {
718
+ type: {
719
+ name: "Composite",
720
+ className: "EndpointResource",
721
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { properties: {
722
+ serializedName: "properties",
723
+ type: {
724
+ name: "Composite",
725
+ className: "EndpointProperties"
726
+ }
727
+ } })
728
+ }
729
+ };
730
+ const ServiceConfigurationResource = {
731
+ type: {
732
+ name: "Composite",
733
+ className: "ServiceConfigurationResource",
734
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { serviceName: {
735
+ serializedName: "properties.serviceName",
736
+ type: {
737
+ name: "String"
738
+ }
739
+ }, resourceId: {
740
+ serializedName: "properties.resourceId",
741
+ type: {
742
+ name: "String"
743
+ }
744
+ }, port: {
745
+ serializedName: "properties.port",
746
+ type: {
747
+ name: "Number"
748
+ }
749
+ }, provisioningState: {
750
+ serializedName: "properties.provisioningState",
751
+ readOnly: true,
752
+ type: {
753
+ name: "String"
754
+ }
755
+ } })
756
+ }
757
+ };
758
+
759
+ var Mappers = /*#__PURE__*/Object.freeze({
760
+ __proto__: null,
761
+ OperationListResult: OperationListResult,
762
+ Operation: Operation,
763
+ OperationDisplay: OperationDisplay,
764
+ ErrorResponse: ErrorResponse,
765
+ ErrorDetail: ErrorDetail,
766
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
767
+ EndpointsList: EndpointsList,
768
+ EndpointProperties: EndpointProperties,
769
+ Resource: Resource,
770
+ SystemData: SystemData,
771
+ ServiceConfigurationList: ServiceConfigurationList,
772
+ ServiceConfigurationResourcePatch: ServiceConfigurationResourcePatch,
773
+ ListCredentialsRequest: ListCredentialsRequest,
774
+ EndpointAccessResource: EndpointAccessResource,
775
+ ListIngressGatewayCredentialsRequest: ListIngressGatewayCredentialsRequest,
776
+ IngressGatewayResource: IngressGatewayResource,
777
+ ManagedProxyRequest: ManagedProxyRequest,
778
+ ManagedProxyResource: ManagedProxyResource,
779
+ ProxyResource: ProxyResource,
780
+ EndpointResource: EndpointResource,
781
+ ServiceConfigurationResource: ServiceConfigurationResource
782
+ });
783
+
784
+ /*
785
+ * Copyright (c) Microsoft Corporation.
786
+ * Licensed under the MIT License.
787
+ *
788
+ * Code generated by Microsoft (R) AutoRest Code Generator.
789
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
790
+ */
791
+ const accept = {
792
+ parameterPath: "accept",
793
+ mapper: {
794
+ defaultValue: "application/json",
795
+ isConstant: true,
796
+ serializedName: "Accept",
797
+ type: {
798
+ name: "String"
799
+ }
800
+ }
801
+ };
802
+ const $host = {
803
+ parameterPath: "$host",
804
+ mapper: {
805
+ serializedName: "$host",
806
+ required: true,
807
+ type: {
808
+ name: "String"
809
+ }
810
+ },
811
+ skipEncoding: true
812
+ };
813
+ const apiVersion = {
814
+ parameterPath: "apiVersion",
815
+ mapper: {
816
+ defaultValue: "2023-03-15",
817
+ isConstant: true,
818
+ serializedName: "api-version",
819
+ type: {
820
+ name: "String"
821
+ }
822
+ }
823
+ };
824
+ const nextLink = {
825
+ parameterPath: "nextLink",
826
+ mapper: {
827
+ serializedName: "nextLink",
828
+ required: true,
829
+ type: {
830
+ name: "String"
831
+ }
832
+ },
833
+ skipEncoding: true
834
+ };
835
+ const resourceUri = {
836
+ parameterPath: "resourceUri",
837
+ mapper: {
838
+ serializedName: "resourceUri",
839
+ required: true,
840
+ type: {
841
+ name: "String"
842
+ }
843
+ },
844
+ skipEncoding: true
845
+ };
846
+ const endpointName = {
847
+ parameterPath: "endpointName",
848
+ mapper: {
849
+ serializedName: "endpointName",
850
+ required: true,
851
+ type: {
852
+ name: "String"
853
+ }
854
+ },
855
+ skipEncoding: true
856
+ };
857
+ const contentType = {
858
+ parameterPath: ["options", "contentType"],
859
+ mapper: {
860
+ defaultValue: "application/json",
861
+ isConstant: true,
862
+ serializedName: "Content-Type",
863
+ type: {
864
+ name: "String"
865
+ }
866
+ }
867
+ };
868
+ const endpointResource = {
869
+ parameterPath: "endpointResource",
870
+ mapper: EndpointResource
871
+ };
872
+ const listCredentialsRequest = {
873
+ parameterPath: ["options", "listCredentialsRequest"],
874
+ mapper: ListCredentialsRequest
875
+ };
876
+ const expiresin = {
877
+ parameterPath: ["options", "expiresin"],
878
+ mapper: {
879
+ defaultValue: 10800,
880
+ constraints: {
881
+ InclusiveMaximum: 10800,
882
+ InclusiveMinimum: 600
883
+ },
884
+ serializedName: "expiresin",
885
+ type: {
886
+ name: "Number"
887
+ }
888
+ }
889
+ };
890
+ const listIngressGatewayCredentialsRequest = {
891
+ parameterPath: ["options", "listIngressGatewayCredentialsRequest"],
892
+ mapper: ListIngressGatewayCredentialsRequest
893
+ };
894
+ const managedProxyRequest = {
895
+ parameterPath: "managedProxyRequest",
896
+ mapper: ManagedProxyRequest
897
+ };
898
+ const serviceConfigurationName = {
899
+ parameterPath: "serviceConfigurationName",
900
+ mapper: {
901
+ serializedName: "serviceConfigurationName",
902
+ required: true,
903
+ type: {
904
+ name: "String"
905
+ }
906
+ },
907
+ skipEncoding: true
908
+ };
909
+ const serviceConfigurationResource = {
910
+ parameterPath: "serviceConfigurationResource",
911
+ mapper: ServiceConfigurationResource
912
+ };
913
+ const serviceConfigurationResource1 = {
914
+ parameterPath: "serviceConfigurationResource",
915
+ mapper: ServiceConfigurationResourcePatch
916
+ };
917
+
918
+ /*
919
+ * Copyright (c) Microsoft Corporation.
920
+ * Licensed under the MIT License.
921
+ *
922
+ * Code generated by Microsoft (R) AutoRest Code Generator.
923
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
924
+ */
925
+ /// <reference lib="esnext.asynciterable" />
926
+ /** Class containing Operations operations. */
927
+ class OperationsImpl {
928
+ /**
929
+ * Initialize a new instance of the class Operations class.
930
+ * @param client Reference to the service client
931
+ */
932
+ constructor(client) {
933
+ this.client = client;
934
+ }
935
+ /**
936
+ * Lists the available Hybrid Connectivity REST API operations.
937
+ * @param options The options parameters.
938
+ */
939
+ list(options) {
940
+ const iter = this.listPagingAll(options);
941
+ return {
942
+ next() {
943
+ return iter.next();
944
+ },
945
+ [Symbol.asyncIterator]() {
946
+ return this;
947
+ },
948
+ byPage: (settings) => {
949
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
950
+ throw new Error("maxPageSize is not supported by this operation.");
951
+ }
952
+ return this.listPagingPage(options, settings);
953
+ }
954
+ };
955
+ }
956
+ listPagingPage(options, settings) {
957
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
958
+ let result;
959
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
960
+ if (!continuationToken) {
961
+ result = yield tslib.__await(this._list(options));
962
+ let page = result.value || [];
963
+ continuationToken = result.nextLink;
964
+ setContinuationToken(page, continuationToken);
965
+ yield yield tslib.__await(page);
966
+ }
967
+ while (continuationToken) {
968
+ result = yield tslib.__await(this._listNext(continuationToken, options));
969
+ continuationToken = result.nextLink;
970
+ let page = result.value || [];
971
+ setContinuationToken(page, continuationToken);
972
+ yield yield tslib.__await(page);
973
+ }
974
+ });
975
+ }
976
+ listPagingAll(options) {
977
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
978
+ var _a, e_1, _b, _c;
979
+ try {
980
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
981
+ _c = _f.value;
982
+ _d = false;
983
+ try {
984
+ const page = _c;
985
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
986
+ }
987
+ finally {
988
+ _d = true;
989
+ }
990
+ }
991
+ }
992
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
993
+ finally {
994
+ try {
995
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
996
+ }
997
+ finally { if (e_1) throw e_1.error; }
998
+ }
999
+ });
1000
+ }
1001
+ /**
1002
+ * Lists the available Hybrid Connectivity REST API operations.
1003
+ * @param options The options parameters.
1004
+ */
1005
+ _list(options) {
1006
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1007
+ }
1008
+ /**
1009
+ * ListNext
1010
+ * @param nextLink The nextLink from the previous successful call to the List method.
1011
+ * @param options The options parameters.
1012
+ */
1013
+ _listNext(nextLink, options) {
1014
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
1015
+ }
1016
+ }
1017
+ // Operation Specifications
1018
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1019
+ const listOperationSpec$1 = {
1020
+ path: "/providers/Microsoft.HybridConnectivity/operations",
1021
+ httpMethod: "GET",
1022
+ responses: {
1023
+ 200: {
1024
+ bodyMapper: OperationListResult
1025
+ },
1026
+ default: {
1027
+ bodyMapper: ErrorResponse
1028
+ }
1029
+ },
1030
+ queryParameters: [apiVersion],
1031
+ urlParameters: [$host],
1032
+ headerParameters: [accept],
1033
+ serializer: serializer$2
1034
+ };
1035
+ const listNextOperationSpec$1 = {
1036
+ path: "{nextLink}",
1037
+ httpMethod: "GET",
1038
+ responses: {
1039
+ 200: {
1040
+ bodyMapper: OperationListResult
1041
+ },
1042
+ default: {
1043
+ bodyMapper: ErrorResponse
1044
+ }
1045
+ },
1046
+ urlParameters: [$host, nextLink],
1047
+ headerParameters: [accept],
1048
+ serializer: serializer$2
1049
+ };
1050
+
1051
+ /*
1052
+ * Copyright (c) Microsoft Corporation.
1053
+ * Licensed under the MIT License.
1054
+ *
1055
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1056
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1057
+ */
1058
+ /// <reference lib="esnext.asynciterable" />
1059
+ /** Class containing Endpoints operations. */
1060
+ class EndpointsImpl {
1061
+ /**
1062
+ * Initialize a new instance of the class Endpoints class.
1063
+ * @param client Reference to the service client
1064
+ */
1065
+ constructor(client) {
1066
+ this.client = client;
1067
+ }
1068
+ /**
1069
+ * List of endpoints to the target resource.
1070
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1071
+ * connected.
1072
+ * @param options The options parameters.
1073
+ */
1074
+ list(resourceUri, options) {
1075
+ const iter = this.listPagingAll(resourceUri, options);
1076
+ return {
1077
+ next() {
1078
+ return iter.next();
1079
+ },
1080
+ [Symbol.asyncIterator]() {
1081
+ return this;
1082
+ },
1083
+ byPage: (settings) => {
1084
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1085
+ throw new Error("maxPageSize is not supported by this operation.");
1086
+ }
1087
+ return this.listPagingPage(resourceUri, options, settings);
1088
+ }
1089
+ };
1090
+ }
1091
+ listPagingPage(resourceUri, options, settings) {
1092
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1093
+ let result;
1094
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1095
+ if (!continuationToken) {
1096
+ result = yield tslib.__await(this._list(resourceUri, options));
1097
+ let page = result.value || [];
1098
+ continuationToken = result.nextLink;
1099
+ setContinuationToken(page, continuationToken);
1100
+ yield yield tslib.__await(page);
1101
+ }
1102
+ while (continuationToken) {
1103
+ result = yield tslib.__await(this._listNext(resourceUri, continuationToken, options));
1104
+ continuationToken = result.nextLink;
1105
+ let page = result.value || [];
1106
+ setContinuationToken(page, continuationToken);
1107
+ yield yield tslib.__await(page);
1108
+ }
1109
+ });
1110
+ }
1111
+ listPagingAll(resourceUri, options) {
1112
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1113
+ var _a, e_1, _b, _c;
1114
+ try {
1115
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1116
+ _c = _f.value;
1117
+ _d = false;
1118
+ try {
1119
+ const page = _c;
1120
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1121
+ }
1122
+ finally {
1123
+ _d = true;
1124
+ }
1125
+ }
1126
+ }
1127
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1128
+ finally {
1129
+ try {
1130
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1131
+ }
1132
+ finally { if (e_1) throw e_1.error; }
1133
+ }
1134
+ });
1135
+ }
1136
+ /**
1137
+ * List of endpoints to the target resource.
1138
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1139
+ * connected.
1140
+ * @param options The options parameters.
1141
+ */
1142
+ _list(resourceUri, options) {
1143
+ return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec);
1144
+ }
1145
+ /**
1146
+ * Gets the endpoint to the resource.
1147
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1148
+ * connected.
1149
+ * @param endpointName The endpoint name.
1150
+ * @param options The options parameters.
1151
+ */
1152
+ get(resourceUri, endpointName, options) {
1153
+ return this.client.sendOperationRequest({ resourceUri, endpointName, options }, getOperationSpec$1);
1154
+ }
1155
+ /**
1156
+ * Create or update the endpoint to the target resource.
1157
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1158
+ * connected.
1159
+ * @param endpointName The endpoint name.
1160
+ * @param endpointResource Endpoint details
1161
+ * @param options The options parameters.
1162
+ */
1163
+ createOrUpdate(resourceUri, endpointName, endpointResource, options) {
1164
+ return this.client.sendOperationRequest({ resourceUri, endpointName, endpointResource, options }, createOrUpdateOperationSpec);
1165
+ }
1166
+ /**
1167
+ * Update the endpoint to the target resource.
1168
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1169
+ * connected.
1170
+ * @param endpointName The endpoint name.
1171
+ * @param endpointResource Endpoint details
1172
+ * @param options The options parameters.
1173
+ */
1174
+ update(resourceUri, endpointName, endpointResource, options) {
1175
+ return this.client.sendOperationRequest({ resourceUri, endpointName, endpointResource, options }, updateOperationSpec$1);
1176
+ }
1177
+ /**
1178
+ * Deletes the endpoint access to the target resource.
1179
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1180
+ * connected.
1181
+ * @param endpointName The endpoint name.
1182
+ * @param options The options parameters.
1183
+ */
1184
+ delete(resourceUri, endpointName, options) {
1185
+ return this.client.sendOperationRequest({ resourceUri, endpointName, options }, deleteOperationSpec$1);
1186
+ }
1187
+ /**
1188
+ * Gets the endpoint access credentials to the resource.
1189
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1190
+ * connected.
1191
+ * @param endpointName The endpoint name.
1192
+ * @param options The options parameters.
1193
+ */
1194
+ listCredentials(resourceUri, endpointName, options) {
1195
+ return this.client.sendOperationRequest({ resourceUri, endpointName, options }, listCredentialsOperationSpec);
1196
+ }
1197
+ /**
1198
+ * Gets the ingress gateway endpoint credentials
1199
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1200
+ * connected.
1201
+ * @param endpointName The endpoint name.
1202
+ * @param options The options parameters.
1203
+ */
1204
+ listIngressGatewayCredentials(resourceUri, endpointName, options) {
1205
+ return this.client.sendOperationRequest({ resourceUri, endpointName, options }, listIngressGatewayCredentialsOperationSpec);
1206
+ }
1207
+ /**
1208
+ * Fetches the managed proxy details
1209
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1210
+ * connected.
1211
+ * @param endpointName The endpoint name.
1212
+ * @param managedProxyRequest Object of type ManagedProxyRequest
1213
+ * @param options The options parameters.
1214
+ */
1215
+ listManagedProxyDetails(resourceUri, endpointName, managedProxyRequest, options) {
1216
+ return this.client.sendOperationRequest({ resourceUri, endpointName, managedProxyRequest, options }, listManagedProxyDetailsOperationSpec);
1217
+ }
1218
+ /**
1219
+ * ListNext
1220
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1221
+ * connected.
1222
+ * @param nextLink The nextLink from the previous successful call to the List method.
1223
+ * @param options The options parameters.
1224
+ */
1225
+ _listNext(resourceUri, nextLink, options) {
1226
+ return this.client.sendOperationRequest({ resourceUri, nextLink, options }, listNextOperationSpec);
1227
+ }
1228
+ }
1229
+ // Operation Specifications
1230
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1231
+ const listOperationSpec = {
1232
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints",
1233
+ httpMethod: "GET",
1234
+ responses: {
1235
+ 200: {
1236
+ bodyMapper: EndpointsList
1237
+ },
1238
+ default: {
1239
+ bodyMapper: ErrorResponse
1240
+ }
1241
+ },
1242
+ queryParameters: [apiVersion],
1243
+ urlParameters: [$host, resourceUri],
1244
+ headerParameters: [accept],
1245
+ serializer: serializer$1
1246
+ };
1247
+ const getOperationSpec$1 = {
1248
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
1249
+ httpMethod: "GET",
1250
+ responses: {
1251
+ 200: {
1252
+ bodyMapper: EndpointResource
1253
+ },
1254
+ default: {
1255
+ bodyMapper: ErrorResponse
1256
+ }
1257
+ },
1258
+ queryParameters: [apiVersion],
1259
+ urlParameters: [
1260
+ $host,
1261
+ resourceUri,
1262
+ endpointName
1263
+ ],
1264
+ headerParameters: [accept],
1265
+ serializer: serializer$1
1266
+ };
1267
+ const createOrUpdateOperationSpec = {
1268
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
1269
+ httpMethod: "PUT",
1270
+ responses: {
1271
+ 200: {
1272
+ bodyMapper: EndpointResource
1273
+ },
1274
+ default: {
1275
+ bodyMapper: ErrorResponse
1276
+ }
1277
+ },
1278
+ requestBody: endpointResource,
1279
+ queryParameters: [apiVersion],
1280
+ urlParameters: [
1281
+ $host,
1282
+ resourceUri,
1283
+ endpointName
1284
+ ],
1285
+ headerParameters: [accept, contentType],
1286
+ mediaType: "json",
1287
+ serializer: serializer$1
1288
+ };
1289
+ const updateOperationSpec$1 = {
1290
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
1291
+ httpMethod: "PATCH",
1292
+ responses: {
1293
+ 200: {
1294
+ bodyMapper: EndpointResource
1295
+ },
1296
+ default: {
1297
+ bodyMapper: ErrorResponse
1298
+ }
1299
+ },
1300
+ requestBody: endpointResource,
1301
+ queryParameters: [apiVersion],
1302
+ urlParameters: [
1303
+ $host,
1304
+ resourceUri,
1305
+ endpointName
1306
+ ],
1307
+ headerParameters: [accept, contentType],
1308
+ mediaType: "json",
1309
+ serializer: serializer$1
1310
+ };
1311
+ const deleteOperationSpec$1 = {
1312
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
1313
+ httpMethod: "DELETE",
1314
+ responses: {
1315
+ 200: {},
1316
+ 204: {},
1317
+ default: {
1318
+ bodyMapper: ErrorResponse
1319
+ }
1320
+ },
1321
+ queryParameters: [apiVersion],
1322
+ urlParameters: [
1323
+ $host,
1324
+ resourceUri,
1325
+ endpointName
1326
+ ],
1327
+ headerParameters: [accept],
1328
+ serializer: serializer$1
1329
+ };
1330
+ const listCredentialsOperationSpec = {
1331
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/listCredentials",
1332
+ httpMethod: "POST",
1333
+ responses: {
1334
+ 200: {
1335
+ bodyMapper: EndpointAccessResource
1336
+ },
1337
+ default: {
1338
+ bodyMapper: ErrorResponse
1339
+ }
1340
+ },
1341
+ requestBody: listCredentialsRequest,
1342
+ queryParameters: [apiVersion, expiresin],
1343
+ urlParameters: [
1344
+ $host,
1345
+ resourceUri,
1346
+ endpointName
1347
+ ],
1348
+ headerParameters: [accept, contentType],
1349
+ mediaType: "json",
1350
+ serializer: serializer$1
1351
+ };
1352
+ const listIngressGatewayCredentialsOperationSpec = {
1353
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/listIngressGatewayCredentials",
1354
+ httpMethod: "POST",
1355
+ responses: {
1356
+ 200: {
1357
+ bodyMapper: IngressGatewayResource
1358
+ },
1359
+ default: {
1360
+ bodyMapper: ErrorResponse
1361
+ }
1362
+ },
1363
+ requestBody: listIngressGatewayCredentialsRequest,
1364
+ queryParameters: [apiVersion, expiresin],
1365
+ urlParameters: [
1366
+ $host,
1367
+ resourceUri,
1368
+ endpointName
1369
+ ],
1370
+ headerParameters: [accept, contentType],
1371
+ mediaType: "json",
1372
+ serializer: serializer$1
1373
+ };
1374
+ const listManagedProxyDetailsOperationSpec = {
1375
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/listManagedProxyDetails",
1376
+ httpMethod: "POST",
1377
+ responses: {
1378
+ 200: {
1379
+ bodyMapper: ManagedProxyResource
1380
+ },
1381
+ default: {
1382
+ bodyMapper: ErrorResponse
1383
+ }
1384
+ },
1385
+ requestBody: managedProxyRequest,
1386
+ queryParameters: [apiVersion],
1387
+ urlParameters: [
1388
+ $host,
1389
+ resourceUri,
1390
+ endpointName
1391
+ ],
1392
+ headerParameters: [accept, contentType],
1393
+ mediaType: "json",
1394
+ serializer: serializer$1
1395
+ };
1396
+ const listNextOperationSpec = {
1397
+ path: "{nextLink}",
1398
+ httpMethod: "GET",
1399
+ responses: {
1400
+ 200: {
1401
+ bodyMapper: EndpointsList
1402
+ },
1403
+ default: {
1404
+ bodyMapper: ErrorResponse
1405
+ }
1406
+ },
1407
+ urlParameters: [
1408
+ $host,
1409
+ nextLink,
1410
+ resourceUri
1411
+ ],
1412
+ headerParameters: [accept],
1413
+ serializer: serializer$1
1414
+ };
1415
+
1416
+ /*
1417
+ * Copyright (c) Microsoft Corporation.
1418
+ * Licensed under the MIT License.
1419
+ *
1420
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1421
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1422
+ */
1423
+ /// <reference lib="esnext.asynciterable" />
1424
+ /** Class containing ServiceConfigurations operations. */
1425
+ class ServiceConfigurationsImpl {
1426
+ /**
1427
+ * Initialize a new instance of the class ServiceConfigurations class.
1428
+ * @param client Reference to the service client
1429
+ */
1430
+ constructor(client) {
1431
+ this.client = client;
1432
+ }
1433
+ /**
1434
+ * API to enumerate registered services in service configurations under a Endpoint Resource
1435
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1436
+ * connected.
1437
+ * @param endpointName The endpoint name.
1438
+ * @param options The options parameters.
1439
+ */
1440
+ listByEndpointResource(resourceUri, endpointName, options) {
1441
+ const iter = this.listByEndpointResourcePagingAll(resourceUri, endpointName, options);
1442
+ return {
1443
+ next() {
1444
+ return iter.next();
1445
+ },
1446
+ [Symbol.asyncIterator]() {
1447
+ return this;
1448
+ },
1449
+ byPage: (settings) => {
1450
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1451
+ throw new Error("maxPageSize is not supported by this operation.");
1452
+ }
1453
+ return this.listByEndpointResourcePagingPage(resourceUri, endpointName, options, settings);
1454
+ }
1455
+ };
1456
+ }
1457
+ listByEndpointResourcePagingPage(resourceUri, endpointName, options, settings) {
1458
+ return tslib.__asyncGenerator(this, arguments, function* listByEndpointResourcePagingPage_1() {
1459
+ let result;
1460
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1461
+ if (!continuationToken) {
1462
+ result = yield tslib.__await(this._listByEndpointResource(resourceUri, endpointName, options));
1463
+ let page = result.value || [];
1464
+ continuationToken = result.nextLink;
1465
+ setContinuationToken(page, continuationToken);
1466
+ yield yield tslib.__await(page);
1467
+ }
1468
+ while (continuationToken) {
1469
+ result = yield tslib.__await(this._listByEndpointResourceNext(resourceUri, endpointName, continuationToken, options));
1470
+ continuationToken = result.nextLink;
1471
+ let page = result.value || [];
1472
+ setContinuationToken(page, continuationToken);
1473
+ yield yield tslib.__await(page);
1474
+ }
1475
+ });
1476
+ }
1477
+ listByEndpointResourcePagingAll(resourceUri, endpointName, options) {
1478
+ return tslib.__asyncGenerator(this, arguments, function* listByEndpointResourcePagingAll_1() {
1479
+ var _a, e_1, _b, _c;
1480
+ try {
1481
+ for (var _d = true, _e = tslib.__asyncValues(this.listByEndpointResourcePagingPage(resourceUri, endpointName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1482
+ _c = _f.value;
1483
+ _d = false;
1484
+ try {
1485
+ const page = _c;
1486
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1487
+ }
1488
+ finally {
1489
+ _d = true;
1490
+ }
1491
+ }
1492
+ }
1493
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1494
+ finally {
1495
+ try {
1496
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1497
+ }
1498
+ finally { if (e_1) throw e_1.error; }
1499
+ }
1500
+ });
1501
+ }
1502
+ /**
1503
+ * API to enumerate registered services in service configurations under a Endpoint Resource
1504
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1505
+ * connected.
1506
+ * @param endpointName The endpoint name.
1507
+ * @param options The options parameters.
1508
+ */
1509
+ _listByEndpointResource(resourceUri, endpointName, options) {
1510
+ return this.client.sendOperationRequest({ resourceUri, endpointName, options }, listByEndpointResourceOperationSpec);
1511
+ }
1512
+ /**
1513
+ * Gets the details about the service to the resource.
1514
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1515
+ * connected.
1516
+ * @param endpointName The endpoint name.
1517
+ * @param serviceConfigurationName The service name.
1518
+ * @param options The options parameters.
1519
+ */
1520
+ get(resourceUri, endpointName, serviceConfigurationName, options) {
1521
+ return this.client.sendOperationRequest({ resourceUri, endpointName, serviceConfigurationName, options }, getOperationSpec);
1522
+ }
1523
+ /**
1524
+ * Create or update a service in serviceConfiguration for the endpoint resource.
1525
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1526
+ * connected.
1527
+ * @param endpointName The endpoint name.
1528
+ * @param serviceConfigurationName The service name.
1529
+ * @param serviceConfigurationResource Service details
1530
+ * @param options The options parameters.
1531
+ */
1532
+ createOrupdate(resourceUri, endpointName, serviceConfigurationName, serviceConfigurationResource, options) {
1533
+ return this.client.sendOperationRequest({
1534
+ resourceUri,
1535
+ endpointName,
1536
+ serviceConfigurationName,
1537
+ serviceConfigurationResource,
1538
+ options
1539
+ }, createOrupdateOperationSpec);
1540
+ }
1541
+ /**
1542
+ * Update the service details in the service configurations of the target resource.
1543
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1544
+ * connected.
1545
+ * @param endpointName The endpoint name.
1546
+ * @param serviceConfigurationName The service name.
1547
+ * @param serviceConfigurationResource Service details
1548
+ * @param options The options parameters.
1549
+ */
1550
+ update(resourceUri, endpointName, serviceConfigurationName, serviceConfigurationResource, options) {
1551
+ return this.client.sendOperationRequest({
1552
+ resourceUri,
1553
+ endpointName,
1554
+ serviceConfigurationName,
1555
+ serviceConfigurationResource,
1556
+ options
1557
+ }, updateOperationSpec);
1558
+ }
1559
+ /**
1560
+ * Deletes the service details to the target resource.
1561
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1562
+ * connected.
1563
+ * @param endpointName The endpoint name.
1564
+ * @param serviceConfigurationName The service name.
1565
+ * @param options The options parameters.
1566
+ */
1567
+ delete(resourceUri, endpointName, serviceConfigurationName, options) {
1568
+ return this.client.sendOperationRequest({ resourceUri, endpointName, serviceConfigurationName, options }, deleteOperationSpec);
1569
+ }
1570
+ /**
1571
+ * ListByEndpointResourceNext
1572
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be
1573
+ * connected.
1574
+ * @param endpointName The endpoint name.
1575
+ * @param nextLink The nextLink from the previous successful call to the ListByEndpointResource method.
1576
+ * @param options The options parameters.
1577
+ */
1578
+ _listByEndpointResourceNext(resourceUri, endpointName, nextLink, options) {
1579
+ return this.client.sendOperationRequest({ resourceUri, endpointName, nextLink, options }, listByEndpointResourceNextOperationSpec);
1580
+ }
1581
+ }
1582
+ // Operation Specifications
1583
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1584
+ const listByEndpointResourceOperationSpec = {
1585
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/serviceConfigurations",
1586
+ httpMethod: "GET",
1587
+ responses: {
1588
+ 200: {
1589
+ bodyMapper: ServiceConfigurationList
1590
+ },
1591
+ default: {
1592
+ bodyMapper: ErrorResponse
1593
+ }
1594
+ },
1595
+ queryParameters: [apiVersion],
1596
+ urlParameters: [
1597
+ $host,
1598
+ resourceUri,
1599
+ endpointName
1600
+ ],
1601
+ headerParameters: [accept],
1602
+ serializer
1603
+ };
1604
+ const getOperationSpec = {
1605
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/serviceConfigurations/{serviceConfigurationName}",
1606
+ httpMethod: "GET",
1607
+ responses: {
1608
+ 200: {
1609
+ bodyMapper: ServiceConfigurationResource
1610
+ },
1611
+ default: {
1612
+ bodyMapper: ErrorResponse
1613
+ }
1614
+ },
1615
+ queryParameters: [apiVersion],
1616
+ urlParameters: [
1617
+ $host,
1618
+ resourceUri,
1619
+ endpointName,
1620
+ serviceConfigurationName
1621
+ ],
1622
+ headerParameters: [accept],
1623
+ serializer
1624
+ };
1625
+ const createOrupdateOperationSpec = {
1626
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/serviceConfigurations/{serviceConfigurationName}",
1627
+ httpMethod: "PUT",
1628
+ responses: {
1629
+ 200: {
1630
+ bodyMapper: ServiceConfigurationResource
1631
+ },
1632
+ 201: {
1633
+ bodyMapper: ServiceConfigurationResource
1634
+ },
1635
+ default: {
1636
+ bodyMapper: ErrorResponse
1637
+ }
1638
+ },
1639
+ requestBody: serviceConfigurationResource,
1640
+ queryParameters: [apiVersion],
1641
+ urlParameters: [
1642
+ $host,
1643
+ resourceUri,
1644
+ endpointName,
1645
+ serviceConfigurationName
1646
+ ],
1647
+ headerParameters: [accept, contentType],
1648
+ mediaType: "json",
1649
+ serializer
1650
+ };
1651
+ const updateOperationSpec = {
1652
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/serviceConfigurations/{serviceConfigurationName}",
1653
+ httpMethod: "PATCH",
1654
+ responses: {
1655
+ 200: {
1656
+ bodyMapper: ServiceConfigurationResource
1657
+ },
1658
+ default: {
1659
+ bodyMapper: ErrorResponse
1660
+ }
1661
+ },
1662
+ requestBody: serviceConfigurationResource1,
1663
+ queryParameters: [apiVersion],
1664
+ urlParameters: [
1665
+ $host,
1666
+ resourceUri,
1667
+ endpointName,
1668
+ serviceConfigurationName
1669
+ ],
1670
+ headerParameters: [accept, contentType],
1671
+ mediaType: "json",
1672
+ serializer
1673
+ };
1674
+ const deleteOperationSpec = {
1675
+ path: "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/serviceConfigurations/{serviceConfigurationName}",
1676
+ httpMethod: "DELETE",
1677
+ responses: {
1678
+ 200: {},
1679
+ 204: {},
1680
+ default: {
1681
+ bodyMapper: ErrorResponse
1682
+ }
1683
+ },
1684
+ queryParameters: [apiVersion],
1685
+ urlParameters: [
1686
+ $host,
1687
+ resourceUri,
1688
+ endpointName,
1689
+ serviceConfigurationName
1690
+ ],
1691
+ headerParameters: [accept],
1692
+ serializer
1693
+ };
1694
+ const listByEndpointResourceNextOperationSpec = {
1695
+ path: "{nextLink}",
1696
+ httpMethod: "GET",
1697
+ responses: {
1698
+ 200: {
1699
+ bodyMapper: ServiceConfigurationList
1700
+ },
1701
+ default: {
1702
+ bodyMapper: ErrorResponse
1703
+ }
1704
+ },
1705
+ urlParameters: [
1706
+ $host,
1707
+ nextLink,
1708
+ resourceUri,
1709
+ endpointName
1710
+ ],
1711
+ headerParameters: [accept],
1712
+ serializer
1713
+ };
1714
+
1715
+ /*
1716
+ * Copyright (c) Microsoft Corporation.
1717
+ * Licensed under the MIT License.
1718
+ *
1719
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1720
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1721
+ */
1722
+ class HybridConnectivityManagementAPI extends coreClient__namespace.ServiceClient {
1723
+ /**
1724
+ * Initializes a new instance of the HybridConnectivityManagementAPI class.
1725
+ * @param credentials Subscription credentials which uniquely identify client subscription.
1726
+ * @param options The parameter options
1727
+ */
1728
+ constructor(credentials, options) {
1729
+ var _a, _b, _c;
1730
+ if (credentials === undefined) {
1731
+ throw new Error("'credentials' cannot be null");
1732
+ }
1733
+ // Initializing default values for options
1734
+ if (!options) {
1735
+ options = {};
1736
+ }
1737
+ const defaults = {
1738
+ requestContentType: "application/json; charset=utf-8",
1739
+ credential: credentials
1740
+ };
1741
+ const packageDetails = `azsdk-js-arm-hybridconnectivity/1.0.0-beta.1`;
1742
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1743
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1744
+ : `${packageDetails}`;
1745
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1746
+ userAgentPrefix
1747
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1748
+ super(optionsWithDefaults);
1749
+ let bearerTokenAuthenticationPolicyFound = false;
1750
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
1751
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
1752
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
1753
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
1754
+ }
1755
+ if (!options ||
1756
+ !options.pipeline ||
1757
+ options.pipeline.getOrderedPolicies().length == 0 ||
1758
+ !bearerTokenAuthenticationPolicyFound) {
1759
+ this.pipeline.removePolicy({
1760
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
1761
+ });
1762
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
1763
+ credential: credentials,
1764
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
1765
+ challengeCallbacks: {
1766
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
1767
+ }
1768
+ }));
1769
+ }
1770
+ // Assigning values to Constant parameters
1771
+ this.$host = options.$host || "https://management.azure.com";
1772
+ this.apiVersion = options.apiVersion || "2023-03-15";
1773
+ this.operations = new OperationsImpl(this);
1774
+ this.endpoints = new EndpointsImpl(this);
1775
+ this.serviceConfigurations = new ServiceConfigurationsImpl(this);
1776
+ this.addCustomApiVersionPolicy(options.apiVersion);
1777
+ }
1778
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
1779
+ addCustomApiVersionPolicy(apiVersion) {
1780
+ if (!apiVersion) {
1781
+ return;
1782
+ }
1783
+ const apiVersionPolicy = {
1784
+ name: "CustomApiVersionPolicy",
1785
+ sendRequest(request, next) {
1786
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1787
+ const param = request.url.split("?");
1788
+ if (param.length > 1) {
1789
+ const newParams = param[1].split("&").map((item) => {
1790
+ if (item.indexOf("api-version") > -1) {
1791
+ return "api-version=" + apiVersion;
1792
+ }
1793
+ else {
1794
+ return item;
1795
+ }
1796
+ });
1797
+ request.url = param[0] + "?" + newParams.join("&");
1798
+ }
1799
+ return next(request);
1800
+ });
1801
+ }
1802
+ };
1803
+ this.pipeline.addPolicy(apiVersionPolicy);
1804
+ }
1805
+ }
1806
+
1807
+ exports.HybridConnectivityManagementAPI = HybridConnectivityManagementAPI;
1808
+ exports.getContinuationToken = getContinuationToken;
1809
+ //# sourceMappingURL=index.js.map