@azure/arm-postgresql 6.0.2-alpha.20221102.1 → 6.1.0-alpha.20221202.2

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 (86) hide show
  1. package/CHANGELOG.md +24 -11
  2. package/dist/index.js +271 -93
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/index.d.ts +1 -0
  7. package/dist-esm/src/index.d.ts.map +1 -1
  8. package/dist-esm/src/index.js +1 -0
  9. package/dist-esm/src/index.js.map +1 -1
  10. package/dist-esm/src/models/index.d.ts +84 -35
  11. package/dist-esm/src/models/index.d.ts.map +1 -1
  12. package/dist-esm/src/models/index.js +48 -0
  13. package/dist-esm/src/models/index.js.map +1 -1
  14. package/dist-esm/src/operations/configurations.d.ts.map +1 -1
  15. package/dist-esm/src/operations/configurations.js +8 -4
  16. package/dist-esm/src/operations/configurations.js.map +1 -1
  17. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  18. package/dist-esm/src/operations/databases.js +8 -4
  19. package/dist-esm/src/operations/databases.js.map +1 -1
  20. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
  21. package/dist-esm/src/operations/firewallRules.js +8 -4
  22. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  23. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts.map +1 -1
  24. package/dist-esm/src/operations/locationBasedPerformanceTier.js +8 -4
  25. package/dist-esm/src/operations/locationBasedPerformanceTier.js.map +1 -1
  26. package/dist-esm/src/operations/logFiles.d.ts.map +1 -1
  27. package/dist-esm/src/operations/logFiles.js +8 -4
  28. package/dist-esm/src/operations/logFiles.js.map +1 -1
  29. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  30. package/dist-esm/src/operations/privateEndpointConnections.js +19 -7
  31. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  32. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
  33. package/dist-esm/src/operations/privateLinkResources.js +19 -7
  34. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  35. package/dist-esm/src/operations/replicas.d.ts.map +1 -1
  36. package/dist-esm/src/operations/replicas.js +8 -4
  37. package/dist-esm/src/operations/replicas.js.map +1 -1
  38. package/dist-esm/src/operations/serverAdministrators.d.ts.map +1 -1
  39. package/dist-esm/src/operations/serverAdministrators.js +8 -4
  40. package/dist-esm/src/operations/serverAdministrators.js.map +1 -1
  41. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts.map +1 -1
  42. package/dist-esm/src/operations/serverBasedPerformanceTier.js +8 -4
  43. package/dist-esm/src/operations/serverBasedPerformanceTier.js.map +1 -1
  44. package/dist-esm/src/operations/serverKeys.d.ts.map +1 -1
  45. package/dist-esm/src/operations/serverKeys.js +19 -7
  46. package/dist-esm/src/operations/serverKeys.js.map +1 -1
  47. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts.map +1 -1
  48. package/dist-esm/src/operations/serverSecurityAlertPolicies.js +19 -7
  49. package/dist-esm/src/operations/serverSecurityAlertPolicies.js.map +1 -1
  50. package/dist-esm/src/operations/servers.d.ts.map +1 -1
  51. package/dist-esm/src/operations/servers.js +16 -8
  52. package/dist-esm/src/operations/servers.js.map +1 -1
  53. package/dist-esm/src/operations/virtualNetworkRules.d.ts.map +1 -1
  54. package/dist-esm/src/operations/virtualNetworkRules.js +19 -7
  55. package/dist-esm/src/operations/virtualNetworkRules.js.map +1 -1
  56. package/dist-esm/src/pagingHelper.d.ts +13 -0
  57. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  58. package/dist-esm/src/pagingHelper.js +32 -0
  59. package/dist-esm/src/pagingHelper.js.map +1 -0
  60. package/dist-esm/src/postgreSQLManagementClient.d.ts.map +1 -1
  61. package/dist-esm/src/postgreSQLManagementClient.js +20 -18
  62. package/dist-esm/src/postgreSQLManagementClient.js.map +1 -1
  63. package/dist-esm/test/sampleTest.js +11 -13
  64. package/dist-esm/test/sampleTest.js.map +1 -1
  65. package/package.json +12 -8
  66. package/review/arm-postgresql.api.md +68 -112
  67. package/src/index.ts +1 -0
  68. package/src/models/index.ts +85 -35
  69. package/src/operations/configurations.ts +13 -11
  70. package/src/operations/databases.ts +13 -11
  71. package/src/operations/firewallRules.ts +13 -11
  72. package/src/operations/locationBasedPerformanceTier.ts +10 -5
  73. package/src/operations/logFiles.ts +11 -9
  74. package/src/operations/privateEndpointConnections.ts +23 -13
  75. package/src/operations/privateLinkResources.ts +22 -12
  76. package/src/operations/replicas.ts +11 -9
  77. package/src/operations/serverAdministrators.ts +17 -7
  78. package/src/operations/serverBasedPerformanceTier.ts +15 -5
  79. package/src/operations/serverKeys.ts +26 -8
  80. package/src/operations/serverSecurityAlertPolicies.ts +23 -13
  81. package/src/operations/servers.ts +25 -11
  82. package/src/operations/virtualNetworkRules.ts +23 -13
  83. package/src/pagingHelper.ts +39 -0
  84. package/src/postgreSQLManagementClient.ts +26 -20
  85. package/types/arm-postgresql.d.ts +93 -35
  86. package/types/tsdoc-metadata.json +1 -1
