@azure/arm-storagesync 9.0.2-alpha.20221213.1 → 9.1.0

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 (66) hide show
  1. package/CHANGELOG.md +19 -10
  2. package/README.md +7 -7
  3. package/dist/index.js +225 -59
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/serverEndpointsCreateSample.js +1 -1
  8. package/dist-esm/samples-dev/serverEndpointsCreateSample.js.map +1 -1
  9. package/dist-esm/src/index.d.ts +1 -0
  10. package/dist-esm/src/index.d.ts.map +1 -1
  11. package/dist-esm/src/index.js +1 -0
  12. package/dist-esm/src/index.js.map +1 -1
  13. package/dist-esm/src/microsoftStorageSync.d.ts +2 -0
  14. package/dist-esm/src/microsoftStorageSync.d.ts.map +1 -1
  15. package/dist-esm/src/microsoftStorageSync.js +49 -18
  16. package/dist-esm/src/microsoftStorageSync.js.map +1 -1
  17. package/dist-esm/src/models/index.d.ts +89 -27
  18. package/dist-esm/src/models/index.d.ts.map +1 -1
  19. package/dist-esm/src/models/index.js +61 -0
  20. package/dist-esm/src/models/index.js.map +1 -1
  21. package/dist-esm/src/operations/cloudEndpoints.d.ts.map +1 -1
  22. package/dist-esm/src/operations/cloudEndpoints.js +8 -4
  23. package/dist-esm/src/operations/cloudEndpoints.js.map +1 -1
  24. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  25. package/dist-esm/src/operations/operations.js +19 -8
  26. package/dist-esm/src/operations/operations.js.map +1 -1
  27. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  28. package/dist-esm/src/operations/privateEndpointConnections.js +8 -4
  29. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  30. package/dist-esm/src/operations/registeredServers.d.ts.map +1 -1
  31. package/dist-esm/src/operations/registeredServers.js +8 -4
  32. package/dist-esm/src/operations/registeredServers.js.map +1 -1
  33. package/dist-esm/src/operations/serverEndpoints.d.ts.map +1 -1
  34. package/dist-esm/src/operations/serverEndpoints.js +8 -4
  35. package/dist-esm/src/operations/serverEndpoints.js.map +1 -1
  36. package/dist-esm/src/operations/storageSyncServices.d.ts.map +1 -1
  37. package/dist-esm/src/operations/storageSyncServices.js +16 -8
  38. package/dist-esm/src/operations/storageSyncServices.js.map +1 -1
  39. package/dist-esm/src/operations/syncGroups.d.ts.map +1 -1
  40. package/dist-esm/src/operations/syncGroups.js +8 -4
  41. package/dist-esm/src/operations/syncGroups.js.map +1 -1
  42. package/dist-esm/src/operations/workflows.d.ts.map +1 -1
  43. package/dist-esm/src/operations/workflows.js +8 -4
  44. package/dist-esm/src/operations/workflows.js.map +1 -1
  45. package/dist-esm/src/pagingHelper.d.ts +13 -0
  46. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  47. package/dist-esm/src/pagingHelper.js +32 -0
  48. package/dist-esm/src/pagingHelper.js.map +1 -0
  49. package/dist-esm/test/sampleTest.js +11 -13
  50. package/dist-esm/test/sampleTest.js.map +1 -1
  51. package/package.json +13 -9
  52. package/review/arm-storagesync.api.md +89 -146
  53. package/src/index.ts +1 -0
  54. package/src/microsoftStorageSync.ts +60 -20
  55. package/src/models/index.ts +88 -27
  56. package/src/operations/cloudEndpoints.ts +12 -6
  57. package/src/operations/operations.ts +21 -9
  58. package/src/operations/privateEndpointConnections.ts +13 -7
  59. package/src/operations/registeredServers.ts +11 -5
  60. package/src/operations/serverEndpoints.ts +12 -6
  61. package/src/operations/storageSyncServices.ts +26 -12
  62. package/src/operations/syncGroups.ts +11 -5
  63. package/src/operations/workflows.ts +11 -5
  64. package/src/pagingHelper.ts +39 -0
  65. package/types/arm-storagesync.d.ts +100 -27
  66. package/types/tsdoc-metadata.json +1 -1
