@azure/arm-mysql 5.0.2-alpha.20221128.1 → 5.1.0-alpha.20221205.3

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 (109) hide show
  1. package/CHANGELOG.md +28 -10
  2. package/dist/index.js +378 -135
  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 +93 -45
  11. package/dist-esm/src/models/index.d.ts.map +1 -1
  12. package/dist-esm/src/models/index.js +47 -0
  13. package/dist-esm/src/models/index.js.map +1 -1
  14. package/dist-esm/src/mySQLManagementClient.d.ts.map +1 -1
  15. package/dist-esm/src/mySQLManagementClient.js +20 -18
  16. package/dist-esm/src/mySQLManagementClient.js.map +1 -1
  17. package/dist-esm/src/operations/advisors.d.ts.map +1 -1
  18. package/dist-esm/src/operations/advisors.js +19 -7
  19. package/dist-esm/src/operations/advisors.js.map +1 -1
  20. package/dist-esm/src/operations/configurations.d.ts.map +1 -1
  21. package/dist-esm/src/operations/configurations.js +8 -4
  22. package/dist-esm/src/operations/configurations.js.map +1 -1
  23. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  24. package/dist-esm/src/operations/databases.js +8 -4
  25. package/dist-esm/src/operations/databases.js.map +1 -1
  26. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
  27. package/dist-esm/src/operations/firewallRules.js +8 -4
  28. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  29. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts.map +1 -1
  30. package/dist-esm/src/operations/locationBasedPerformanceTier.js +8 -4
  31. package/dist-esm/src/operations/locationBasedPerformanceTier.js.map +1 -1
  32. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.d.ts.map +1 -1
  33. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js +19 -7
  34. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
  35. package/dist-esm/src/operations/logFiles.d.ts.map +1 -1
  36. package/dist-esm/src/operations/logFiles.js +8 -4
  37. package/dist-esm/src/operations/logFiles.js.map +1 -1
  38. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  39. package/dist-esm/src/operations/privateEndpointConnections.js +19 -7
  40. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  41. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
  42. package/dist-esm/src/operations/privateLinkResources.js +19 -7
  43. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  44. package/dist-esm/src/operations/queryTexts.d.ts.map +1 -1
  45. package/dist-esm/src/operations/queryTexts.js +19 -7
  46. package/dist-esm/src/operations/queryTexts.js.map +1 -1
  47. package/dist-esm/src/operations/recommendedActions.d.ts.map +1 -1
  48. package/dist-esm/src/operations/recommendedActions.js +19 -7
  49. package/dist-esm/src/operations/recommendedActions.js.map +1 -1
  50. package/dist-esm/src/operations/replicas.d.ts.map +1 -1
  51. package/dist-esm/src/operations/replicas.js +8 -4
  52. package/dist-esm/src/operations/replicas.js.map +1 -1
  53. package/dist-esm/src/operations/serverAdministrators.d.ts.map +1 -1
  54. package/dist-esm/src/operations/serverAdministrators.js +8 -4
  55. package/dist-esm/src/operations/serverAdministrators.js.map +1 -1
  56. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts.map +1 -1
  57. package/dist-esm/src/operations/serverBasedPerformanceTier.js +8 -4
  58. package/dist-esm/src/operations/serverBasedPerformanceTier.js.map +1 -1
  59. package/dist-esm/src/operations/serverKeys.d.ts.map +1 -1
  60. package/dist-esm/src/operations/serverKeys.js +19 -7
  61. package/dist-esm/src/operations/serverKeys.js.map +1 -1
  62. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts.map +1 -1
  63. package/dist-esm/src/operations/serverSecurityAlertPolicies.js +19 -7
  64. package/dist-esm/src/operations/serverSecurityAlertPolicies.js.map +1 -1
  65. package/dist-esm/src/operations/servers.d.ts.map +1 -1
  66. package/dist-esm/src/operations/servers.js +16 -8
  67. package/dist-esm/src/operations/servers.js.map +1 -1
  68. package/dist-esm/src/operations/topQueryStatistics.d.ts.map +1 -1
  69. package/dist-esm/src/operations/topQueryStatistics.js +19 -7
  70. package/dist-esm/src/operations/topQueryStatistics.js.map +1 -1
  71. package/dist-esm/src/operations/virtualNetworkRules.d.ts.map +1 -1
  72. package/dist-esm/src/operations/virtualNetworkRules.js +19 -7
  73. package/dist-esm/src/operations/virtualNetworkRules.js.map +1 -1
  74. package/dist-esm/src/operations/waitStatistics.d.ts.map +1 -1
  75. package/dist-esm/src/operations/waitStatistics.js +19 -7
  76. package/dist-esm/src/operations/waitStatistics.js.map +1 -1
  77. package/dist-esm/src/pagingHelper.d.ts +13 -0
  78. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  79. package/dist-esm/src/pagingHelper.js +32 -0
  80. package/dist-esm/src/pagingHelper.js.map +1 -0
  81. package/dist-esm/test/sampleTest.js +11 -13
  82. package/dist-esm/test/sampleTest.js.map +1 -1
  83. package/package.json +12 -8
  84. package/review/arm-mysql.api.md +92 -135
  85. package/src/index.ts +1 -0
  86. package/src/models/index.ts +94 -45
  87. package/src/mySQLManagementClient.ts +26 -20
  88. package/src/operations/advisors.ts +23 -13
  89. package/src/operations/configurations.ts +13 -11
  90. package/src/operations/databases.ts +13 -11
  91. package/src/operations/firewallRules.ts +13 -11
  92. package/src/operations/locationBasedPerformanceTier.ts +10 -5
  93. package/src/operations/locationBasedRecommendedActionSessionsResult.ts +26 -8
  94. package/src/operations/logFiles.ts +11 -9
  95. package/src/operations/privateEndpointConnections.ts +23 -13
  96. package/src/operations/privateLinkResources.ts +22 -12
  97. package/src/operations/queryTexts.ts +28 -14
  98. package/src/operations/recommendedActions.ts +28 -14
  99. package/src/operations/replicas.ts +11 -9
  100. package/src/operations/serverAdministrators.ts +17 -7
  101. package/src/operations/serverBasedPerformanceTier.ts +15 -5
  102. package/src/operations/serverKeys.ts +26 -8
  103. package/src/operations/serverSecurityAlertPolicies.ts +23 -13
  104. package/src/operations/servers.ts +25 -11
  105. package/src/operations/topQueryStatistics.ts +28 -14
  106. package/src/operations/virtualNetworkRules.ts +23 -13
  107. package/src/operations/waitStatistics.ts +28 -14
  108. package/src/pagingHelper.ts +39 -0
  109. package/types/arm-mysql.d.ts +102 -45
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { Databases } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -17,12 +17,12 @@ import { LroImpl } from "../lroImpl";
17
17
  import {
18
18
  Database,
19
19
  DatabasesListByServerOptionalParams,
20
+ DatabasesListByServerResponse,
20
21
  DatabasesCreateOrUpdateOptionalParams,
21
22
  DatabasesCreateOrUpdateResponse,
22
23
  DatabasesDeleteOptionalParams,
23
24
  DatabasesGetOptionalParams,
24
- DatabasesGetResponse,
25
- DatabasesListByServerResponse
25
+ DatabasesGetResponse
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -61,11 +61,15 @@ export class DatabasesImpl implements Databases {
61
61
  [Symbol.asyncIterator]() {
62
62
  return this;
63
63
  },
64
- byPage: () => {
64
+ byPage: (settings?: PageSettings) => {
65
+ if (settings?.maxPageSize) {
66
+ throw new Error("maxPageSize is not supported by this operation.");
67
+ }
65
68
  return this.listByServerPagingPage(
66
69
  resourceGroupName,
67
70
  serverName,
68
- options
71
+ options,
72
+ settings
69
73
  );
70
74
  }
71
75
  };
@@ -74,13 +78,11 @@ export class DatabasesImpl implements Databases {
74
78
  private async *listByServerPagingPage(
75
79
  resourceGroupName: string,
76
80
  serverName: string,
77
- options?: DatabasesListByServerOptionalParams
81
+ options?: DatabasesListByServerOptionalParams,
82
+ _settings?: PageSettings
78
83
  ): AsyncIterableIterator<Database[]> {
79
- let result = await this._listByServer(
80
- resourceGroupName,
81
- serverName,
82
- options
83
- );
84
+ let result: DatabasesListByServerResponse;
85
+ result = await this._listByServer(resourceGroupName, serverName, options);
84
86
  yield result.value || [];
85
87
  }
86
88
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { FirewallRules } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -17,12 +17,12 @@ import { LroImpl } from "../lroImpl";
17
17
  import {
18
18
  FirewallRule,
19
19
  FirewallRulesListByServerOptionalParams,
20
+ FirewallRulesListByServerResponse,
20
21
  FirewallRulesCreateOrUpdateOptionalParams,
21
22
  FirewallRulesCreateOrUpdateResponse,
22
23
  FirewallRulesDeleteOptionalParams,
23
24
  FirewallRulesGetOptionalParams,
24
- FirewallRulesGetResponse,
25
- FirewallRulesListByServerResponse
25
+ FirewallRulesGetResponse
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -61,11 +61,15 @@ export class FirewallRulesImpl implements FirewallRules {
61
61
  [Symbol.asyncIterator]() {
62
62
  return this;
63
63
  },
64
- byPage: () => {
64
+ byPage: (settings?: PageSettings) => {
65
+ if (settings?.maxPageSize) {
66
+ throw new Error("maxPageSize is not supported by this operation.");
67
+ }
65
68
  return this.listByServerPagingPage(
66
69
  resourceGroupName,
67
70
  serverName,
68
- options
71
+ options,
72
+ settings
69
73
  );
70
74
  }
71
75
  };
@@ -74,13 +78,11 @@ export class FirewallRulesImpl implements FirewallRules {
74
78
  private async *listByServerPagingPage(
75
79
  resourceGroupName: string,
76
80
  serverName: string,
77
- options?: FirewallRulesListByServerOptionalParams
81
+ options?: FirewallRulesListByServerOptionalParams,
82
+ _settings?: PageSettings
78
83
  ): AsyncIterableIterator<FirewallRule[]> {
79
- let result = await this._listByServer(
80
- resourceGroupName,
81
- serverName,
82
- options
83
- );
84
+ let result: FirewallRulesListByServerResponse;
85
+ result = await this._listByServer(resourceGroupName, serverName, options);
84
86
  yield result.value || [];
85
87
  }
86
88
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { LocationBasedPerformanceTier } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -49,17 +49,22 @@ export class LocationBasedPerformanceTierImpl
49
49
  [Symbol.asyncIterator]() {
50
50
  return this;
51
51
  },
52
- byPage: () => {
53
- return this.listPagingPage(locationName, options);
52
+ byPage: (settings?: PageSettings) => {
53
+ if (settings?.maxPageSize) {
54
+ throw new Error("maxPageSize is not supported by this operation.");
55
+ }
56
+ return this.listPagingPage(locationName, options, settings);
54
57
  }
55
58
  };
56
59
  }
57
60
 
58
61
  private async *listPagingPage(
59
62
  locationName: string,
60
- options?: LocationBasedPerformanceTierListOptionalParams
63
+ options?: LocationBasedPerformanceTierListOptionalParams,
64
+ _settings?: PageSettings
61
65
  ): AsyncIterableIterator<PerformanceTierProperties[]> {
62
- let result = await this._list(locationName, options);
66
+ let result: LocationBasedPerformanceTierListResponse;
67
+ result = await this._list(locationName, options);
63
68
  yield result.value || [];
64
69
  }
65
70
 
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { LocationBasedRecommendedActionSessionsResult } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -53,8 +54,16 @@ export class LocationBasedRecommendedActionSessionsResultImpl
53
54
  [Symbol.asyncIterator]() {
54
55
  return this;
55
56
  },
56
- byPage: () => {
57
- return this.listPagingPage(locationName, operationId, options);
57
+ byPage: (settings?: PageSettings) => {
58
+ if (settings?.maxPageSize) {
59
+ throw new Error("maxPageSize is not supported by this operation.");
60
+ }
61
+ return this.listPagingPage(
62
+ locationName,
63
+ operationId,
64
+ options,
65
+ settings
66
+ );
58
67
  }
59
68
  };
60
69
  }
@@ -62,11 +71,18 @@ export class LocationBasedRecommendedActionSessionsResultImpl
62
71
  private async *listPagingPage(
63
72
  locationName: string,
64
73
  operationId: string,
65
- options?: LocationBasedRecommendedActionSessionsResultListOptionalParams
74
+ options?: LocationBasedRecommendedActionSessionsResultListOptionalParams,
75
+ settings?: PageSettings
66
76
  ): AsyncIterableIterator<RecommendationAction[]> {
67
- let result = await this._list(locationName, operationId, options);
68
- yield result.value || [];
69
- let continuationToken = result.nextLink;
77
+ let result: LocationBasedRecommendedActionSessionsResultListResponse;
78
+ let continuationToken = settings?.continuationToken;
79
+ if (!continuationToken) {
80
+ result = await this._list(locationName, operationId, options);
81
+ let page = result.value || [];
82
+ continuationToken = result.nextLink;
83
+ setContinuationToken(page, continuationToken);
84
+ yield page;
85
+ }
70
86
  while (continuationToken) {
71
87
  result = await this._listNext(
72
88
  locationName,
@@ -75,7 +91,9 @@ export class LocationBasedRecommendedActionSessionsResultImpl
75
91
  options
76
92
  );
77
93
  continuationToken = result.nextLink;
78
- yield result.value || [];
94
+ let page = result.value || [];
95
+ setContinuationToken(page, continuationToken);
96
+ yield page;
79
97
  }
80
98
  }
81
99
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { LogFiles } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -54,11 +54,15 @@ export class LogFilesImpl implements LogFiles {
54
54
  [Symbol.asyncIterator]() {
55
55
  return this;
56
56
  },
57
- byPage: () => {
57
+ byPage: (settings?: PageSettings) => {
58
+ if (settings?.maxPageSize) {
59
+ throw new Error("maxPageSize is not supported by this operation.");
60
+ }
58
61
  return this.listByServerPagingPage(
59
62
  resourceGroupName,
60
63
  serverName,
61
- options
64
+ options,
65
+ settings
62
66
  );
63
67
  }
64
68
  };
@@ -67,13 +71,11 @@ export class LogFilesImpl implements LogFiles {
67
71
  private async *listByServerPagingPage(
68
72
  resourceGroupName: string,
69
73
  serverName: string,
70
- options?: LogFilesListByServerOptionalParams
74
+ options?: LogFilesListByServerOptionalParams,
75
+ _settings?: PageSettings
71
76
  ): AsyncIterableIterator<LogFile[]> {
72
- let result = await this._listByServer(
73
- resourceGroupName,
74
- serverName,
75
- options
76
- );
77
+ let result: LogFilesListByServerResponse;
78
+ result = await this._listByServer(resourceGroupName, serverName, options);
77
79
  yield result.value || [];
78
80
  }
79
81
 
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { PrivateEndpointConnections } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,6 +19,7 @@ import {
18
19
  PrivateEndpointConnection,
19
20
  PrivateEndpointConnectionsListByServerNextOptionalParams,
20
21
  PrivateEndpointConnectionsListByServerOptionalParams,
22
+ PrivateEndpointConnectionsListByServerResponse,
21
23
  PrivateEndpointConnectionsGetOptionalParams,
22
24
  PrivateEndpointConnectionsGetResponse,
23
25
  PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
@@ -26,7 +28,6 @@ import {
26
28
  TagsObject,
27
29
  PrivateEndpointConnectionsUpdateTagsOptionalParams,
28
30
  PrivateEndpointConnectionsUpdateTagsResponse,
29
- PrivateEndpointConnectionsListByServerResponse,
30
31
  PrivateEndpointConnectionsListByServerNextResponse
31
32
  } from "../models";
32
33
 
@@ -67,11 +68,15 @@ export class PrivateEndpointConnectionsImpl
67
68
  [Symbol.asyncIterator]() {
68
69
  return this;
69
70
  },
70
- byPage: () => {
71
+ byPage: (settings?: PageSettings) => {
72
+ if (settings?.maxPageSize) {
73
+ throw new Error("maxPageSize is not supported by this operation.");
74
+ }
71
75
  return this.listByServerPagingPage(
72
76
  resourceGroupName,
73
77
  serverName,
74
- options
78
+ options,
79
+ settings
75
80
  );
76
81
  }
77
82
  };
@@ -80,15 +85,18 @@ export class PrivateEndpointConnectionsImpl
80
85
  private async *listByServerPagingPage(
81
86
  resourceGroupName: string,
82
87
  serverName: string,
83
- options?: PrivateEndpointConnectionsListByServerOptionalParams
88
+ options?: PrivateEndpointConnectionsListByServerOptionalParams,
89
+ settings?: PageSettings
84
90
  ): AsyncIterableIterator<PrivateEndpointConnection[]> {
85
- let result = await this._listByServer(
86
- resourceGroupName,
87
- serverName,
88
- options
89
- );
90
- yield result.value || [];
91
- let continuationToken = result.nextLink;
91
+ let result: PrivateEndpointConnectionsListByServerResponse;
92
+ let continuationToken = settings?.continuationToken;
93
+ if (!continuationToken) {
94
+ result = await this._listByServer(resourceGroupName, serverName, options);
95
+ let page = result.value || [];
96
+ continuationToken = result.nextLink;
97
+ setContinuationToken(page, continuationToken);
98
+ yield page;
99
+ }
92
100
  while (continuationToken) {
93
101
  result = await this._listByServerNext(
94
102
  resourceGroupName,
@@ -97,7 +105,9 @@ export class PrivateEndpointConnectionsImpl
97
105
  options
98
106
  );
99
107
  continuationToken = result.nextLink;
100
- yield result.value || [];
108
+ let page = result.value || [];
109
+ setContinuationToken(page, continuationToken);
110
+ yield page;
101
111
  }
102
112
  }
103
113
 
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { PrivateLinkResources } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -58,11 +59,15 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
58
59
  [Symbol.asyncIterator]() {
59
60
  return this;
60
61
  },
61
- byPage: () => {
62
+ byPage: (settings?: PageSettings) => {
63
+ if (settings?.maxPageSize) {
64
+ throw new Error("maxPageSize is not supported by this operation.");
65
+ }
62
66
  return this.listByServerPagingPage(
63
67
  resourceGroupName,
64
68
  serverName,
65
- options
69
+ options,
70
+ settings
66
71
  );
67
72
  }
68
73
  };
@@ -71,15 +76,18 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
71
76
  private async *listByServerPagingPage(
72
77
  resourceGroupName: string,
73
78
  serverName: string,
74
- options?: PrivateLinkResourcesListByServerOptionalParams
79
+ options?: PrivateLinkResourcesListByServerOptionalParams,
80
+ settings?: PageSettings
75
81
  ): AsyncIterableIterator<PrivateLinkResource[]> {
76
- let result = await this._listByServer(
77
- resourceGroupName,
78
- serverName,
79
- options
80
- );
81
- yield result.value || [];
82
- let continuationToken = result.nextLink;
82
+ let result: PrivateLinkResourcesListByServerResponse;
83
+ let continuationToken = settings?.continuationToken;
84
+ if (!continuationToken) {
85
+ result = await this._listByServer(resourceGroupName, serverName, options);
86
+ let page = result.value || [];
87
+ continuationToken = result.nextLink;
88
+ setContinuationToken(page, continuationToken);
89
+ yield page;
90
+ }
83
91
  while (continuationToken) {
84
92
  result = await this._listByServerNext(
85
93
  resourceGroupName,
@@ -88,7 +96,9 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
88
96
  options
89
97
  );
90
98
  continuationToken = result.nextLink;
91
- yield result.value || [];
99
+ let page = result.value || [];
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
92
102
  }
93
103
  }
94
104
 
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { QueryTexts } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -16,9 +17,9 @@ import {
16
17
  QueryText,
17
18
  QueryTextsListByServerNextOptionalParams,
18
19
  QueryTextsListByServerOptionalParams,
20
+ QueryTextsListByServerResponse,
19
21
  QueryTextsGetOptionalParams,
20
22
  QueryTextsGetResponse,
21
- QueryTextsListByServerResponse,
22
23
  QueryTextsListByServerNextResponse
23
24
  } from "../models";
24
25
 
@@ -61,12 +62,16 @@ export class QueryTextsImpl implements QueryTexts {
61
62
  [Symbol.asyncIterator]() {
62
63
  return this;
63
64
  },
64
- byPage: () => {
65
+ byPage: (settings?: PageSettings) => {
66
+ if (settings?.maxPageSize) {
67
+ throw new Error("maxPageSize is not supported by this operation.");
68
+ }
65
69
  return this.listByServerPagingPage(
66
70
  resourceGroupName,
67
71
  serverName,
68
72
  queryIds,
69
- options
73
+ options,
74
+ settings
70
75
  );
71
76
  }
72
77
  };
@@ -76,16 +81,23 @@ export class QueryTextsImpl implements QueryTexts {
76
81
  resourceGroupName: string,
77
82
  serverName: string,
78
83
  queryIds: string[],
79
- options?: QueryTextsListByServerOptionalParams
84
+ options?: QueryTextsListByServerOptionalParams,
85
+ settings?: PageSettings
80
86
  ): AsyncIterableIterator<QueryText[]> {
81
- let result = await this._listByServer(
82
- resourceGroupName,
83
- serverName,
84
- queryIds,
85
- options
86
- );
87
- yield result.value || [];
88
- let continuationToken = result.nextLink;
87
+ let result: QueryTextsListByServerResponse;
88
+ let continuationToken = settings?.continuationToken;
89
+ if (!continuationToken) {
90
+ result = await this._listByServer(
91
+ resourceGroupName,
92
+ serverName,
93
+ queryIds,
94
+ options
95
+ );
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
89
101
  while (continuationToken) {
90
102
  result = await this._listByServerNext(
91
103
  resourceGroupName,
@@ -95,7 +107,9 @@ export class QueryTextsImpl implements QueryTexts {
95
107
  options
96
108
  );
97
109
  continuationToken = result.nextLink;
98
- yield result.value || [];
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
99
113
  }
100
114
  }
101
115
 
@@ -6,7 +6,8 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
10
11
  import { RecommendedActions } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -16,9 +17,9 @@ import {
16
17
  RecommendationAction,
17
18
  RecommendedActionsListByServerNextOptionalParams,
18
19
  RecommendedActionsListByServerOptionalParams,
20
+ RecommendedActionsListByServerResponse,
19
21
  RecommendedActionsGetOptionalParams,
20
22
  RecommendedActionsGetResponse,
21
- RecommendedActionsListByServerResponse,
22
23
  RecommendedActionsListByServerNextResponse
23
24
  } from "../models";
24
25
 
@@ -61,12 +62,16 @@ export class RecommendedActionsImpl implements RecommendedActions {
61
62
  [Symbol.asyncIterator]() {
62
63
  return this;
63
64
  },
64
- byPage: () => {
65
+ byPage: (settings?: PageSettings) => {
66
+ if (settings?.maxPageSize) {
67
+ throw new Error("maxPageSize is not supported by this operation.");
68
+ }
65
69
  return this.listByServerPagingPage(
66
70
  resourceGroupName,
67
71
  serverName,
68
72
  advisorName,
69
- options
73
+ options,
74
+ settings
70
75
  );
71
76
  }
72
77
  };
@@ -76,16 +81,23 @@ export class RecommendedActionsImpl implements RecommendedActions {
76
81
  resourceGroupName: string,
77
82
  serverName: string,
78
83
  advisorName: string,
79
- options?: RecommendedActionsListByServerOptionalParams
84
+ options?: RecommendedActionsListByServerOptionalParams,
85
+ settings?: PageSettings
80
86
  ): AsyncIterableIterator<RecommendationAction[]> {
81
- let result = await this._listByServer(
82
- resourceGroupName,
83
- serverName,
84
- advisorName,
85
- options
86
- );
87
- yield result.value || [];
88
- let continuationToken = result.nextLink;
87
+ let result: RecommendedActionsListByServerResponse;
88
+ let continuationToken = settings?.continuationToken;
89
+ if (!continuationToken) {
90
+ result = await this._listByServer(
91
+ resourceGroupName,
92
+ serverName,
93
+ advisorName,
94
+ options
95
+ );
96
+ let page = result.value || [];
97
+ continuationToken = result.nextLink;
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
100
+ }
89
101
  while (continuationToken) {
90
102
  result = await this._listByServerNext(
91
103
  resourceGroupName,
@@ -95,7 +107,9 @@ export class RecommendedActionsImpl implements RecommendedActions {
95
107
  options
96
108
  );
97
109
  continuationToken = result.nextLink;
98
- yield result.value || [];
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
99
113
  }
100
114
  }
101
115
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { Replicas } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -54,11 +54,15 @@ export class ReplicasImpl implements Replicas {
54
54
  [Symbol.asyncIterator]() {
55
55
  return this;
56
56
  },
57
- byPage: () => {
57
+ byPage: (settings?: PageSettings) => {
58
+ if (settings?.maxPageSize) {
59
+ throw new Error("maxPageSize is not supported by this operation.");
60
+ }
58
61
  return this.listByServerPagingPage(
59
62
  resourceGroupName,
60
63
  serverName,
61
- options
64
+ options,
65
+ settings
62
66
  );
63
67
  }
64
68
  };
@@ -67,13 +71,11 @@ export class ReplicasImpl implements Replicas {
67
71
  private async *listByServerPagingPage(
68
72
  resourceGroupName: string,
69
73
  serverName: string,
70
- options?: ReplicasListByServerOptionalParams
74
+ options?: ReplicasListByServerOptionalParams,
75
+ _settings?: PageSettings
71
76
  ): AsyncIterableIterator<Server[]> {
72
- let result = await this._listByServer(
73
- resourceGroupName,
74
- serverName,
75
- options
76
- );
77
+ let result: ReplicasListByServerResponse;
78
+ result = await this._listByServer(resourceGroupName, serverName, options);
77
79
  yield result.value || [];
78
80
  }
79
81
 
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { ServerAdministrators } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -17,12 +17,12 @@ import { LroImpl } from "../lroImpl";
17
17
  import {
18
18
  ServerAdministratorResource,
19
19
  ServerAdministratorsListOptionalParams,
20
+ ServerAdministratorsListResponse,
20
21
  ServerAdministratorsGetOptionalParams,
21
22
  ServerAdministratorsGetResponse,
22
23
  ServerAdministratorsCreateOrUpdateOptionalParams,
23
24
  ServerAdministratorsCreateOrUpdateResponse,
24
- ServerAdministratorsDeleteOptionalParams,
25
- ServerAdministratorsListResponse
25
+ ServerAdministratorsDeleteOptionalParams
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -57,8 +57,16 @@ export class ServerAdministratorsImpl implements ServerAdministrators {
57
57
  [Symbol.asyncIterator]() {
58
58
  return this;
59
59
  },
60
- byPage: () => {
61
- return this.listPagingPage(resourceGroupName, serverName, options);
60
+ byPage: (settings?: PageSettings) => {
61
+ if (settings?.maxPageSize) {
62
+ throw new Error("maxPageSize is not supported by this operation.");
63
+ }
64
+ return this.listPagingPage(
65
+ resourceGroupName,
66
+ serverName,
67
+ options,
68
+ settings
69
+ );
62
70
  }
63
71
  };
64
72
  }
@@ -66,9 +74,11 @@ export class ServerAdministratorsImpl implements ServerAdministrators {
66
74
  private async *listPagingPage(
67
75
  resourceGroupName: string,
68
76
  serverName: string,
69
- options?: ServerAdministratorsListOptionalParams
77
+ options?: ServerAdministratorsListOptionalParams,
78
+ _settings?: PageSettings
70
79
  ): AsyncIterableIterator<ServerAdministratorResource[]> {
71
- let result = await this._list(resourceGroupName, serverName, options);
80
+ let result: ServerAdministratorsListResponse;
81
+ result = await this._list(resourceGroupName, serverName, options);
72
82
  yield result.value || [];
73
83
  }
74
84