package/dist/index.js CHANGED
@@ -28,6 +28,38 @@ function _interopNamespace(e) {
28
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
29
  var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
30
 
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ const pageMap = new WeakMap();
39
+ /**
40
+ * Given a result page from a pageable operation, returns a
41
+ * continuation token that can be used to begin paging from
42
+ * that point later.
43
+ * @param page A result object from calling .byPage() on a paged operation.
44
+ * @returns The continuation token that can be passed into byPage().
45
+ */
46
+ function getContinuationToken(page) {
47
+ var _a;
48
+ if (typeof page !== "object" || page === null) {
49
+ return undefined;
50
+ }
51
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
52
+ }
53
+ function setContinuationToken(page, continuationToken) {
54
+ var _a;
55
+ if (typeof page !== "object" || page === null || !continuationToken) {
56
+ return;
57
+ }
58
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
59
+ pageInfo.continuationToken = continuationToken;
60
+ pageMap.set(page, pageInfo);
61
+ }
62
+
31
63
  /*
32
64
  * Copyright (c) Microsoft Corporation.
33
65
  * Licensed under the MIT License.
@@ -38,31 +70,45 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
38
70
  /** Known values of {@link IdentityType} that the service accepts. */
39
71
  exports.KnownIdentityType = void 0;
40
72
  (function (KnownIdentityType) {
73
+ /** SystemAssigned */
41
74
  KnownIdentityType["SystemAssigned"] = "SystemAssigned";
42
75
  })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
43
76
  /** Known values of {@link SkuTier} that the service accepts. */
44
77
  exports.KnownSkuTier = void 0;
45
78
  (function (KnownSkuTier) {
79
+ /** Basic */
46
80
  KnownSkuTier["Basic"] = "Basic";
81
+ /** GeneralPurpose */
47
82
  KnownSkuTier["GeneralPurpose"] = "GeneralPurpose";
83
+ /** MemoryOptimized */
48
84
  KnownSkuTier["MemoryOptimized"] = "MemoryOptimized";
49
85
  })(exports.KnownSkuTier || (exports.KnownSkuTier = {}));
50
86
  /** Known values of {@link ServerVersion} that the service accepts. */
51
87
  exports.KnownServerVersion = void 0;
52
88
  (function (KnownServerVersion) {
89
+ /** Nine5 */
53
90
  KnownServerVersion["Nine5"] = "9.5";
91
+ /** Nine6 */
54
92
  KnownServerVersion["Nine6"] = "9.6";
93
+ /** Ten */
55
94
  KnownServerVersion["Ten"] = "10";
95
+ /** Ten0 */
56
96
  KnownServerVersion["Ten0"] = "10.0";
97
+ /** Ten2 */
57
98
  KnownServerVersion["Ten2"] = "10.2";
99
+ /** Eleven */
58
100
  KnownServerVersion["Eleven"] = "11";
59
101
  })(exports.KnownServerVersion || (exports.KnownServerVersion = {}));
60
102
  /** Known values of {@link MinimalTlsVersionEnum} that the service accepts. */
61
103
  exports.KnownMinimalTlsVersionEnum = void 0;
62
104
  (function (KnownMinimalTlsVersionEnum) {
105
+ /** TLS10 */
63
106
  KnownMinimalTlsVersionEnum["TLS10"] = "TLS1_0";
107
+ /** TLS11 */
64
108
  KnownMinimalTlsVersionEnum["TLS11"] = "TLS1_1";
109
+ /** TLS12 */
65
110
  KnownMinimalTlsVersionEnum["TLS12"] = "TLS1_2";
111
+ /** TLSEnforcementDisabled */
66
112
  KnownMinimalTlsVersionEnum["TLSEnforcementDisabled"] = "TLSEnforcementDisabled";
67
113
  })(exports.KnownMinimalTlsVersionEnum || (exports.KnownMinimalTlsVersionEnum = {}));
68
114
  /** Known values of {@link InfrastructureEncryption} that the service accepts. */
@@ -76,83 +122,117 @@ exports.KnownInfrastructureEncryption = void 0;
76
122
  /** Known values of {@link PublicNetworkAccessEnum} that the service accepts. */
77
123
  exports.KnownPublicNetworkAccessEnum = void 0;
78
124
  (function (KnownPublicNetworkAccessEnum) {
125
+ /** Enabled */
79
126
  KnownPublicNetworkAccessEnum["Enabled"] = "Enabled";
127
+ /** Disabled */
80
128
  KnownPublicNetworkAccessEnum["Disabled"] = "Disabled";
81
129
  })(exports.KnownPublicNetworkAccessEnum || (exports.KnownPublicNetworkAccessEnum = {}));
82
130
  /** Known values of {@link GeoRedundantBackup} that the service accepts. */
83
131
  exports.KnownGeoRedundantBackup = void 0;
84
132
  (function (KnownGeoRedundantBackup) {
133
+ /** Enabled */
85
134
  KnownGeoRedundantBackup["Enabled"] = "Enabled";
135
+ /** Disabled */
86
136
  KnownGeoRedundantBackup["Disabled"] = "Disabled";
87
137
  })(exports.KnownGeoRedundantBackup || (exports.KnownGeoRedundantBackup = {}));
88
138
  /** Known values of {@link StorageAutogrow} that the service accepts. */
89
139
  exports.KnownStorageAutogrow = void 0;
90
140
  (function (KnownStorageAutogrow) {
141
+ /** Enabled */
91
142
  KnownStorageAutogrow["Enabled"] = "Enabled";
143
+ /** Disabled */
92
144
  KnownStorageAutogrow["Disabled"] = "Disabled";
93
145
  })(exports.KnownStorageAutogrow || (exports.KnownStorageAutogrow = {}));
94
146
  /** Known values of {@link CreateMode} that the service accepts. */
95
147
  exports.KnownCreateMode = void 0;
96
148
  (function (KnownCreateMode) {
149
+ /** Default */
97
150
  KnownCreateMode["Default"] = "Default";
151
+ /** PointInTimeRestore */
98
152
  KnownCreateMode["PointInTimeRestore"] = "PointInTimeRestore";
153
+ /** GeoRestore */
99
154
  KnownCreateMode["GeoRestore"] = "GeoRestore";
155
+ /** Replica */
100
156
  KnownCreateMode["Replica"] = "Replica";
101
157
  })(exports.KnownCreateMode || (exports.KnownCreateMode = {}));
102
158
  /** Known values of {@link ServerState} that the service accepts. */
103
159
  exports.KnownServerState = void 0;
104
160
  (function (KnownServerState) {
161
+ /** Ready */
105
162
  KnownServerState["Ready"] = "Ready";
163
+ /** Dropping */
106
164
  KnownServerState["Dropping"] = "Dropping";
165
+ /** Disabled */
107
166
  KnownServerState["Disabled"] = "Disabled";
167
+ /** Inaccessible */
108
168
  KnownServerState["Inaccessible"] = "Inaccessible";
109
169
  })(exports.KnownServerState || (exports.KnownServerState = {}));
110
170
  /** Known values of {@link PrivateLinkServiceConnectionStateStatus} that the service accepts. */
111
171
  exports.KnownPrivateLinkServiceConnectionStateStatus = void 0;
112
172
  (function (KnownPrivateLinkServiceConnectionStateStatus) {
173
+ /** Approved */
113
174
  KnownPrivateLinkServiceConnectionStateStatus["Approved"] = "Approved";
175
+ /** Pending */
114
176
  KnownPrivateLinkServiceConnectionStateStatus["Pending"] = "Pending";
177
+ /** Rejected */
115
178
  KnownPrivateLinkServiceConnectionStateStatus["Rejected"] = "Rejected";
179
+ /** Disconnected */
116
180
  KnownPrivateLinkServiceConnectionStateStatus["Disconnected"] = "Disconnected";
117
181
  })(exports.KnownPrivateLinkServiceConnectionStateStatus || (exports.KnownPrivateLinkServiceConnectionStateStatus = {}));
118
182
  /** Known values of {@link PrivateLinkServiceConnectionStateActionsRequire} that the service accepts. */
119
183
  exports.KnownPrivateLinkServiceConnectionStateActionsRequire = void 0;
120
184
  (function (KnownPrivateLinkServiceConnectionStateActionsRequire) {
185
+ /** None */
121
186
  KnownPrivateLinkServiceConnectionStateActionsRequire["None"] = "None";
122
187
  })(exports.KnownPrivateLinkServiceConnectionStateActionsRequire || (exports.KnownPrivateLinkServiceConnectionStateActionsRequire = {}));
123
188
  /** Known values of {@link PrivateEndpointProvisioningState} that the service accepts. */
124
189
  exports.KnownPrivateEndpointProvisioningState = void 0;
125
190
  (function (KnownPrivateEndpointProvisioningState) {
191
+ /** Approving */
126
192
  KnownPrivateEndpointProvisioningState["Approving"] = "Approving";
193
+ /** Ready */
127
194
  KnownPrivateEndpointProvisioningState["Ready"] = "Ready";
195
+ /** Dropping */
128
196
  KnownPrivateEndpointProvisioningState["Dropping"] = "Dropping";
197
+ /** Failed */
129
198
  KnownPrivateEndpointProvisioningState["Failed"] = "Failed";
199
+ /** Rejecting */
130
200
  KnownPrivateEndpointProvisioningState["Rejecting"] = "Rejecting";
131
201
  })(exports.KnownPrivateEndpointProvisioningState || (exports.KnownPrivateEndpointProvisioningState = {}));
132
202
  /** Known values of {@link VirtualNetworkRuleState} that the service accepts. */
133
203
  exports.KnownVirtualNetworkRuleState = void 0;
134
204
  (function (KnownVirtualNetworkRuleState) {
205
+ /** Initializing */
135
206
  KnownVirtualNetworkRuleState["Initializing"] = "Initializing";
207
+ /** InProgress */
136
208
  KnownVirtualNetworkRuleState["InProgress"] = "InProgress";
209
+ /** Ready */
137
210
  KnownVirtualNetworkRuleState["Ready"] = "Ready";
211
+ /** Deleting */
138
212
  KnownVirtualNetworkRuleState["Deleting"] = "Deleting";
213
+ /** Unknown */
139
214
  KnownVirtualNetworkRuleState["Unknown"] = "Unknown";
140
215
  })(exports.KnownVirtualNetworkRuleState || (exports.KnownVirtualNetworkRuleState = {}));
141
216
  /** Known values of {@link OperationOrigin} that the service accepts. */
142
217
  exports.KnownOperationOrigin = void 0;
143
218
  (function (KnownOperationOrigin) {
219
+ /** NotSpecified */
144
220
  KnownOperationOrigin["NotSpecified"] = "NotSpecified";
221
+ /** User */
145
222
  KnownOperationOrigin["User"] = "user";
223
+ /** System */
146
224
  KnownOperationOrigin["System"] = "system";
147
225
  })(exports.KnownOperationOrigin || (exports.KnownOperationOrigin = {}));
148
226
  /** Known values of {@link SecurityAlertPolicyName} that the service accepts. */
149
227
  exports.KnownSecurityAlertPolicyName = void 0;
150
228
  (function (KnownSecurityAlertPolicyName) {
229
+ /** Default */
151
230
  KnownSecurityAlertPolicyName["Default"] = "Default";
152
231
  })(exports.KnownSecurityAlertPolicyName || (exports.KnownSecurityAlertPolicyName = {}));
153
232
  /** Known values of {@link ServerKeyType} that the service accepts. */
154
233
  exports.KnownServerKeyType = void 0;
155
234
  (function (KnownServerKeyType) {
235
+ /** AzureKeyVault */
156
236
  KnownServerKeyType["AzureKeyVault"] = "AzureKeyVault";
157
237
  })(exports.KnownServerKeyType || (exports.KnownServerKeyType = {}));
158
238
 
@@ -2197,14 +2277,18 @@ class ServersImpl {
2197
2277
  [Symbol.asyncIterator]() {
2198
2278
  return this;
2199
2279
  },
2200
- byPage: () => {
2201
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
2280
+ byPage: (settings) => {
2281
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2282
+ throw new Error("maxPageSize is not supported by this operation.");
2283
+ }
2284
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
2202
2285
  }
2203
2286
  };
2204
2287
  }