@@ -8,6 +8,11 @@
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
10
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
11
16
  import * as coreAuth from "@azure/core-auth";
12
17
  import {
13
18
  OperationsImpl,
@@ -73,47 +78,53 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
73
78
  credential: credentials
74
79
  };
75
80
 
76
- const packageDetails = `azsdk-js-arm-storagesync/9.0.2`;
81
+ const packageDetails = `azsdk-js-arm-storagesync/9.1.0`;
77
82
  const userAgentPrefix =
78
83
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
79
84
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
80
85
  : `${packageDetails}`;
81
86
 
82
- if (!options.credentialScopes) {
83
- options.credentialScopes = ["https://management.azure.com/.default"];
84
- }
85
87
  const optionsWithDefaults = {
86
88
  ...defaults,
87
89
  ...options,
88
90
  userAgentOptions: {
89
91
  userAgentPrefix
90
92
  },
91
- baseUri:
93
+ endpoint:
92
94
  options.endpoint ?? options.baseUri ?? "https://management.azure.com"
93
95
  };
94
96
  super(optionsWithDefaults);
95
97
 
98
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
96
99
  if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
97
100
  const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
98
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
101
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
99
102
  (pipelinePolicy) =>
100
103
  pipelinePolicy.name ===
101
104
  coreRestPipeline.bearerTokenAuthenticationPolicyName
102
105
  );
103
- if (!bearerTokenAuthenticationPolicyFound) {
104
- this.pipeline.removePolicy({
105
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName
106
- });
107
- this.pipeline.addPolicy(
108
- coreRestPipeline.bearerTokenAuthenticationPolicy({
109
- scopes: `${optionsWithDefaults.baseUri}/.default`,
110
- challengeCallbacks: {
111
- authorizeRequestOnChallenge:
112
- coreClient.authorizeRequestOnClaimChallenge
113
- }
114
- })
115
- );
116
- }
106
+ }
107
+ if (
108
+ !options ||
109
+ !options.pipeline ||
110
+ options.pipeline.getOrderedPolicies().length == 0 ||
111
+ !bearerTokenAuthenticationPolicyFound
112
+ ) {
113
+ this.pipeline.removePolicy({
114
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
115
+ });
116
+ this.pipeline.addPolicy(
117
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
118
+ credential: credentials,
119
+ scopes:
120
+ optionsWithDefaults.credentialScopes ??
121
+ `${optionsWithDefaults.endpoint}/.default`,
122
+ challengeCallbacks: {
123
+ authorizeRequestOnChallenge:
124
+ coreClient.authorizeRequestOnClaimChallenge
125
+ }
126
+ })
127
+ );
117
128
  }
118
129
  // Parameter assignments
119
130
  this.subscriptionId = subscriptionId;
@@ -131,6 +142,35 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
131
142
  this.registeredServers = new RegisteredServersImpl(this);
132
143
  this.workflows = new WorkflowsImpl(this);
133
144
  this.operationStatusOperations = new OperationStatusOperationsImpl(this);
145
+ this.addCustomApiVersionPolicy(options.apiVersion);
146
+ }
147
+
148
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
149
+ private addCustomApiVersionPolicy(apiVersion?: string) {
150
+ if (!apiVersion) {
151
+ return;
152
+ }
153
+ const apiVersionPolicy = {
154
+ name: "CustomApiVersionPolicy",
155
+ async sendRequest(
156
+ request: PipelineRequest,
157
+ next: SendRequest
158
+ ): Promise<PipelineResponse> {
159
+ const param = request.url.split("?");
160
+ if (param.length > 1) {
161
+ const newParams = param[1].split("&").map((item) => {
162
+ if (item.indexOf("api-version") > -1) {
163
+ return "api-version=" + apiVersion;
164
+ } else {
165
+ return item;
166
+ }
167
+ });
168
+ request.url = param[0] + "?" + newParams.join("&");
169
+ }
170
+ return next(request);
171
+ }
172
+ };
173
+ this.pipeline.addPolicy(apiVersionPolicy);
134
174
  }
135
175
 
136
176
  /**
@@ -1000,7 +1000,7 @@ export interface OperationDisplayResource {
1000
1000
  }
1001
1001
 
1002
1002
  /** The Private Endpoint Connection resource. */
