@azure/arm-postgresql-flexible 8.1.0-alpha.20250718.1 → 8.1.0-alpha.20250721.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +395 -183
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/administrators.js +45 -52
  6. package/dist/browser/operations/administrators.js.map +1 -1
  7. package/dist/browser/operations/backups.js +45 -52
  8. package/dist/browser/operations/backups.js.map +1 -1
  9. package/dist/browser/operations/checkNameAvailability.js +1 -0
  10. package/dist/browser/operations/checkNameAvailability.js.map +1 -1
  11. package/dist/browser/operations/checkNameAvailabilityWithLocation.js +1 -0
  12. package/dist/browser/operations/checkNameAvailabilityWithLocation.js.map +1 -1
  13. package/dist/browser/operations/configurations.js +45 -52
  14. package/dist/browser/operations/configurations.js.map +1 -1
  15. package/dist/browser/operations/databases.js +45 -52
  16. package/dist/browser/operations/databases.js.map +1 -1
  17. package/dist/browser/operations/firewallRules.js +45 -52
  18. package/dist/browser/operations/firewallRules.js.map +1 -1
  19. package/dist/browser/operations/flexibleServer.js +12 -6
  20. package/dist/browser/operations/flexibleServer.js.map +1 -1
  21. package/dist/browser/operations/getPrivateDnsZoneSuffix.js +1 -0
  22. package/dist/browser/operations/getPrivateDnsZoneSuffix.js.map +1 -1
  23. package/dist/browser/operations/locationBasedCapabilities.js +23 -40
  24. package/dist/browser/operations/locationBasedCapabilities.js.map +1 -1
  25. package/dist/browser/operations/logFiles.js +23 -40
  26. package/dist/browser/operations/logFiles.js.map +1 -1
  27. package/dist/browser/operations/ltrBackupOperations.js +23 -40
  28. package/dist/browser/operations/ltrBackupOperations.js.map +1 -1
  29. package/dist/browser/operations/migrations.js +23 -40
  30. package/dist/browser/operations/migrations.js.map +1 -1
  31. package/dist/browser/operations/operations.js +23 -40
  32. package/dist/browser/operations/operations.js.map +1 -1
  33. package/dist/browser/operations/privateEndpointConnectionOperations.js +23 -12
  34. package/dist/browser/operations/privateEndpointConnectionOperations.js.map +1 -1
  35. package/dist/browser/operations/privateEndpointConnections.js +23 -40
  36. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  37. package/dist/browser/operations/privateLinkResources.js +23 -40
  38. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  39. package/dist/browser/operations/quotaUsages.js +23 -40
  40. package/dist/browser/operations/quotaUsages.js.map +1 -1
  41. package/dist/browser/operations/replicas.js +10 -27
  42. package/dist/browser/operations/replicas.js.map +1 -1
  43. package/dist/browser/operations/serverCapabilities.js +23 -40
  44. package/dist/browser/operations/serverCapabilities.js.map +1 -1
  45. package/dist/browser/operations/serverThreatProtectionSettings.js +34 -46
  46. package/dist/browser/operations/serverThreatProtectionSettings.js.map +1 -1
  47. package/dist/browser/operations/servers.js +111 -115
  48. package/dist/browser/operations/servers.js.map +1 -1
  49. package/dist/browser/operations/tuningConfiguration.js +89 -103
  50. package/dist/browser/operations/tuningConfiguration.js.map +1 -1
  51. package/dist/browser/operations/tuningIndex.js +23 -40
  52. package/dist/browser/operations/tuningIndex.js.map +1 -1
  53. package/dist/browser/operations/tuningOptions.js +23 -40
  54. package/dist/browser/operations/tuningOptions.js.map +1 -1
  55. package/dist/browser/operations/virtualEndpoints.js +56 -58
  56. package/dist/browser/operations/virtualEndpoints.js.map +1 -1
  57. package/dist/browser/operations/virtualNetworkSubnetUsage.js +1 -0
  58. package/dist/browser/operations/virtualNetworkSubnetUsage.js.map +1 -1
  59. package/dist/browser/pagingHelper.js +2 -4
  60. package/dist/browser/pagingHelper.js.map +1 -1
  61. package/dist/browser/postgreSQLManagementFlexibleServerClient.js +39 -5
  62. package/dist/browser/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  63. package/dist/commonjs/lroImpl.js +7 -3
  64. package/dist/commonjs/lroImpl.js.map +1 -1
  65. package/dist/commonjs/models/mappers.js +395 -183
  66. package/dist/commonjs/models/mappers.js.map +1 -1
  67. package/dist/commonjs/operations/administrators.js +45 -51
  68. package/dist/commonjs/operations/administrators.js.map +1 -1
  69. package/dist/commonjs/operations/backups.js +45 -51
  70. package/dist/commonjs/operations/backups.js.map +1 -1
  71. package/dist/commonjs/operations/checkNameAvailability.js +1 -0
  72. package/dist/commonjs/operations/checkNameAvailability.js.map +1 -1
  73. package/dist/commonjs/operations/checkNameAvailabilityWithLocation.js +1 -0
  74. package/dist/commonjs/operations/checkNameAvailabilityWithLocation.js.map +1 -1
  75. package/dist/commonjs/operations/configurations.js +45 -51
  76. package/dist/commonjs/operations/configurations.js.map +1 -1
  77. package/dist/commonjs/operations/databases.js +45 -51
  78. package/dist/commonjs/operations/databases.js.map +1 -1
  79. package/dist/commonjs/operations/firewallRules.js +45 -51
  80. package/dist/commonjs/operations/firewallRules.js.map +1 -1
  81. package/dist/commonjs/operations/flexibleServer.js +12 -6
  82. package/dist/commonjs/operations/flexibleServer.js.map +1 -1
  83. package/dist/commonjs/operations/getPrivateDnsZoneSuffix.js +1 -0
  84. package/dist/commonjs/operations/getPrivateDnsZoneSuffix.js.map +1 -1
  85. package/dist/commonjs/operations/locationBasedCapabilities.js +23 -39
  86. package/dist/commonjs/operations/locationBasedCapabilities.js.map +1 -1
  87. package/dist/commonjs/operations/logFiles.js +23 -39
  88. package/dist/commonjs/operations/logFiles.js.map +1 -1
  89. package/dist/commonjs/operations/ltrBackupOperations.js +23 -39
  90. package/dist/commonjs/operations/ltrBackupOperations.js.map +1 -1
  91. package/dist/commonjs/operations/migrations.js +23 -39
  92. package/dist/commonjs/operations/migrations.js.map +1 -1
  93. package/dist/commonjs/operations/operations.js +23 -39
  94. package/dist/commonjs/operations/operations.js.map +1 -1
  95. package/dist/commonjs/operations/privateEndpointConnectionOperations.js +23 -12
  96. package/dist/commonjs/operations/privateEndpointConnectionOperations.js.map +1 -1
  97. package/dist/commonjs/operations/privateEndpointConnections.js +23 -39
  98. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  99. package/dist/commonjs/operations/privateLinkResources.js +23 -39
  100. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  101. package/dist/commonjs/operations/quotaUsages.js +23 -39
  102. package/dist/commonjs/operations/quotaUsages.js.map +1 -1
  103. package/dist/commonjs/operations/replicas.js +10 -26
  104. package/dist/commonjs/operations/replicas.js.map +1 -1
  105. package/dist/commonjs/operations/serverCapabilities.js +23 -39
  106. package/dist/commonjs/operations/serverCapabilities.js.map +1 -1
  107. package/dist/commonjs/operations/serverThreatProtectionSettings.js +34 -45
  108. package/dist/commonjs/operations/serverThreatProtectionSettings.js.map +1 -1
  109. package/dist/commonjs/operations/servers.js +111 -114
  110. package/dist/commonjs/operations/servers.js.map +1 -1
  111. package/dist/commonjs/operations/tuningConfiguration.js +89 -102
  112. package/dist/commonjs/operations/tuningConfiguration.js.map +1 -1
  113. package/dist/commonjs/operations/tuningIndex.js +23 -39
  114. package/dist/commonjs/operations/tuningIndex.js.map +1 -1
  115. package/dist/commonjs/operations/tuningOptions.js +23 -39
  116. package/dist/commonjs/operations/tuningOptions.js.map +1 -1
  117. package/dist/commonjs/operations/virtualEndpoints.js +56 -57
  118. package/dist/commonjs/operations/virtualEndpoints.js.map +1 -1
  119. package/dist/commonjs/operations/virtualNetworkSubnetUsage.js +1 -0
  120. package/dist/commonjs/operations/virtualNetworkSubnetUsage.js.map +1 -1
  121. package/dist/commonjs/pagingHelper.js +2 -4
  122. package/dist/commonjs/pagingHelper.js.map +1 -1
  123. package/dist/commonjs/postgreSQLManagementFlexibleServerClient.js +39 -5
  124. package/dist/commonjs/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  125. package/dist/commonjs/tsdoc-metadata.json +11 -11
  126. package/dist/esm/lroImpl.js +7 -3
  127. package/dist/esm/lroImpl.js.map +1 -1
  128. package/dist/esm/models/mappers.js +395 -183
  129. package/dist/esm/models/mappers.js.map +1 -1
  130. package/dist/esm/operations/administrators.js +45 -52
  131. package/dist/esm/operations/administrators.js.map +1 -1
  132. package/dist/esm/operations/backups.js +45 -52
  133. package/dist/esm/operations/backups.js.map +1 -1
  134. package/dist/esm/operations/checkNameAvailability.js +1 -0
  135. package/dist/esm/operations/checkNameAvailability.js.map +1 -1
  136. package/dist/esm/operations/checkNameAvailabilityWithLocation.js +1 -0
  137. package/dist/esm/operations/checkNameAvailabilityWithLocation.js.map +1 -1
  138. package/dist/esm/operations/configurations.js +45 -52
  139. package/dist/esm/operations/configurations.js.map +1 -1
  140. package/dist/esm/operations/databases.js +45 -52
  141. package/dist/esm/operations/databases.js.map +1 -1
  142. package/dist/esm/operations/firewallRules.js +45 -52
  143. package/dist/esm/operations/firewallRules.js.map +1 -1
  144. package/dist/esm/operations/flexibleServer.js +12 -6
  145. package/dist/esm/operations/flexibleServer.js.map +1 -1
  146. package/dist/esm/operations/getPrivateDnsZoneSuffix.js +1 -0
  147. package/dist/esm/operations/getPrivateDnsZoneSuffix.js.map +1 -1
  148. package/dist/esm/operations/locationBasedCapabilities.js +23 -40
  149. package/dist/esm/operations/locationBasedCapabilities.js.map +1 -1
  150. package/dist/esm/operations/logFiles.js +23 -40
  151. package/dist/esm/operations/logFiles.js.map +1 -1
  152. package/dist/esm/operations/ltrBackupOperations.js +23 -40
  153. package/dist/esm/operations/ltrBackupOperations.js.map +1 -1
  154. package/dist/esm/operations/migrations.js +23 -40
  155. package/dist/esm/operations/migrations.js.map +1 -1
  156. package/dist/esm/operations/operations.js +23 -40
  157. package/dist/esm/operations/operations.js.map +1 -1
  158. package/dist/esm/operations/privateEndpointConnectionOperations.js +23 -12
  159. package/dist/esm/operations/privateEndpointConnectionOperations.js.map +1 -1
  160. package/dist/esm/operations/privateEndpointConnections.js +23 -40
  161. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  162. package/dist/esm/operations/privateLinkResources.js +23 -40
  163. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  164. package/dist/esm/operations/quotaUsages.js +23 -40
  165. package/dist/esm/operations/quotaUsages.js.map +1 -1
  166. package/dist/esm/operations/replicas.js +10 -27
  167. package/dist/esm/operations/replicas.js.map +1 -1
  168. package/dist/esm/operations/serverCapabilities.js +23 -40
  169. package/dist/esm/operations/serverCapabilities.js.map +1 -1
  170. package/dist/esm/operations/serverThreatProtectionSettings.js +34 -46
  171. package/dist/esm/operations/serverThreatProtectionSettings.js.map +1 -1
  172. package/dist/esm/operations/servers.js +111 -115
  173. package/dist/esm/operations/servers.js.map +1 -1
  174. package/dist/esm/operations/tuningConfiguration.js +89 -103
  175. package/dist/esm/operations/tuningConfiguration.js.map +1 -1
  176. package/dist/esm/operations/tuningIndex.js +23 -40
  177. package/dist/esm/operations/tuningIndex.js.map +1 -1
  178. package/dist/esm/operations/tuningOptions.js +23 -40
  179. package/dist/esm/operations/tuningOptions.js.map +1 -1
  180. package/dist/esm/operations/virtualEndpoints.js +56 -58
  181. package/dist/esm/operations/virtualEndpoints.js.map +1 -1
  182. package/dist/esm/operations/virtualNetworkSubnetUsage.js +1 -0
  183. package/dist/esm/operations/virtualNetworkSubnetUsage.js.map +1 -1
  184. package/dist/esm/pagingHelper.js +2 -4
  185. package/dist/esm/pagingHelper.js.map +1 -1
  186. package/dist/esm/postgreSQLManagementFlexibleServerClient.js +39 -5
  187. package/dist/esm/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  188. package/dist/react-native/lroImpl.js +7 -3
  189. package/dist/react-native/lroImpl.js.map +1 -1
  190. package/dist/react-native/models/mappers.js +395 -183
  191. package/dist/react-native/models/mappers.js.map +1 -1
  192. package/dist/react-native/operations/administrators.js +45 -52
  193. package/dist/react-native/operations/administrators.js.map +1 -1
  194. package/dist/react-native/operations/backups.js +45 -52
  195. package/dist/react-native/operations/backups.js.map +1 -1
  196. package/dist/react-native/operations/checkNameAvailability.js +1 -0
  197. package/dist/react-native/operations/checkNameAvailability.js.map +1 -1
  198. package/dist/react-native/operations/checkNameAvailabilityWithLocation.js +1 -0
  199. package/dist/react-native/operations/checkNameAvailabilityWithLocation.js.map +1 -1
  200. package/dist/react-native/operations/configurations.js +45 -52
  201. package/dist/react-native/operations/configurations.js.map +1 -1
  202. package/dist/react-native/operations/databases.js +45 -52
  203. package/dist/react-native/operations/databases.js.map +1 -1
  204. package/dist/react-native/operations/firewallRules.js +45 -52
  205. package/dist/react-native/operations/firewallRules.js.map +1 -1
  206. package/dist/react-native/operations/flexibleServer.js +12 -6
  207. package/dist/react-native/operations/flexibleServer.js.map +1 -1
  208. package/dist/react-native/operations/getPrivateDnsZoneSuffix.js +1 -0
  209. package/dist/react-native/operations/getPrivateDnsZoneSuffix.js.map +1 -1
  210. package/dist/react-native/operations/locationBasedCapabilities.js +23 -40
  211. package/dist/react-native/operations/locationBasedCapabilities.js.map +1 -1
  212. package/dist/react-native/operations/logFiles.js +23 -40
  213. package/dist/react-native/operations/logFiles.js.map +1 -1
  214. package/dist/react-native/operations/ltrBackupOperations.js +23 -40
  215. package/dist/react-native/operations/ltrBackupOperations.js.map +1 -1
  216. package/dist/react-native/operations/migrations.js +23 -40
  217. package/dist/react-native/operations/migrations.js.map +1 -1
  218. package/dist/react-native/operations/operations.js +23 -40
  219. package/dist/react-native/operations/operations.js.map +1 -1
  220. package/dist/react-native/operations/privateEndpointConnectionOperations.js +23 -12
  221. package/dist/react-native/operations/privateEndpointConnectionOperations.js.map +1 -1
  222. package/dist/react-native/operations/privateEndpointConnections.js +23 -40
  223. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  224. package/dist/react-native/operations/privateLinkResources.js +23 -40
  225. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  226. package/dist/react-native/operations/quotaUsages.js +23 -40
  227. package/dist/react-native/operations/quotaUsages.js.map +1 -1
  228. package/dist/react-native/operations/replicas.js +10 -27
  229. package/dist/react-native/operations/replicas.js.map +1 -1
  230. package/dist/react-native/operations/serverCapabilities.js +23 -40
  231. package/dist/react-native/operations/serverCapabilities.js.map +1 -1
  232. package/dist/react-native/operations/serverThreatProtectionSettings.js +34 -46
  233. package/dist/react-native/operations/serverThreatProtectionSettings.js.map +1 -1
  234. package/dist/react-native/operations/servers.js +111 -115
  235. package/dist/react-native/operations/servers.js.map +1 -1
  236. package/dist/react-native/operations/tuningConfiguration.js +89 -103
  237. package/dist/react-native/operations/tuningConfiguration.js.map +1 -1
  238. package/dist/react-native/operations/tuningIndex.js +23 -40
  239. package/dist/react-native/operations/tuningIndex.js.map +1 -1
  240. package/dist/react-native/operations/tuningOptions.js +23 -40
  241. package/dist/react-native/operations/tuningOptions.js.map +1 -1
  242. package/dist/react-native/operations/virtualEndpoints.js +56 -58
  243. package/dist/react-native/operations/virtualEndpoints.js.map +1 -1
  244. package/dist/react-native/operations/virtualNetworkSubnetUsage.js +1 -0
  245. package/dist/react-native/operations/virtualNetworkSubnetUsage.js.map +1 -1
  246. package/dist/react-native/pagingHelper.js +2 -4
  247. package/dist/react-native/pagingHelper.js.map +1 -1
  248. package/dist/react-native/postgreSQLManagementFlexibleServerClient.js +39 -5
  249. package/dist/react-native/postgreSQLManagementFlexibleServerClient.js.map +1 -1
  250. package/package.json +2 -2
  251. package/review/arm-postgresql-flexible-node.api.md +2723 -2723
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Administrators operations. */
20
20
  class AdministratorsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Administrators class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class AdministratorsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listByServerPagingPage(resourceGroupName, serverName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._listByServer(resourceGroupName, serverName, options));