2205
- listByResourceGroupPagingPage(resourceGroupName, options) {
2288
+ listByResourceGroupPagingPage(resourceGroupName, options, _settings) {
2206
2289
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2207
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2290
+ let result;
2291
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2208
2292
  yield yield tslib.__await(result.value || []);
2209
2293
  });
2210
2294
  }
@@ -2239,14 +2323,18 @@ class ServersImpl {
2239
2323
  [Symbol.asyncIterator]() {
2240
2324
  return this;
2241
2325
  },
2242
- byPage: () => {
2243
- return this.listPagingPage(options);
2326
+ byPage: (settings) => {
2327
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2328
+ throw new Error("maxPageSize is not supported by this operation.");
2329
+ }
2330
+ return this.listPagingPage(options, settings);
2244
2331
  }
2245
2332
  };
2246
2333
  }
2247
- listPagingPage(options) {
2334
+ listPagingPage(options, _settings) {
2248
2335
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2249
- let result = yield tslib.__await(this._list(options));
2336
+ let result;
2337
+ result = yield tslib.__await(this._list(options));
2250
2338
  yield yield tslib.__await(result.value || []);
2251
2339
  });
2252
2340
  }
@@ -2703,14 +2791,18 @@ class ReplicasImpl {
2703
2791
  [Symbol.asyncIterator]() {
2704
2792
  return this;
2705
2793
  },
2706
- byPage: () => {
2707
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
2794
+ byPage: (settings) => {
2795
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2796
+ throw new Error("maxPageSize is not supported by this operation.");
2797
+ }
2798
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
2708
2799
  }
2709
2800
  };