1003
- export type PrivateEndpointConnection = Resource & {
1003
+ export interface PrivateEndpointConnection extends Resource {
1004
1004
  /** The resource of private end point. */
1005
1005
  privateEndpoint?: PrivateEndpoint;
1006
1006
  /** A collection of information about the state of the connection between service consumer and provider. */
@@ -1010,18 +1010,18 @@ export type PrivateEndpointConnection = Resource & {
1010
1010
  * NOTE: This property will not be serialized. It can only be populated by the server.
1011
1011
  */
1012
1012
  readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
1013
- };
1013
+ }
1014
1014
 
1015
1015
  /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
1016
- export type TrackedResource = Resource & {
1016
+ export interface TrackedResource extends Resource {
1017
1017
  /** Resource tags. */
1018
1018
  tags?: { [propertyName: string]: string };
1019
1019
  /** The geo-location where the resource lives */
1020
1020
  location: string;
1021
- };
1021
+ }
1022
1022
 
1023
1023
  /** A private link resource */
1024
- export type PrivateLinkResource = Resource & {
1024
+ export interface PrivateLinkResource extends Resource {
1025
1025
  /**
1026
1026
  * The private link resource group id.
1027
1027
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -1034,13 +1034,13 @@ export type PrivateLinkResource = Resource & {
1034
1034
  readonly requiredMembers?: string[];
1035
1035
  /** The private link resource Private link DNS zone name. */
1036
1036
  requiredZoneNames?: string[];
1037
- };
1037
+ }
1038
1038
 
1039
1039
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
1040
- export type ProxyResource = Resource & {};
1040
+ export interface ProxyResource extends Resource {}
1041
1041
 
1042
1042
  /** Storage Sync Service object. */
1043
- export type StorageSyncService = TrackedResource & {
1043
+ export interface StorageSyncService extends TrackedResource {
1044
1044
  /** Incoming Traffic Policy */
1045
1045
  incomingTrafficPolicy?: IncomingTrafficPolicy;
1046
1046
  /**
@@ -1073,10 +1073,10 @@ export type StorageSyncService = TrackedResource & {
1073
1073
  * NOTE: This property will not be serialized. It can only be populated by the server.
1074
1074
  */
1075
1075
  readonly privateEndpointConnections?: PrivateEndpointConnection[];
1076
- };
1076
+ }
1077
1077
 
1078
1078
  /** Sync Group object. */
1079
- export type SyncGroup = ProxyResource & {
1079
+ export interface SyncGroup extends ProxyResource {
1080
1080
  /**
1081
1081
  * Unique Id
1082
1082
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -1087,16 +1087,16 @@ export type SyncGroup = ProxyResource & {
1087
1087
  * NOTE: This property will not be serialized. It can only be populated by the server.
1088
1088
  */
1089
1089
  readonly syncGroupStatus?: string;
1090
- };
1090
+ }
1091
1091
 
1092
1092
  /** The parameters used when creating a sync group. */
1093
- export type SyncGroupCreateParameters = ProxyResource & {
1093
+ export interface SyncGroupCreateParameters extends ProxyResource {
1094
1094
  /** The parameters used to create the sync group */
1095
1095
  properties?: Record<string, unknown>;
1096
- };
1096
+ }
1097
1097
 
1098
1098
  /** The parameters used when creating a cloud endpoint. */
1099
- export type CloudEndpointCreateParameters = ProxyResource & {
1099
+ export interface CloudEndpointCreateParameters extends ProxyResource {
1100
1100
  /** Storage Account Resource Id */
1101
1101
  storageAccountResourceId?: string;
1102
1102
  /** Azure file share name */
@@ -1105,10 +1105,10 @@ export type CloudEndpointCreateParameters = ProxyResource & {
1105
1105
  storageAccountTenantId?: string;
1106
1106
  /** Friendly Name */
1107
1107
  friendlyName?: string;
1108
- };
1108
+ }
1109
1109
 
1110
1110
  /** Cloud Endpoint object. */
1111
- export type CloudEndpoint = ProxyResource & {
1111
+ export interface CloudEndpoint extends ProxyResource {
1112
1112
  /** Storage Account Resource Id */
1113
1113
  storageAccountResourceId?: string;
1114
1114
  /** Azure file share name */
@@ -1135,10 +1135,10 @@ export type CloudEndpoint = ProxyResource & {
1135
1135
  * NOTE: This property will not be serialized. It can only be populated by the server.
1136
1136
  */
1137
1137
  readonly changeEnumerationStatus?: CloudEndpointChangeEnumerationStatus;
1138
- };
1138
+ }
1139
1139
 
1140
1140
  /** The parameters used when creating a server endpoint. */
1141
- export type ServerEndpointCreateParameters = ProxyResource & {
1141
+ export interface ServerEndpointCreateParameters extends ProxyResource {
1142
1142
  /** Server Local path. */
1143
1143
  serverLocalPath?: string;
1144
1144
  /** Cloud Tiering. */
@@ -1161,10 +1161,10 @@ export type ServerEndpointCreateParameters = ProxyResource & {
1161
1161
  localCacheMode?: LocalCacheMode;
1162
1162
  /** Policy for how the initial upload sync session is performed. */
1163
1163
  initialUploadPolicy?: InitialUploadPolicy;
1164
- };
1164
+ }
1165
1165
 
1166
1166
  /** Server Endpoint object. */
1167
- export type ServerEndpoint = ProxyResource & {
1167
+ export interface ServerEndpoint extends ProxyResource {
1168
1168
  /** Server Local path. */
1169
1169
  serverLocalPath?: string;
1170
1170
  /** Cloud Tiering. */
@@ -1232,10 +1232,10 @@ export type ServerEndpoint = ProxyResource & {
1232
1232
  * NOTE: This property will not be serialized. It can only be populated by the server.
1233
1233
  */
1234
1234
  readonly serverName?: string;
1235
- };
1235
+ }
1236
1236
 
1237
1237
  /** Registered Server resource. */
1238
- export type RegisteredServer = ProxyResource & {
1238
+ export interface RegisteredServer extends ProxyResource {
1239
1239
  /** Registered Server Certificate */
1240
1240
  serverCertificate?: string;
1241
1241
  /** Registered Server Agent Version */
@@ -1291,10 +1291,10 @@ export type RegisteredServer = ProxyResource & {
1291
1291
  * NOTE: This property will not be serialized. It can only be populated by the server.
1292
1292
  */
1293
1293
  readonly serverName?: string;
1294
- };
1294
+ }
1295
1295
 
1296
1296
  /** The parameters used when creating a registered server. */
1297
- export type RegisteredServerCreateParameters = ProxyResource & {
1297
+ export interface RegisteredServerCreateParameters extends ProxyResource {
1298
1298
  /** Registered Server Certificate */
1299
1299
  serverCertificate?: string;
1300
1300
  /** Registered Server Agent Version */
@@ -1313,10 +1313,10 @@ export type RegisteredServerCreateParameters = ProxyResource & {
1313
1313
  serverId?: string;
1314
1314
  /** Friendly Name */
1315
1315
  friendlyName?: string;
1316
- };
1316
+ }
1317
1317
 
1318
1318
  /** Workflow resource. */
1319
- export type Workflow = ProxyResource & {
1319
+ export interface Workflow extends ProxyResource {
1320
1320
  /** last step name */
1321
1321
  lastStepName?: string;
1322
1322
  /** workflow status. */
@@ -1342,7 +1342,7 @@ export type Workflow = ProxyResource & {
1342
1342
  * NOTE: This property will not be serialized. It can only be populated by the server.
1343
1343
  */
1344
1344
  readonly lastStatusTimestamp?: Date;
1345
- };
1345
+ }
1346
1346
 
1347
1347
  /** Defines headers for Operations_list operation. */
1348
1348
  export interface OperationsListHeaders {
@@ -1704,7 +1704,9 @@ export interface MicrosoftStorageSyncLocationOperationStatusHeaders {
1704
1704
 
1705
1705
  /** Known values of {@link IncomingTrafficPolicy} that the service accepts. */
1706
1706
  export enum KnownIncomingTrafficPolicy {
1707
+ /** AllowAllTraffic */
1707
1708
  AllowAllTraffic = "AllowAllTraffic",
1709
+ /** AllowVirtualNetworksOnly */
1708
1710
  AllowVirtualNetworksOnly = "AllowVirtualNetworksOnly"
1709
1711
  }
1710
1712
 
@@ -1720,8 +1722,11 @@ export type IncomingTrafficPolicy = string;
1720
1722
 
1721
1723
  /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
1722
1724
  export enum KnownPrivateEndpointServiceConnectionStatus {
1725
+ /** Pending */
1723
1726
  Pending = "Pending",
1727
+ /** Approved */
1724
1728
  Approved = "Approved",
1729
+ /** Rejected */
1725
1730
  Rejected = "Rejected"
1726
1731
  }
1727
1732
 
@@ -1738,9 +1743,13 @@ export type PrivateEndpointServiceConnectionStatus = string;
1738
1743
 
1739
1744
  /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
1740
1745
  export enum KnownPrivateEndpointConnectionProvisioningState {
1746
+ /** Succeeded */
1741
1747
  Succeeded = "Succeeded",
1748
+ /** Creating */
1742
1749
  Creating = "Creating",
1750
+ /** Deleting */
1743
1751
  Deleting = "Deleting",
1752
+ /** Failed */
1744
1753
  Failed = "Failed"
1745
1754
  }
1746
1755
 
@@ -1758,7 +1767,9 @@ export type PrivateEndpointConnectionProvisioningState = string;
1758
1767
 
1759
1768
  /** Known values of {@link CloudEndpointChangeEnumerationActivityState} that the service accepts. */
1760
1769
  export enum KnownCloudEndpointChangeEnumerationActivityState {
1770
+ /** InitialEnumerationInProgress */
1761
1771
  InitialEnumerationInProgress = "InitialEnumerationInProgress",
1772
+ /** EnumerationInProgress */
1762
1773
  EnumerationInProgress = "EnumerationInProgress"
1763
1774
  }
1764
1775
 
@@ -1774,7 +1785,9 @@ export type CloudEndpointChangeEnumerationActivityState = string;
1774
1785
 
1775
1786
  /** Known values of {@link CloudEndpointChangeEnumerationTotalCountsState} that the service accepts. */
1776
1787
  export enum KnownCloudEndpointChangeEnumerationTotalCountsState {
1788
+ /** Calculating */
1777
1789
  Calculating = "Calculating",
1790
+ /** Final */
1778
1791
  Final = "Final"
1779
1792
  }
1780
1793
 
@@ -1790,7 +1803,9 @@ export type CloudEndpointChangeEnumerationTotalCountsState = string;
1790
1803
 
1791
1804
  /** Known values of {@link ChangeDetectionMode} that the service accepts. */
1792
1805
  export enum KnownChangeDetectionMode {
1806
+ /** Default */
1793
1807
  Default = "Default",
1808
+ /** Recursive */
1794
1809
  Recursive = "Recursive"
1795
1810
  }
1796
1811
 
@@ -1806,7 +1821,9 @@ export type ChangeDetectionMode = string;
1806
1821
 
1807
1822
  /** Known values of {@link FeatureStatus} that the service accepts. */
1808
1823
  export enum KnownFeatureStatus {
1824
+ /** On */
1809
1825
  On = "on",
1826
+ /** Off */
1810
1827
  Off = "off"
1811
1828
  }
1812
1829
 
@@ -1822,8 +1839,11 @@ export type FeatureStatus = string;
1822
1839
 
1823
1840
  /** Known values of {@link InitialDownloadPolicy} that the service accepts. */
1824
1841
  export enum KnownInitialDownloadPolicy {
1842
+ /** NamespaceOnly */
1825
1843
  NamespaceOnly = "NamespaceOnly",
1844
+ /** NamespaceThenModifiedFiles */
1826
1845
  NamespaceThenModifiedFiles = "NamespaceThenModifiedFiles",
1846
+ /** AvoidTieredFiles */
1827
1847
  AvoidTieredFiles = "AvoidTieredFiles"
1828
1848
  }
1829
1849
 
@@ -1840,7 +1860,9 @@ export type InitialDownloadPolicy = string;
1840
1860
 
1841
1861
  /** Known values of {@link LocalCacheMode} that the service accepts. */
1842
1862
  export enum KnownLocalCacheMode {
1863
+ /** DownloadNewAndModifiedFiles */
1843
1864
  DownloadNewAndModifiedFiles = "DownloadNewAndModifiedFiles",
1865
+ /** UpdateLocallyCachedFiles */
1844
1866
  UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles"
1845
1867
  }
1846
1868
 
@@ -1856,7 +1878,9 @@ export type LocalCacheMode = string;
1856
1878
 
1857
1879
  /** Known values of {@link InitialUploadPolicy} that the service accepts. */
1858
1880
  export enum KnownInitialUploadPolicy {
1881
+ /** ServerAuthoritative */
1859
1882
  ServerAuthoritative = "ServerAuthoritative",
1883
+ /** Merge */
1860
1884
  Merge = "Merge"
1861
1885
  }
1862
1886
 
@@ -1872,8 +1896,11 @@ export type InitialUploadPolicy = string;
1872
1896
 
1873
1897
  /** Known values of {@link ServerEndpointHealthState} that the service accepts. */
1874
1898
  export enum KnownServerEndpointHealthState {
1899
+ /** Unavailable */
1875
1900
  Unavailable = "Unavailable",
1901
+ /** Healthy */
1876
1902
  Healthy = "Healthy",
1903
+ /** Error */
1877
1904
  Error = "Error"
1878
1905
  }
1879
1906
 
@@ -1890,8 +1917,11 @@ export type ServerEndpointHealthState = string;
1890
1917
 
1891
1918
  /** Known values of {@link ServerEndpointSyncActivityState} that the service accepts. */
1892
1919
  export enum KnownServerEndpointSyncActivityState {
1920
+ /** Upload */
1893
1921
  Upload = "Upload",
1922
+ /** Download */
1894
1923
  Download = "Download",
1924
+ /** UploadAndDownload */
1895
1925
  UploadAndDownload = "UploadAndDownload"
1896
1926
  }
1897
1927
 
@@ -1908,10 +1938,15 @@ export type ServerEndpointSyncActivityState = string;
1908
1938
 
1909
1939
  /** Known values of {@link ServerEndpointSyncMode} that the service accepts. */
1910
1940
  export enum KnownServerEndpointSyncMode {
1941
+ /** Regular */
1911
1942
  Regular = "Regular",
1943
+ /** NamespaceDownload */
1912
1944
  NamespaceDownload = "NamespaceDownload",
1945
+ /** InitialUpload */
1913
1946
  InitialUpload = "InitialUpload",
1947
+ /** SnapshotUpload */
1914
1948
  SnapshotUpload = "SnapshotUpload",
1949
+ /** InitialFullDownload */
1915
1950
  InitialFullDownload = "InitialFullDownload"
1916
1951
  }
1917
1952
 
@@ -1930,9 +1965,13 @@ export type ServerEndpointSyncMode = string;
1930
1965
 
1931
1966
  /** Known values of {@link ServerEndpointOfflineDataTransferState} that the service accepts. */
1932
1967
  export enum KnownServerEndpointOfflineDataTransferState {
1968
+ /** InProgress */
1933
1969
  InProgress = "InProgress",
1970
+ /** Stopping */
1934
1971
  Stopping = "Stopping",
1972
+ /** NotRunning */
1935
1973
  NotRunning = "NotRunning",
1974
+ /** Complete */
1936
1975
  Complete = "Complete"
1937
1976
  }
1938
1977
 
@@ -1950,9 +1989,13 @@ export type ServerEndpointOfflineDataTransferState = string;
1950
1989
 
1951
1990
  /** Known values of {@link RegisteredServerAgentVersionStatus} that the service accepts. */
1952
1991
  export enum KnownRegisteredServerAgentVersionStatus {
1992
+ /** Ok */
1953
1993
  Ok = "Ok",
1994
+ /** NearExpiry */
1954
1995
  NearExpiry = "NearExpiry",
1996
+ /** Expired */
1955
1997
  Expired = "Expired",
1998
+ /** Blocked */
1956
1999
  Blocked = "Blocked"
1957
2000
  }
1958
2001
 
@@ -1970,10 +2013,15 @@ export type RegisteredServerAgentVersionStatus = string;
1970
2013
 
1971
2014
  /** Known values of {@link WorkflowStatus} that the service accepts. */
1972
2015
  export enum KnownWorkflowStatus {
2016
+ /** Active */
1973
2017
  Active = "active",
2018
+ /** Expired */
1974
2019
  Expired = "expired",
2020
+ /** Succeeded */
1975
2021
  Succeeded = "succeeded",
2022
+ /** Aborted */
1976
2023
  Aborted = "aborted",
2024
+ /** Failed */
1977
2025
  Failed = "failed"
1978
2026
  }
1979
2027
 
@@ -1992,8 +2040,11 @@ export type WorkflowStatus = string;
1992
2040
 
1993
2041
  /** Known values of {@link OperationDirection} that the service accepts. */
1994
2042
  export enum KnownOperationDirection {
2043
+ /** Do */
1995
2044
  Do = "do",
2045
+ /** Undo */
1996
2046
  Undo = "undo",
2047
+ /** Cancel */
1997
2048
  Cancel = "cancel"
1998
2049
  }
1999
2050
 
@@ -2010,10 +2061,15 @@ export type OperationDirection = string;
2010
2061
 
2011
2062
  /** Known values of {@link Reason} that the service accepts. */
2012
2063
  export enum KnownReason {
2064
+ /** Registered */
2013
2065
  Registered = "Registered",
2066
+ /** Unregistered */
2014
2067
  Unregistered = "Unregistered",
2068
+ /** Warned */
2015
2069
  Warned = "Warned",
2070
+ /** Suspended */
2016
2071
  Suspended = "Suspended",
2072
+ /** Deleted */
2017
2073
  Deleted = "Deleted"
2018
2074
  }
2019
2075
 
@@ -2032,10 +2088,15 @@ export type Reason = string;
2032
2088
 
2033
2089
  /** Known values of {@link ProgressType} that the service accepts. */
2034
2090
  export enum KnownProgressType {
2091
+ /** None */
2035
2092
  None = "none",
2093
+ /** Initialize */
2036
2094
  Initialize = "initialize",
2095
+ /** Download */
2037
2096
  Download = "download",
2097
+ /** Upload */
2038
2098
  Upload = "upload",
2099
+ /** Recall */
2039
2100
  Recall = "recall"
2040
2101
  }
2041
2102
 
@@ -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 { CloudEndpoints } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -17,6 +17,7 @@ import { LroImpl } from "../lroImpl";
17
17
  import {
18
18
  CloudEndpoint,
19
19
  CloudEndpointsListBySyncGroupOptionalParams,
20
+ CloudEndpointsListBySyncGroupResponse,
20
21
  CloudEndpointCreateParameters,
21
22
  CloudEndpointsCreateOptionalParams,
22
23
  CloudEndpointsCreateResponse,
@@ -24,7 +25,6 @@ import {
24
25
  CloudEndpointsGetResponse,
25
26
  CloudEndpointsDeleteOptionalParams,
26
27
  CloudEndpointsDeleteResponse,
27
- CloudEndpointsListBySyncGroupResponse,
28
28
  BackupRequest,
29
29
  CloudEndpointsPreBackupOptionalParams,
30
30
  CloudEndpointsPreBackupResponse,
@@ -79,12 +79,16 @@ export class CloudEndpointsImpl implements CloudEndpoints {
79
79
  [Symbol.asyncIterator]() {
80
80
  return this;
81
81
  },
82
- byPage: () => {
82
+ byPage: (settings?: PageSettings) => {
83
+ if (settings?.maxPageSize) {
84
+ throw new Error("maxPageSize is not supported by this operation.");
85
+ }
83
86
  return this.listBySyncGroupPagingPage(
84
87
  resourceGroupName,
85
88
  storageSyncServiceName,
86
89
  syncGroupName,
87
- options
90
+ options,
91
+ settings
88
92
  );
89
93
  }
90
94
  };
@@ -94,9 +98,11 @@ export class CloudEndpointsImpl implements CloudEndpoints {
94
98
  resourceGroupName: string,
95
99
  storageSyncServiceName: string,
96
100
  syncGroupName: string,
97
- options?: CloudEndpointsListBySyncGroupOptionalParams
101
+ options?: CloudEndpointsListBySyncGroupOptionalParams,
102
+ _settings?: PageSettings
98
103
  ): AsyncIterableIterator<CloudEndpoint[]> {
99
- let result = await this._listBySyncGroup(
104
+ let result: CloudEndpointsListBySyncGroupResponse;
105
+ result = await this._listBySyncGroup(
100
106
  resourceGroupName,
101
107
  storageSyncServiceName,
102
108
  syncGroupName,
@@ -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 { Operations } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
48
49
  [Symbol.asyncIterator]() {
49
50
  return this;
50
51
  },
51
- byPage: () => {
52
- return this.listPagingPage(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(options, settings);
53
57
  }
54
58
  };
55
59
  }
56
60
 
57
61
  private async *listPagingPage(
58
- options?: OperationsListOptionalParams
62
+ options?: OperationsListOptionalParams,
63
+ settings?: PageSettings
59
64
  ): AsyncIterableIterator<OperationEntity[]> {
60
- let result = await this._list(options);
61
- yield result.value || [];
62
- let continuationToken = result.nextLink;
65
+ let result: OperationsListResponse;
66
+ let continuationToken = settings?.continuationToken;
67
+ if (!continuationToken) {
68
+ result = await this._list(options);
69
+ let page = result.value || [];
70
+ continuationToken = result.nextLink;
71
+ setContinuationToken(page, continuationToken);
72
+ yield page;
73
+ }
63
74
  while (continuationToken) {
64
75
  result = await this._listNext(continuationToken, options);
65
76
  continuationToken = result.nextLink;
66
- yield result.value || [];
77
+ let page = result.value || [];
78
+ setContinuationToken(page, continuationToken);
79
+ yield page;
67
80
  }
68
81
  }
69
82
 
@@ -132,7 +145,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
132
145
  bodyMapper: Mappers.StorageSyncError
133
146
  }
134
147
  },
135
- queryParameters: [Parameters.apiVersion],
136
148
  urlParameters: [Parameters.$host, Parameters.nextLink],
137
149
  headerParameters: [Parameters.accept],
138
150
  serializer
@@ -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 { PrivateEndpointConnections } 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
  PrivateEndpointConnection,
19
19
  PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams,
20
+ PrivateEndpointConnectionsListByStorageSyncServiceResponse,
20
21
  PrivateEndpointConnectionsGetOptionalParams,
21
22
  PrivateEndpointConnectionsGetResponse,
22
23
  PrivateEndpointConnectionsCreateOptionalParams,
23
24
  PrivateEndpointConnectionsCreateResponse,
24
- PrivateEndpointConnectionsDeleteOptionalParams,
25
- PrivateEndpointConnectionsListByStorageSyncServiceResponse
25
+ PrivateEndpointConnectionsDeleteOptionalParams
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -62,11 +62,15 @@ export class PrivateEndpointConnectionsImpl
62
62
  [Symbol.asyncIterator]() {
63
63
  return this;
64
64
  },
65
- byPage: () => {
65
+ byPage: (settings?: PageSettings) => {
66
+ if (settings?.maxPageSize) {
67
+ throw new Error("maxPageSize is not supported by this operation.");
68
+ }
66
69
  return this.listByStorageSyncServicePagingPage(
67
70
  resourceGroupName,
68
71
  storageSyncServiceName,
69
- options
72
+ options,
73
+ settings
70
74
  );
71
75
  }
72
76
  };
@@ -75,9 +79,11 @@ export class PrivateEndpointConnectionsImpl
75
79
  private async *listByStorageSyncServicePagingPage(
76
80
  resourceGroupName: string,
77
81
  storageSyncServiceName: string,
78
- options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams
82
+ options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams,
83
+ _settings?: PageSettings
79
84
  ): AsyncIterableIterator<PrivateEndpointConnection[]> {
80
- let result = await this._listByStorageSyncService(
85
+ let result: PrivateEndpointConnectionsListByStorageSyncServiceResponse;
86
+ result = await this._listByStorageSyncService(
81
87
  resourceGroupName,
82
88
  storageSyncServiceName,
83
89
  options