57
- const page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- const page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listByServerPagingPage(resourceGroupName, serverName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._listByServer(resourceGroupName, serverName, options);
57
+ const page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listByServerNext(resourceGroupName, serverName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ const page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listByServerPagingAll(resourceGroupName, serverName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listByServerPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByServerPagingPage(resourceGroupName, serverName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listByServerPagingAll(resourceGroupName, serverName, options) {
71
+ for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * Creates a new server.
@@ -101,14 +85,19 @@ class AdministratorsImpl {
101
85
  return this.client.sendOperationRequest(args, spec);
102
86
  };
103
87
  const sendOperationFn = async (args, spec) => {
104
- var _a;
105
88
  let currentRawResponse = undefined;
106
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
89
+ const providedCallback = args.options?.onResponse;
107
90
  const callback = (rawResponse, flatResponse) => {
108
91
  currentRawResponse = rawResponse;
109
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
92
+ providedCallback?.(rawResponse, flatResponse);
93
+ };
94
+ const updatedArgs = {
95
+ ...args,
96
+ options: {
97
+ ...args.options,
98
+ onResponse: callback,
99
+ },
110
100
  };
111
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
112
101
  const flatResponse = await directSendOperation(updatedArgs, spec);
113
102
  return {
114
103
  flatResponse,
@@ -125,8 +114,8 @@ class AdministratorsImpl {
125
114
  spec: createOperationSpec,
126
115
  });
127
116
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
128
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
129
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
117
+ restoreFrom: options?.resumeFrom,
118
+ intervalInMs: options?.updateIntervalInMs,
130
119
  resourceLocationConfig: "azure-async-operation",
131
120
  });
132
121
  await poller.poll();
@@ -156,14 +145,19 @@ class AdministratorsImpl {
156
145
  return this.client.sendOperationRequest(args, spec);
157
146
  };
158
147
  const sendOperationFn = async (args, spec) => {
159
- var _a;
160
148
  let currentRawResponse = undefined;
161
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
149
+ const providedCallback = args.options?.onResponse;
162
150
  const callback = (rawResponse, flatResponse) => {
163
151
  currentRawResponse = rawResponse;
164
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
152
+ providedCallback?.(rawResponse, flatResponse);
153
+ };
154
+ const updatedArgs = {
155
+ ...args,
156
+ options: {
157
+ ...args.options,
158
+ onResponse: callback,
159
+ },
165
160
  };
166
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
167
161
  const flatResponse = await directSendOperation(updatedArgs, spec);
168
162
  return {
169
163
  flatResponse,
@@ -180,8 +174,8 @@ class AdministratorsImpl {
180
174
  spec: deleteOperationSpec,
181
175
  });
182
176
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
183
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
184
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
177
+ restoreFrom: options?.resumeFrom,
178
+ intervalInMs: options?.updateIntervalInMs,
185
179
  resourceLocationConfig: "location",
186
180
  });
187
181
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"administrators.js","sourceRoot":"","sources":["../../../src/operations/administrators.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAe9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,UAA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;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { Administrators } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n ActiveDirectoryAdministrator,\n AdministratorsListByServerNextOptionalParams,\n AdministratorsListByServerOptionalParams,\n AdministratorsListByServerResponse,\n ActiveDirectoryAdministratorAdd,\n AdministratorsCreateOptionalParams,\n AdministratorsCreateResponse,\n AdministratorsDeleteOptionalParams,\n AdministratorsGetOptionalParams,\n AdministratorsGetResponse,\n AdministratorsListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Administrators operations. */\nexport class AdministratorsImpl implements Administrators {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class Administrators class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the AAD administrators for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): PagedAsyncIterableIterator<ActiveDirectoryAdministrator> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ActiveDirectoryAdministrator[]> {\n let result: AdministratorsListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): AsyncIterableIterator<ActiveDirectoryAdministrator> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Creates a new server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n parameters: ActiveDirectoryAdministratorAdd,\n options?: AdministratorsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<OperationState<AdministratorsCreateResponse>, AdministratorsCreateResponse>\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AdministratorsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, objectId, parameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AdministratorsCreateResponse,\n OperationState<AdministratorsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n parameters: ActiveDirectoryAdministratorAdd,\n options?: AdministratorsCreateOptionalParams,\n ): Promise<AdministratorsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n serverName,\n objectId,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an Microsoft Entra Administrator associated with the server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, objectId, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an Microsoft Entra Administrator associated with the server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(resourceGroupName, serverName, objectId, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Gets information about a server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsGetOptionalParams,\n ): Promise<AdministratorsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, objectId, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the AAD administrators for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): Promise<AdministratorsListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: AdministratorsListByServerNextOptionalParams,\n ): Promise<AdministratorsListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 201: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 202: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 204: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AdministratorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AdministratorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"administrators.js","sourceRoot":"","sources":["../../../src/operations/administrators.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAe9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,sBAAsB,CAAC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AO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { Administrators } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n ActiveDirectoryAdministrator,\n AdministratorsListByServerNextOptionalParams,\n AdministratorsListByServerOptionalParams,\n AdministratorsListByServerResponse,\n ActiveDirectoryAdministratorAdd,\n AdministratorsCreateOptionalParams,\n AdministratorsCreateResponse,\n AdministratorsDeleteOptionalParams,\n AdministratorsGetOptionalParams,\n AdministratorsGetResponse,\n AdministratorsListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Administrators operations. */\nexport class AdministratorsImpl implements Administrators {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class Administrators class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the AAD administrators for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): PagedAsyncIterableIterator<ActiveDirectoryAdministrator> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ActiveDirectoryAdministrator[]> {\n let result: AdministratorsListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): AsyncIterableIterator<ActiveDirectoryAdministrator> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Creates a new server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n parameters: ActiveDirectoryAdministratorAdd,\n options?: AdministratorsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<OperationState<AdministratorsCreateResponse>, AdministratorsCreateResponse>\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AdministratorsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, objectId, parameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AdministratorsCreateResponse,\n OperationState<AdministratorsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param parameters The required parameters for adding an Microsoft Entra Administrator for a server.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n parameters: ActiveDirectoryAdministratorAdd,\n options?: AdministratorsCreateOptionalParams,\n ): Promise<AdministratorsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n serverName,\n objectId,\n parameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an Microsoft Entra Administrator associated with the server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, objectId, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an Microsoft Entra Administrator associated with the server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(resourceGroupName, serverName, objectId, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Gets information about a server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param objectId Guid of the objectId for the administrator.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n objectId: string,\n options?: AdministratorsGetOptionalParams,\n ): Promise<AdministratorsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, objectId, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the AAD administrators for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: AdministratorsListByServerOptionalParams,\n ): Promise<AdministratorsListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: AdministratorsListByServerNextOptionalParams,\n ): Promise<AdministratorsListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 201: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 202: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n 204: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ActiveDirectoryAdministrator,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AdministratorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AdministratorListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing Backups operations. */
20
20
  class BackupsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class Backups class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class BackupsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listByServerPagingPage(resourceGroupName, serverName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._listByServer(resourceGroupName, serverName, options));
57
- const page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- const page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listByServerPagingPage(resourceGroupName, serverName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._listByServer(resourceGroupName, serverName, options);
57
+ const page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listByServerNext(resourceGroupName, serverName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ const page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listByServerPagingAll(resourceGroupName, serverName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listByServerPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByServerPagingPage(resourceGroupName, serverName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listByServerPagingAll(resourceGroupName, serverName, options) {
71
+ for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * Create a specific backup for PostgreSQL flexible server.
@@ -100,14 +84,19 @@ class BackupsImpl {
100
84
  return this.client.sendOperationRequest(args, spec);
101
85
  };
102
86
  const sendOperationFn = async (args, spec) => {
103
- var _a;
104
87
  let currentRawResponse = undefined;
105
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
88
+ const providedCallback = args.options?.onResponse;
106
89
  const callback = (rawResponse, flatResponse) => {
107
90
  currentRawResponse = rawResponse;
108
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
91
+ providedCallback?.(rawResponse, flatResponse);
92
+ };
93
+ const updatedArgs = {
94
+ ...args,
95
+ options: {
96
+ ...args.options,
97
+ onResponse: callback,
98
+ },
109
99
  };
110
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
111
100
  const flatResponse = await directSendOperation(updatedArgs, spec);
112
101
  return {
113
102
  flatResponse,
@@ -124,8 +113,8 @@ class BackupsImpl {
124
113
  spec: createOperationSpec,
125
114
  });
126
115
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
127
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
128
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
116
+ restoreFrom: options?.resumeFrom,
117
+ intervalInMs: options?.updateIntervalInMs,
129
118
  resourceLocationConfig: "azure-async-operation",
130
119
  });
131
120
  await poller.poll();
@@ -154,14 +143,19 @@ class BackupsImpl {
154
143
  return this.client.sendOperationRequest(args, spec);
155
144
  };
156
145
  const sendOperationFn = async (args, spec) => {
157
- var _a;
158
146
  let currentRawResponse = undefined;
159
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
147
+ const providedCallback = args.options?.onResponse;
160
148
  const callback = (rawResponse, flatResponse) => {
161
149
  currentRawResponse = rawResponse;
162
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
150
+ providedCallback?.(rawResponse, flatResponse);
151
+ };
152
+ const updatedArgs = {
153
+ ...args,
154
+ options: {
155
+ ...args.options,
156
+ onResponse: callback,
157
+ },
163
158
  };
164
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
165
159
  const flatResponse = await directSendOperation(updatedArgs, spec);
166
160
  return {
167
161
  flatResponse,
@@ -178,8 +172,8 @@ class BackupsImpl {
178
172
  spec: deleteOperationSpec,
179
173
  });
180
174
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
181
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
182
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
175
+ restoreFrom: options?.resumeFrom,
176
+ intervalInMs: options?.updateIntervalInMs,
183
177
  resourceLocationConfig: "location",
184
178
  });
185
179
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"backups.js","sourceRoot":"","sources":["../../../src/operations/backups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAe9C,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;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GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { Backups } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n ServerBackup,\n BackupsListByServerNextOptionalParams,\n BackupsListByServerOptionalParams,\n BackupsListByServerResponse,\n BackupsCreateOptionalParams,\n BackupsCreateResponse,\n BackupsDeleteOptionalParams,\n BackupsDeleteResponse,\n BackupsGetOptionalParams,\n BackupsGetResponse,\n BackupsListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Backups operations. */\nexport class BackupsImpl implements Backups {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class Backups class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the backups for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): PagedAsyncIterableIterator<ServerBackup> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ServerBackup[]> {\n let result: BackupsListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): AsyncIterableIterator<ServerBackup> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Create a specific backup for PostgreSQL flexible server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsCreateOptionalParams,\n ): Promise<SimplePollerLike<OperationState<BackupsCreateResponse>, BackupsCreateResponse>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<BackupsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, backupName, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n BackupsCreateResponse,\n OperationState<BackupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a specific backup for PostgreSQL flexible server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsCreateOptionalParams,\n ): Promise<BackupsCreateResponse> {\n const poller = await this.beginCreate(resourceGroupName, serverName, backupName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a specific backup.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<BackupsDeleteResponse>, BackupsDeleteResponse>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<BackupsDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, backupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n BackupsDeleteResponse,\n OperationState<BackupsDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a specific backup.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsDeleteOptionalParams,\n ): Promise<BackupsDeleteResponse> {\n const poller = await this.beginDelete(resourceGroupName, serverName, backupName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Get specific backup for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsGetOptionalParams,\n ): Promise<BackupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, backupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the backups for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): Promise<BackupsListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: BackupsListByServerNextOptionalParams,\n ): Promise<BackupsListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackup,\n },\n 201: {\n bodyMapper: Mappers.ServerBackup,\n },\n 202: {\n bodyMapper: Mappers.ServerBackup,\n },\n 204: {\n bodyMapper: Mappers.ServerBackup,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackup,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackupListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackupListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"backups.js","sourceRoot":"","sources":["../../../src/operations/backups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAGtD,8CAAmD;AACnD,8CAA8C;AAe9C,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,YAAY,CACjB,iBAAyB,EACzB,UAAkB,EAClB,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,sBAAsB,CAAC,iBAAiB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AAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport type { Backups } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport type {\n ServerBackup,\n BackupsListByServerNextOptionalParams,\n BackupsListByServerOptionalParams,\n BackupsListByServerResponse,\n BackupsCreateOptionalParams,\n BackupsCreateResponse,\n BackupsDeleteOptionalParams,\n BackupsDeleteResponse,\n BackupsGetOptionalParams,\n BackupsGetResponse,\n BackupsListByServerNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Backups operations. */\nexport class BackupsImpl implements Backups {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class Backups class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * List all the backups for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n public listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): PagedAsyncIterableIterator<ServerBackup> {\n const iter = this.listByServerPagingAll(resourceGroupName, serverName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);\n },\n };\n }\n\n private async *listByServerPagingPage(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<ServerBackup[]> {\n let result: BackupsListByServerResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByServer(resourceGroupName, serverName, options);\n const page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByServerNext(\n resourceGroupName,\n serverName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n const page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByServerPagingAll(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): AsyncIterableIterator<ServerBackup> {\n for await (const page of this.listByServerPagingPage(resourceGroupName, serverName, options)) {\n yield* page;\n }\n }\n\n /**\n * Create a specific backup for PostgreSQL flexible server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsCreateOptionalParams,\n ): Promise<SimplePollerLike<OperationState<BackupsCreateResponse>, BackupsCreateResponse>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<BackupsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, backupName, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n BackupsCreateResponse,\n OperationState<BackupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a specific backup for PostgreSQL flexible server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsCreateOptionalParams,\n ): Promise<BackupsCreateResponse> {\n const poller = await this.beginCreate(resourceGroupName, serverName, backupName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a specific backup.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<BackupsDeleteResponse>, BackupsDeleteResponse>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<BackupsDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, serverName, backupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n BackupsDeleteResponse,\n OperationState<BackupsDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a specific backup.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsDeleteOptionalParams,\n ): Promise<BackupsDeleteResponse> {\n const poller = await this.beginDelete(resourceGroupName, serverName, backupName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * Get specific backup for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param backupName The name of the backup.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n serverName: string,\n backupName: string,\n options?: BackupsGetOptionalParams,\n ): Promise<BackupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, backupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all the backups for a given server.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param options The options parameters.\n */\n private _listByServer(\n resourceGroupName: string,\n serverName: string,\n options?: BackupsListByServerOptionalParams,\n ): Promise<BackupsListByServerResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, options },\n listByServerOperationSpec,\n );\n }\n\n /**\n * ListByServerNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param serverName The name of the server.\n * @param nextLink The nextLink from the previous successful call to the ListByServer method.\n * @param options The options parameters.\n */\n private _listByServerNext(\n resourceGroupName: string,\n serverName: string,\n nextLink: string,\n options?: BackupsListByServerNextOptionalParams,\n ): Promise<BackupsListByServerNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, serverName, nextLink, options },\n listByServerNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackup,\n },\n 201: {\n bodyMapper: Mappers.ServerBackup,\n },\n 202: {\n bodyMapper: Mappers.ServerBackup,\n },\n 204: {\n bodyMapper: Mappers.ServerBackup,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.BackupsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackup,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.backupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackupListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByServerNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServerBackupListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.serverName,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing CheckNameAvailability operations. */
16
16
  class CheckNameAvailabilityImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class CheckNameAvailability class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"checkNameAvailability.js","sourceRoot":"","sources":["../../../src/operations/checkNameAvailability.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,yDAAyD;AACzD,MAAa,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,OAAO,CACL,uBAAqD,EACrD,OAAoD;QAEpD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,uBAAuB,EAAE,OAAO,EAAE,EACpC,oBAAoB,CACrB,CAAC;IACJ,CAAC;CACF;AAzBD,8DAyBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,2FAA2F;IACjG,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,uBAAuB;IAC/C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { CheckNameAvailability } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n CheckNameAvailabilityRequest,\n CheckNameAvailabilityExecuteOptionalParams,\n CheckNameAvailabilityExecuteResponse,\n} from \"../models/index.js\";\n\n/** Class containing CheckNameAvailability operations. */\nexport class CheckNameAvailabilityImpl implements CheckNameAvailability {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class CheckNameAvailability class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Check the availability of name for resource\n * @param nameAvailabilityRequest The required parameters for checking if resource name is available.\n * @param options The options parameters.\n */\n execute(\n nameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: CheckNameAvailabilityExecuteOptionalParams,\n ): Promise<CheckNameAvailabilityExecuteResponse> {\n return this.client.sendOperationRequest(\n { nameAvailabilityRequest, options },\n executeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.nameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
1
+ {"version":3,"file":"checkNameAvailability.js","sourceRoot":"","sources":["../../../src/operations/checkNameAvailability.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,yDAAyD;AACzD,MAAa,yBAAyB;IACnB,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,OAAO,CACL,uBAAqD,EACrD,OAAoD;QAEpD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,uBAAuB,EAAE,OAAO,EAAE,EACpC,oBAAoB,CACrB,CAAC;IACJ,CAAC;CACF;AAzBD,8DAyBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,2FAA2F;IACjG,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,uBAAuB;IAC/C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { CheckNameAvailability } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n CheckNameAvailabilityRequest,\n CheckNameAvailabilityExecuteOptionalParams,\n CheckNameAvailabilityExecuteResponse,\n} from \"../models/index.js\";\n\n/** Class containing CheckNameAvailability operations. */\nexport class CheckNameAvailabilityImpl implements CheckNameAvailability {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class CheckNameAvailability class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Check the availability of name for resource\n * @param nameAvailabilityRequest The required parameters for checking if resource name is available.\n * @param options The options parameters.\n */\n execute(\n nameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: CheckNameAvailabilityExecuteOptionalParams,\n ): Promise<CheckNameAvailabilityExecuteResponse> {\n return this.client.sendOperationRequest(\n { nameAvailabilityRequest, options },\n executeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.nameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
14
14
  const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /** Class containing CheckNameAvailabilityWithLocation operations. */
16
16
  class CheckNameAvailabilityWithLocationImpl {
17
+ client;
17
18
  /**
18
19
  * Initialize a new instance of the class CheckNameAvailabilityWithLocation class.
19
20
  * @param client Reference to the service client
@@ -1 +1 @@
1
- {"version":3,"file":"checkNameAvailabilityWithLocation.js","sourceRoot":"","sources":["../../../src/operations/checkNameAvailabilityWithLocation.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,qEAAqE;AACrE,MAAa,qCAAqC;IAGhD;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CACL,YAAoB,EACpB,uBAAqD,EACrD,OAAgE;QAEhE,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,uBAAuB,EAAE,OAAO,EAAE,EAClD,oBAAoB,CACrB,CAAC;IACJ,CAAC;CACF;AA3BD,sFA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,oHAAoH;IAC1H,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,uBAAuB;IAC/C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,YAAY,CAAC;IACrF,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { CheckNameAvailabilityWithLocation } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n CheckNameAvailabilityRequest,\n CheckNameAvailabilityWithLocationExecuteOptionalParams,\n CheckNameAvailabilityWithLocationExecuteResponse,\n} from \"../models/index.js\";\n\n/** Class containing CheckNameAvailabilityWithLocation operations. */\nexport class CheckNameAvailabilityWithLocationImpl implements CheckNameAvailabilityWithLocation {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class CheckNameAvailabilityWithLocation class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Check the availability of name for resource\n * @param locationName The name of the location.\n * @param nameAvailabilityRequest The required parameters for checking if resource name is available.\n * @param options The options parameters.\n */\n execute(\n locationName: string,\n nameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: CheckNameAvailabilityWithLocationExecuteOptionalParams,\n ): Promise<CheckNameAvailabilityWithLocationExecuteResponse> {\n return this.client.sendOperationRequest(\n { locationName, nameAvailabilityRequest, options },\n executeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.nameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.locationName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
1
+ {"version":3,"file":"checkNameAvailabilityWithLocation.js","sourceRoot":"","sources":["../../../src/operations/checkNameAvailabilityWithLocation.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,qEAAqE;AACrE,MAAa,qCAAqC;IAC/B,MAAM,CAA2C;IAElE;;;OAGG;IACH,YAAY,MAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CACL,YAAoB,EACpB,uBAAqD,EACrD,OAAgE;QAEhE,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,uBAAuB,EAAE,OAAO,EAAE,EAClD,oBAAoB,CACrB,CAAC;IACJ,CAAC;CACF;AA3BD,sFA2BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,oHAAoH;IAC1H,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,uBAAuB;IAC/C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,YAAY,CAAC;IACrF,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type { CheckNameAvailabilityWithLocation } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport type { PostgreSQLManagementFlexibleServerClient } from \"../postgreSQLManagementFlexibleServerClient.js\";\nimport type {\n CheckNameAvailabilityRequest,\n CheckNameAvailabilityWithLocationExecuteOptionalParams,\n CheckNameAvailabilityWithLocationExecuteResponse,\n} from \"../models/index.js\";\n\n/** Class containing CheckNameAvailabilityWithLocation operations. */\nexport class CheckNameAvailabilityWithLocationImpl implements CheckNameAvailabilityWithLocation {\n private readonly client: PostgreSQLManagementFlexibleServerClient;\n\n /**\n * Initialize a new instance of the class CheckNameAvailabilityWithLocation class.\n * @param client Reference to the service client\n */\n constructor(client: PostgreSQLManagementFlexibleServerClient) {\n this.client = client;\n }\n\n /**\n * Check the availability of name for resource\n * @param locationName The name of the location.\n * @param nameAvailabilityRequest The required parameters for checking if resource name is available.\n * @param options The options parameters.\n */\n execute(\n locationName: string,\n nameAvailabilityRequest: CheckNameAvailabilityRequest,\n options?: CheckNameAvailabilityWithLocationExecuteOptionalParams,\n ): Promise<CheckNameAvailabilityWithLocationExecuteResponse> {\n return this.client.sendOperationRequest(\n { locationName, nameAvailabilityRequest, options },\n executeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst executeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.NameAvailability,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.nameAvailabilityRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.locationName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}