2710
2801
  }
2711
- listByServerPagingPage(resourceGroupName, serverName, options) {
2802
+ listByServerPagingPage(resourceGroupName, serverName, options, _settings) {
2712
2803
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
2713
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
2804
+ let result;
2805
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
2714
2806
  yield yield tslib.__await(result.value || []);
2715
2807
  });
2716
2808
  }
@@ -2798,14 +2890,18 @@ class FirewallRulesImpl {
2798
2890
  [Symbol.asyncIterator]() {
2799
2891
  return this;
2800
2892
  },
2801
- byPage: () => {
2802
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
2893
+ byPage: (settings) => {
2894
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2895
+ throw new Error("maxPageSize is not supported by this operation.");
2896
+ }
2897
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
2803
2898
  }
2804
2899
  };
2805
2900
  }
2806
- listByServerPagingPage(resourceGroupName, serverName, options) {
2901
+ listByServerPagingPage(resourceGroupName, serverName, options, _settings) {
2807
2902
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
2808
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
2903
+ let result;
2904
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
2809
2905
  yield yield tslib.__await(result.value || []);
2810
2906
  });
2811
2907
  }
@@ -3089,20 +3185,31 @@ class VirtualNetworkRulesImpl {
3089
3185
  [Symbol.asyncIterator]() {
3090
3186
  return this;
3091
3187
  },
3092
- byPage: () => {
3093
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
3188
+ byPage: (settings) => {
3189
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3190
+ throw new Error("maxPageSize is not supported by this operation.");
3191
+ }
3192
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
3094
3193
  }
3095
3194
  };
3096
3195
  }
3097
- listByServerPagingPage(resourceGroupName, serverName, options) {
3196
+ listByServerPagingPage(resourceGroupName, serverName, options, settings) {
3098
3197
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
3099
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3100
- yield yield tslib.__await(result.value || []);
3101
- let continuationToken = result.nextLink;
3198
+ let result;
3199
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3200
+ if (!continuationToken) {
3201
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3202
+ let page = result.value || [];
3203
+ continuationToken = result.nextLink;
3204
+ setContinuationToken(page, continuationToken);
3205
+ yield yield tslib.__await(page);
3206
+ }
3102
3207
  while (continuationToken) {
3103
3208
  result = yield tslib.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
3104
3209
  continuationToken = result.nextLink;
3105
- yield yield tslib.__await(result.value || []);
3210
+ let page = result.value || [];
3211
+ setContinuationToken(page, continuationToken);
3212
+ yield yield tslib.__await(page);
3106
3213
  }
3107
3214
  });
3108
3215
  }
@@ -3407,14 +3514,18 @@ class DatabasesImpl {
3407
3514
  [Symbol.asyncIterator]() {
3408
3515
  return this;
3409
3516
  },
3410
- byPage: () => {
3411
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
3517
+ byPage: (settings) => {
3518
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3519
+ throw new Error("maxPageSize is not supported by this operation.");
3520
+ }
3521
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
3412
3522
  }
3413
3523
  };
3414
3524
  }
3415
- listByServerPagingPage(resourceGroupName, serverName, options) {
3525
+ listByServerPagingPage(resourceGroupName, serverName, options, _settings) {
3416
3526
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
3417
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3527
+ let result;
3528
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3418
3529
  yield yield tslib.__await(result.value || []);
3419
3530
  });
3420
3531
  }
@@ -3698,14 +3809,18 @@ class ConfigurationsImpl {
3698
3809
  [Symbol.asyncIterator]() {
3699
3810
  return this;
3700
3811
  },
3701
- byPage: () => {
3702
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
3812
+ byPage: (settings) => {
3813
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3814
+ throw new Error("maxPageSize is not supported by this operation.");
3815
+ }
3816
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
3703
3817
  }
3704
3818
  };
3705
3819
  }
3706
- listByServerPagingPage(resourceGroupName, serverName, options) {
3820
+ listByServerPagingPage(resourceGroupName, serverName, options, _settings) {
3707
3821
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
3708
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3822
+ let result;
3823
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
3709
3824
  yield yield tslib.__await(result.value || []);
3710
3825
  });
3711
3826
  }
@@ -4019,14 +4134,18 @@ class LogFilesImpl {
4019
4134
  [Symbol.asyncIterator]() {
4020
4135
  return this;
4021
4136
  },
4022
- byPage: () => {
4023
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
4137
+ byPage: (settings) => {
4138
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4139
+ throw new Error("maxPageSize is not supported by this operation.");
4140
+ }
4141
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
4024
4142
  }
4025
4143
  };
4026
4144
  }
4027
- listByServerPagingPage(resourceGroupName, serverName, options) {
4145
+ listByServerPagingPage(resourceGroupName, serverName, options, _settings) {
4028
4146
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
4029
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
4147
+ let result;
4148
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
4030
4149
  yield yield tslib.__await(result.value || []);
4031
4150
  });
4032
4151
  }
@@ -4114,14 +4233,18 @@ class ServerAdministratorsImpl {
4114
4233
  [Symbol.asyncIterator]() {
4115
4234
  return this;
4116
4235
  },
4117
- byPage: () => {
4118
- return this.listPagingPage(resourceGroupName, serverName, options);
4236
+ byPage: (settings) => {
4237
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4238
+ throw new Error("maxPageSize is not supported by this operation.");
4239
+ }
4240
+ return this.listPagingPage(resourceGroupName, serverName, options, settings);
4119
4241
  }
4120
4242
  };
4121
4243
  }
4122
- listPagingPage(resourceGroupName, serverName, options) {
4244
+ listPagingPage(resourceGroupName, serverName, options, _settings) {
4123
4245
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4124
- let result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
4246
+ let result;
4247
+ result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
4125
4248
  yield yield tslib.__await(result.value || []);
4126
4249
  });
4127
4250
  }
@@ -4449,14 +4572,18 @@ class ServerBasedPerformanceTierImpl {
4449
4572
  [Symbol.asyncIterator]() {
4450
4573
  return this;
4451
4574
  },
4452
- byPage: () => {
4453
- return this.listPagingPage(resourceGroupName, serverName, options);
4575
+ byPage: (settings) => {
4576
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4577
+ throw new Error("maxPageSize is not supported by this operation.");
4578
+ }
4579
+ return this.listPagingPage(resourceGroupName, serverName, options, settings);
4454
4580
  }
4455
4581
  };
4456
4582
  }
4457
- listPagingPage(resourceGroupName, serverName, options) {
4583
+ listPagingPage(resourceGroupName, serverName, options, _settings) {
4458
4584
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4459
- let result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
4585
+ let result;
4586
+ result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
4460
4587
  yield yield tslib.__await(result.value || []);
4461
4588
  });
4462
4589
  }
@@ -4543,14 +4670,18 @@ class LocationBasedPerformanceTierImpl {
4543
4670
  [Symbol.asyncIterator]() {
4544
4671
  return this;
4545
4672
  },
4546
- byPage: () => {
4547
- return this.listPagingPage(locationName, options);
4673
+ byPage: (settings) => {
4674
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4675
+ throw new Error("maxPageSize is not supported by this operation.");
4676
+ }
4677
+ return this.listPagingPage(locationName, options, settings);
4548
4678
  }
4549
4679
  };
4550
4680
  }
4551
- listPagingPage(locationName, options) {
4681
+ listPagingPage(locationName, options, _settings) {
4552
4682
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4553
- let result = yield tslib.__await(this._list(locationName, options));
4683
+ let result;
4684
+ result = yield tslib.__await(this._list(locationName, options));
4554
4685
  yield yield tslib.__await(result.value || []);
4555
4686
  });
4556
4687
  }
@@ -4725,20 +4856,31 @@ class ServerSecurityAlertPoliciesImpl {
4725
4856
  [Symbol.asyncIterator]() {
4726
4857
  return this;
4727
4858
  },
4728
- byPage: () => {
4729
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
4859
+ byPage: (settings) => {
4860
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4861
+ throw new Error("maxPageSize is not supported by this operation.");
4862
+ }
4863
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
4730
4864
  }
4731
4865
  };
4732
4866
  }
4733
- listByServerPagingPage(resourceGroupName, serverName, options) {
4867
+ listByServerPagingPage(resourceGroupName, serverName, options, settings) {
4734
4868
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
4735
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
4736
- yield yield tslib.__await(result.value || []);
4737
- let continuationToken = result.nextLink;
4869
+ let result;
4870
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4871
+ if (!continuationToken) {
4872
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
4873
+ let page = result.value || [];
4874
+ continuationToken = result.nextLink;
4875
+ setContinuationToken(page, continuationToken);
4876
+ yield yield tslib.__await(page);
4877
+ }
4738
4878
  while (continuationToken) {
4739
4879
  result = yield tslib.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
4740
4880
  continuationToken = result.nextLink;
4741
- yield yield tslib.__await(result.value || []);
4881
+ let page = result.value || [];
4882
+ setContinuationToken(page, continuationToken);
4883
+ yield yield tslib.__await(page);
4742
4884
  }
4743
4885
  });
4744
4886
  }
@@ -4976,20 +5118,31 @@ class PrivateEndpointConnectionsImpl {
4976
5118
  [Symbol.asyncIterator]() {
4977
5119
  return this;
4978
5120
  },
4979
- byPage: () => {
4980
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
5121
+ byPage: (settings) => {
5122
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5123
+ throw new Error("maxPageSize is not supported by this operation.");
5124
+ }
5125
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
4981
5126
  }
4982
5127
  };
4983
5128
  }
4984
- listByServerPagingPage(resourceGroupName, serverName, options) {
5129
+ listByServerPagingPage(resourceGroupName, serverName, options, settings) {
4985
5130
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
4986
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
4987
- yield yield tslib.__await(result.value || []);
4988
- let continuationToken = result.nextLink;
5131
+ let result;
5132
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5133
+ if (!continuationToken) {
5134
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
5135
+ let page = result.value || [];
5136
+ continuationToken = result.nextLink;
5137
+ setContinuationToken(page, continuationToken);
5138
+ yield yield tslib.__await(page);
5139
+ }
4989
5140
  while (continuationToken) {
4990
5141
  result = yield tslib.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
4991
5142
  continuationToken = result.nextLink;
4992
- yield yield tslib.__await(result.value || []);
5143
+ let page = result.value || [];
5144
+ setContinuationToken(page, continuationToken);
5145
+ yield yield tslib.__await(page);
4993
5146
  }
4994
5147
  });
4995
5148
  }
@@ -5405,20 +5558,31 @@ class PrivateLinkResourcesImpl {
5405
5558
  [Symbol.asyncIterator]() {
5406
5559
  return this;
5407
5560
  },
5408
- byPage: () => {
5409
- return this.listByServerPagingPage(resourceGroupName, serverName, options);
5561
+ byPage: (settings) => {
5562
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5563
+ throw new Error("maxPageSize is not supported by this operation.");
5564
+ }
5565
+ return this.listByServerPagingPage(resourceGroupName, serverName, options, settings);
5410
5566
  }
5411
5567
  };
5412
5568
  }
5413
- listByServerPagingPage(resourceGroupName, serverName, options) {
5569
+ listByServerPagingPage(resourceGroupName, serverName, options, settings) {
5414
5570
  return tslib.__asyncGenerator(this, arguments, function* listByServerPagingPage_1() {
5415
- let result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
5416
- yield yield tslib.__await(result.value || []);
5417
- let continuationToken = result.nextLink;
5571
+ let result;
5572
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5573
+ if (!continuationToken) {
5574
+ result = yield tslib.__await(this._listByServer(resourceGroupName, serverName, options));
5575
+ let page = result.value || [];
5576
+ continuationToken = result.nextLink;
5577
+ setContinuationToken(page, continuationToken);
5578
+ yield yield tslib.__await(page);
5579
+ }
5418
5580
  while (continuationToken) {
5419
5581
  result = yield tslib.__await(this._listByServerNext(resourceGroupName, serverName, continuationToken, options));
5420
5582
  continuationToken = result.nextLink;
5421
- yield yield tslib.__await(result.value || []);
5583
+ let page = result.value || [];
5584
+ setContinuationToken(page, continuationToken);
5585
+ yield yield tslib.__await(page);
5422
5586
  }
5423
5587
  });
5424
5588
  }
@@ -5570,20 +5734,31 @@ class ServerKeysImpl {
5570
5734
  [Symbol.asyncIterator]() {
5571
5735
  return this;
5572
5736
  },
5573
- byPage: () => {
5574
- return this.listPagingPage(resourceGroupName, serverName, options);
5737
+ byPage: (settings) => {
5738
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5739
+ throw new Error("maxPageSize is not supported by this operation.");
5740
+ }
5741
+ return this.listPagingPage(resourceGroupName, serverName, options, settings);
5575
5742
  }
5576
5743
  };
5577
5744
  }
5578
- listPagingPage(resourceGroupName, serverName, options) {
5745
+ listPagingPage(resourceGroupName, serverName, options, settings) {
5579
5746
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5580
- let result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
5581
- yield yield tslib.__await(result.value || []);
5582
- let continuationToken = result.nextLink;
5747
+ let result;
5748
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5749
+ if (!continuationToken) {
5750
+ result = yield tslib.__await(this._list(resourceGroupName, serverName, options));
5751
+ let page = result.value || [];
5752
+ continuationToken = result.nextLink;
5753
+ setContinuationToken(page, continuationToken);
5754
+ yield yield tslib.__await(page);
5755
+ }
5583
5756
  while (continuationToken) {
5584
5757
  result = yield tslib.__await(this._listNext(resourceGroupName, serverName, continuationToken, options));
5585
5758
  continuationToken = result.nextLink;
5586
- yield yield tslib.__await(result.value || []);
5759
+ let page = result.value || [];
5760
+ setContinuationToken(page, continuationToken);
5761
+ yield yield tslib.__await(page);
5587
5762
  }
5588
5763
  });
5589
5764
  }
@@ -5882,7 +6057,7 @@ class PostgreSQLManagementClient extends coreClient__namespace.ServiceClient {
5882
6057
  * @param options The parameter options
5883
6058
  */
5884
6059
  constructor(credentials, subscriptionId, options) {
5885
- var _a, _b;
6060
+ var _a, _b, _c;
5886
6061
  if (credentials === undefined) {
5887
6062
  throw new Error("'credentials' cannot be null");
5888
6063
  }
@@ -5897,32 +6072,34 @@ class PostgreSQLManagementClient extends coreClient__namespace.ServiceClient {
5897
6072
  requestContentType: "application/json; charset=utf-8",
5898
6073
  credential: credentials
5899
6074
  };
5900
- const packageDetails = `azsdk-js-arm-postgresql/6.0.2`;
6075
+ const packageDetails = `azsdk-js-arm-postgresql/6.1.0`;
5901
6076
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
5902
6077
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
5903
6078
  : `${packageDetails}`;
5904
- if (!options.credentialScopes) {
5905
- options.credentialScopes = ["https://management.azure.com/.default"];
5906
- }
5907
6079
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
5908
6080
  userAgentPrefix
5909
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
6081
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
5910
6082
  super(optionsWithDefaults);
6083
+ let bearerTokenAuthenticationPolicyFound = false;
5911
6084
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
5912
6085
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
5913
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
6086
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
5914
6087
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
5915
- if (!bearerTokenAuthenticationPolicyFound) {
5916
- this.pipeline.removePolicy({
5917
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
5918
- });
5919
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
5920
- scopes: `${optionsWithDefaults.baseUri}/.default`,
5921
- challengeCallbacks: {
5922
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
5923
- }
5924
- }));
5925
- }
6088
+ }
6089
+ if (!options ||
6090
+ !options.pipeline ||
6091
+ options.pipeline.getOrderedPolicies().length == 0 ||
6092
+ !bearerTokenAuthenticationPolicyFound) {
6093
+ this.pipeline.removePolicy({
6094
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
6095
+ });
6096
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
6097
+ credential: credentials,
6098
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
6099
+ challengeCallbacks: {
6100
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
6101
+ }
6102
+ }));
5926
6103
  }
5927
6104
  // Parameter assignments
5928
6105
  this.subscriptionId = subscriptionId;
@@ -5950,4 +6127,5 @@ class PostgreSQLManagementClient extends coreClient__namespace.ServiceClient {
5950
6127
  }
5951
6128
 
5952
6129
  exports.PostgreSQLManagementClient = PostgreSQLManagementClient;
6130
+ exports.getContinuationToken = getContinuationToken;
5953
6131
  //# sourceMappingURL=index.js.map