@azure/arm-resourcemover 2.0.2-alpha.20221101.1 → 2.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 (43) hide show
  1. package/CHANGELOG.md +31 -10
  2. package/dist/index.js +195 -56
  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 +86 -45
  11. package/dist-esm/src/models/index.d.ts.map +1 -1
  12. package/dist-esm/src/models/index.js +41 -0
  13. package/dist-esm/src/models/index.js.map +1 -1
  14. package/dist-esm/src/operations/moveCollections.d.ts.map +1 -1
  15. package/dist-esm/src/operations/moveCollections.js +37 -16
  16. package/dist-esm/src/operations/moveCollections.js.map +1 -1
  17. package/dist-esm/src/operations/moveResources.d.ts.map +1 -1
  18. package/dist-esm/src/operations/moveResources.js +19 -8
  19. package/dist-esm/src/operations/moveResources.js.map +1 -1
  20. package/dist-esm/src/operations/unresolvedDependencies.d.ts.map +1 -1
  21. package/dist-esm/src/operations/unresolvedDependencies.js +19 -13
  22. package/dist-esm/src/operations/unresolvedDependencies.js.map +1 -1
  23. package/dist-esm/src/pagingHelper.d.ts +13 -0
  24. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  25. package/dist-esm/src/pagingHelper.js +32 -0
  26. package/dist-esm/src/pagingHelper.js.map +1 -0
  27. package/dist-esm/src/resourceMoverServiceAPI.d.ts +2 -0
  28. package/dist-esm/src/resourceMoverServiceAPI.d.ts.map +1 -1
  29. package/dist-esm/src/resourceMoverServiceAPI.js +49 -18
  30. package/dist-esm/src/resourceMoverServiceAPI.js.map +1 -1
  31. package/dist-esm/test/sampleTest.js +11 -13
  32. package/dist-esm/test/sampleTest.js.map +1 -1
  33. package/package.json +12 -8
  34. package/review/arm-resourcemover.api.md +64 -98
  35. package/src/index.ts +1 -0
  36. package/src/models/index.ts +81 -49
  37. package/src/operations/moveCollections.ts +49 -22
  38. package/src/operations/moveResources.ts +22 -13
  39. package/src/operations/unresolvedDependencies.ts +22 -18
  40. package/src/pagingHelper.ts +39 -0
  41. package/src/resourceMoverServiceAPI.ts +60 -20
  42. package/types/arm-resourcemover.d.ts +97 -45
  43. package/types/tsdoc-metadata.json +1 -1
@@ -590,7 +590,7 @@ export interface OperationsDiscovery {
590
590
  * Default value is "user,system".
591
591
  */
592
592
  origin?: string;
593
- /** Any object */
593
+ /** ClientDiscovery properties. */
594
594
  properties?: Record<string, unknown>;
595
595
  }
596
596
 
@@ -789,13 +789,13 @@ export interface LBBackendAddressPoolResourceSettings {
789
789
  }
790
790
 
791
791
  /** Defines the move collection errors. */
792
- export type MoveCollectionPropertiesErrors = MoveResourceError & {};
792
+ export interface MoveCollectionPropertiesErrors extends MoveResourceError {}
793
793
 
794
794
  /** Defines the move resource errors. */
795
- export type MoveResourcePropertiesErrors = MoveResourceError & {};
795
+ export interface MoveResourcePropertiesErrors extends MoveResourceError {}
796
796
 
797
797
  /** Gets or sets the virtual machine resource settings. */
798
- export type VirtualMachineResourceSettings = ResourceSettings & {
798
+ export interface VirtualMachineResourceSettings extends ResourceSettings {
799
799
  /** Polymorphic discriminator, which specifies the different types this object can be */
800
800
  resourceType: "Microsoft.Compute/virtualMachines";
801
801
  /** Gets or sets the Resource tags. */
@@ -808,10 +808,10 @@ export type VirtualMachineResourceSettings = ResourceSettings & {
808
808
  targetVmSize?: string;
809
809
  /** Gets or sets the target availability set id for virtual machines not in an availability set at source. */
810
810
  targetAvailabilitySetId?: string;
811
- };
811
+ }
812
812
 
813
813
  /** Gets or sets the availability set resource settings. */
814
- export type AvailabilitySetResourceSettings = ResourceSettings & {
814
+ export interface AvailabilitySetResourceSettings extends ResourceSettings {
815
815
  /** Polymorphic discriminator, which specifies the different types this object can be */
816
816
  resourceType: "Microsoft.Compute/availabilitySets";
817
817
  /** Gets or sets the Resource tags. */
@@ -820,10 +820,10 @@ export type AvailabilitySetResourceSettings = ResourceSettings & {
820
820
  faultDomain?: number;
821
821
  /** Gets or sets the target update domain. */
822
822
  updateDomain?: number;
823
- };
823
+ }
824
824
 
825
825
  /** Defines the virtual network resource settings. */
826
- export type VirtualNetworkResourceSettings = ResourceSettings & {
826
+ export interface VirtualNetworkResourceSettings extends ResourceSettings {
827
827
  /** Polymorphic discriminator, which specifies the different types this object can be */
828
828
  resourceType: "Microsoft.Network/virtualNetworks";
829
829
  /** Gets or sets the Resource tags. */
@@ -842,10 +842,10 @@ export type VirtualNetworkResourceSettings = ResourceSettings & {
842
842
  dnsServers?: string[];
843
843
  /** Gets or sets List of subnets in a VirtualNetwork. */
844
844
  subnets?: SubnetResourceSettings[];
845
- };
845
+ }
846
846
 
847
847
  /** Defines the network interface resource settings. */
848
- export type NetworkInterfaceResourceSettings = ResourceSettings & {
848
+ export interface NetworkInterfaceResourceSettings extends ResourceSettings {
849
849
  /** Polymorphic discriminator, which specifies the different types this object can be */
850
850
  resourceType: "Microsoft.Network/networkInterfaces";
851
851
  /** Gets or sets the Resource tags. */
@@ -854,20 +854,20 @@ export type NetworkInterfaceResourceSettings = ResourceSettings & {
854
854
  ipConfigurations?: NicIpConfigurationResourceSettings[];
855
855
  /** Gets or sets a value indicating whether accelerated networking is enabled. */
856
856
  enableAcceleratedNetworking?: boolean;
857
- };
857
+ }
858
858
 
859
859
  /** Defines the NSG resource settings. */
860
- export type NetworkSecurityGroupResourceSettings = ResourceSettings & {
860
+ export interface NetworkSecurityGroupResourceSettings extends ResourceSettings {
861
861
  /** Polymorphic discriminator, which specifies the different types this object can be */
862
862
  resourceType: "Microsoft.Network/networkSecurityGroups";
863
863
  /** Gets or sets the Resource tags. */
864
864
  tags?: { [propertyName: string]: string };
865
865
  /** Gets or sets Security rules of network security group. */
866
866
  securityRules?: NsgSecurityRule[];
867
- };
867
+ }
868
868
 
869
869
  /** Defines the load balancer resource settings. */
870
- export type LoadBalancerResourceSettings = ResourceSettings & {
870
+ export interface LoadBalancerResourceSettings extends ResourceSettings {
871
871
  /** Polymorphic discriminator, which specifies the different types this object can be */
872
872
  resourceType: "Microsoft.Network/loadBalancers";
873
873
  /** Gets or sets the Resource tags. */
@@ -883,42 +883,42 @@ export type LoadBalancerResourceSettings = ResourceSettings & {
883
883
  * precedence only if frontend IP configurations settings are not present.
884
884
  */
885
885
  zones?: string;
886
- };
886
+ }
887
887
 
888
888
  /** Defines the SQL Server resource settings. */
889
- export type SqlServerResourceSettings = ResourceSettings & {
889
+ export interface SqlServerResourceSettings extends ResourceSettings {
890
890
  /** Polymorphic discriminator, which specifies the different types this object can be */
891
891
  resourceType: "Microsoft.Sql/servers";
892
- };
892
+ }
893
893
 
894
894
  /** Defines the Sql ElasticPool resource settings. */
895
- export type SqlElasticPoolResourceSettings = ResourceSettings & {
895
+ export interface SqlElasticPoolResourceSettings extends ResourceSettings {
896
896
  /** Polymorphic discriminator, which specifies the different types this object can be */
897
897
  resourceType: "Microsoft.Sql/servers/elasticPools";
898
898
  /** Gets or sets the Resource tags. */
899
899
  tags?: { [propertyName: string]: string };
900
900
  /** Defines the zone redundant resource setting. */
901
901
  zoneRedundant?: ZoneRedundant;
902
- };
902
+ }
903
903
 
904
904
  /** Defines the Sql Database resource settings. */
905
- export type SqlDatabaseResourceSettings = ResourceSettings & {
905
+ export interface SqlDatabaseResourceSettings extends ResourceSettings {
906
906
  /** Polymorphic discriminator, which specifies the different types this object can be */
907
907
  resourceType: "Microsoft.Sql/servers/databases";
908
908
  /** Gets or sets the Resource tags. */
909
909
  tags?: { [propertyName: string]: string };
910
910
  /** Defines the zone redundant resource setting. */
911
911
  zoneRedundant?: ZoneRedundant;
912
- };
912
+ }
913
913
 
914
914
  /** Defines the resource group resource settings. */
915
- export type ResourceGroupResourceSettings = ResourceSettings & {
915
+ export interface ResourceGroupResourceSettings extends ResourceSettings {
916
916
  /** Polymorphic discriminator, which specifies the different types this object can be */
917
917
  resourceType: "resourceGroups";
918
- };
918
+ }
919
919
 
920
920
  /** Defines the public IP address resource settings. */
921
- export type PublicIPAddressResourceSettings = ResourceSettings & {
921
+ export interface PublicIPAddressResourceSettings extends ResourceSettings {
922
922
  /** Polymorphic discriminator, which specifies the different types this object can be */
923
923
  resourceType: "Microsoft.Network/publicIPAddresses";
924
924
  /** Gets or sets the Resource tags. */
@@ -933,48 +933,52 @@ export type PublicIPAddressResourceSettings = ResourceSettings & {
933
933
  sku?: string;
934
934
  /** Gets or sets public IP zones. */
935
935
  zones?: string;
936
- };
936
+ }
937
937
 
938
938
  /** Defines the key vault resource settings. */
939
- export type KeyVaultResourceSettings = ResourceSettings & {
939
+ export interface KeyVaultResourceSettings extends ResourceSettings {
940
940
  /** Polymorphic discriminator, which specifies the different types this object can be */
941
941
  resourceType: "Microsoft.KeyVault/vaults";
942
- };
942
+ }
943
943
 
944
944
  /** Defines the disk encryption set resource settings. */
945
- export type DiskEncryptionSetResourceSettings = ResourceSettings & {
945
+ export interface DiskEncryptionSetResourceSettings extends ResourceSettings {
946
946
  /** Polymorphic discriminator, which specifies the different types this object can be */
947
947
  resourceType: "Microsoft.Compute/diskEncryptionSets";
948
- };
948
+ }
949
949
 
950
950
  /** Defines the move resource status. */
951
- export type MoveResourcePropertiesMoveStatus = MoveResourceStatus & {};
951
+ export interface MoveResourcePropertiesMoveStatus extends MoveResourceStatus {}
952
952
 
953
953
  /** Defines reference to NSG. */
954
- export type NsgReference = AzureResourceReference & {};
954
+ export interface NsgReference extends AzureResourceReference {}
955
955
 
956
956
  /** Defines reference to a proxy resource. */
957
- export type ProxyResourceReference = AzureResourceReference & {
957
+ export interface ProxyResourceReference extends AzureResourceReference {
958
958
  /** Gets the name of the proxy resource on the target side. */
959
959
  name?: string;
960
- };
960
+ }
961
961
 
962
962
  /** Defines reference to a public IP. */
963
- export type PublicIpReference = AzureResourceReference & {};
963
+ export interface PublicIpReference extends AzureResourceReference {}
964
964
 
965
965
  /** Defines reference to subnet. */
966
- export type SubnetReference = ProxyResourceReference & {};
966
+ export interface SubnetReference extends ProxyResourceReference {}
967
967
 
968
968
  /** Defines reference to load balancer backend address pools. */
969
- export type LoadBalancerBackendAddressPoolReference = ProxyResourceReference & {};
969
+ export interface LoadBalancerBackendAddressPoolReference
970
+ extends ProxyResourceReference {}
970
971
 
971
972
  /** Defines reference to load balancer NAT rules. */
972
- export type LoadBalancerNatRuleReference = ProxyResourceReference & {};
973
+ export interface LoadBalancerNatRuleReference extends ProxyResourceReference {}
973
974
 
974
975
  /** Known values of {@link ResourceIdentityType} that the service accepts. */
975
976
  export enum KnownResourceIdentityType {
977
+ /** None */
976
978
  None = "None",
979
+ /** SystemAssigned */
977
980
  SystemAssigned = "SystemAssigned",
981
+ /** UserAssigned */
978
982
  UserAssigned = "UserAssigned"
979
983
  }
980
984
 
@@ -991,9 +995,13 @@ export type ResourceIdentityType = string;
991
995
 
992
996
  /** Known values of {@link ProvisioningState} that the service accepts. */
993
997
  export enum KnownProvisioningState {
998
+ /** Succeeded */
994
999
  Succeeded = "Succeeded",
1000
+ /** Updating */
995
1001
  Updating = "Updating",
1002
+ /** Creating */
996
1003
  Creating = "Creating",
1004
+ /** Failed */
997
1005
  Failed = "Failed"
998
1006
  }
999
1007
 
@@ -1011,9 +1019,13 @@ export type ProvisioningState = string;
1011
1019
 
1012
1020
  /** Known values of {@link CreatedByType} that the service accepts. */
1013
1021
  export enum KnownCreatedByType {
1022
+ /** User */
1014
1023
  User = "User",
1024
+ /** Application */
1015
1025
  Application = "Application",
1026
+ /** ManagedIdentity */
1016
1027
  ManagedIdentity = "ManagedIdentity",
1028
+ /** Key */
1017
1029
  Key = "Key"
1018
1030
  }
1019
1031
 
@@ -1031,7 +1043,9 @@ export type CreatedByType = string;
1031
1043
 
1032
1044
  /** Known values of {@link MoveResourceInputType} that the service accepts. */
1033
1045
  export enum KnownMoveResourceInputType {
1046
+ /** MoveResourceId */
1034
1047
  MoveResourceId = "MoveResourceId",
1048
+ /** MoveResourceSourceId */
1035
1049
  MoveResourceSourceId = "MoveResourceSourceId"
1036
1050
  }
1037
1051
 
@@ -1047,20 +1061,35 @@ export type MoveResourceInputType = string;
1047
1061
 
1048
1062
  /** Known values of {@link MoveState} that the service accepts. */
1049
1063
  export enum KnownMoveState {
1064
+ /** AssignmentPending */
1050
1065
  AssignmentPending = "AssignmentPending",
1066
+ /** PreparePending */
1051
1067
  PreparePending = "PreparePending",
1068
+ /** PrepareInProgress */
1052
1069
  PrepareInProgress = "PrepareInProgress",
1070
+ /** PrepareFailed */
1053
1071
  PrepareFailed = "PrepareFailed",
1072
+ /** MovePending */
1054
1073
  MovePending = "MovePending",
1074
+ /** MoveInProgress */
1055
1075
  MoveInProgress = "MoveInProgress",
1076
+ /** MoveFailed */
1056
1077
  MoveFailed = "MoveFailed",
1078
+ /** DiscardInProgress */
1057
1079
  DiscardInProgress = "DiscardInProgress",
1080
+ /** DiscardFailed */
1058
1081
  DiscardFailed = "DiscardFailed",
1082
+ /** CommitPending */
1059
1083
  CommitPending = "CommitPending",
1084
+ /** CommitInProgress */
1060
1085
  CommitInProgress = "CommitInProgress",
1086
+ /** CommitFailed */
1061
1087
  CommitFailed = "CommitFailed",
1088
+ /** Committed */
1062
1089
  Committed = "Committed",
1090
+ /** DeleteSourcePending */
1063
1091
  DeleteSourcePending = "DeleteSourcePending",
1092
+ /** ResourceMoveCompleted */
1064
1093
  ResourceMoveCompleted = "ResourceMoveCompleted"
1065
1094
  }
1066
1095
 
@@ -1089,6 +1118,7 @@ export type MoveState = string;
1089
1118
 
1090
1119
  /** Known values of {@link JobName} that the service accepts. */
1091
1120
  export enum KnownJobName {
1121
+ /** InitialSync */
1092
1122
  InitialSync = "InitialSync"
1093
1123
  }
1094
1124
 
@@ -1103,7 +1133,9 @@ export type JobName = string;
1103
1133
 
1104
1134
  /** Known values of {@link ResolutionType} that the service accepts. */
1105
1135
  export enum KnownResolutionType {
1136
+ /** Manual */
1106
1137
  Manual = "Manual",
1138
+ /** Automatic */
1107
1139
  Automatic = "Automatic"
1108
1140
  }
1109
1141
 
@@ -1119,7 +1151,9 @@ export type ResolutionType = string;
1119
1151
 
1120
1152
  /** Known values of {@link DependencyType} that the service accepts. */
1121
1153
  export enum KnownDependencyType {
1154
+ /** RequiredForPrepare */
1122
1155
  RequiredForPrepare = "RequiredForPrepare",
1156
+ /** RequiredForMove */
1123
1157
  RequiredForMove = "RequiredForMove"
1124
1158
  }
1125
1159
 
@@ -1135,7 +1169,9 @@ export type DependencyType = string;
1135
1169
 
1136
1170
  /** Known values of {@link DependencyLevel} that the service accepts. */
1137
1171
  export enum KnownDependencyLevel {
1172
+ /** Direct */
1138
1173
  Direct = "Direct",
1174
+ /** Descendant */
1139
1175
  Descendant = "Descendant"
1140
1176
  }
1141
1177
 
@@ -1151,9 +1187,13 @@ export type DependencyLevel = string;
1151
1187
 
1152
1188
  /** Known values of {@link TargetAvailabilityZone} that the service accepts. */
1153
1189
  export enum KnownTargetAvailabilityZone {
1190
+ /** One */
1154
1191
  One = "1",
1192
+ /** Two */
1155
1193
  Two = "2",
1194
+ /** Three */
1156
1195
  Three = "3",
1196
+ /** NA */
1157
1197
  NA = "NA"
1158
1198
  }
1159
1199
 
@@ -1171,7 +1211,9 @@ export type TargetAvailabilityZone = string;
1171
1211
 
1172
1212
  /** Known values of {@link ZoneRedundant} that the service accepts. */
1173
1213
  export enum KnownZoneRedundant {
1214
+ /** Enable */
1174
1215
  Enable = "Enable",
1216
+ /** Disable */
1175
1217
  Disable = "Disable"
1176
1218
  }
1177
1219
 
@@ -1386,10 +1428,7 @@ export type MoveResourcesGetResponse = MoveResource;
1386
1428
 
1387
1429
  /** Optional parameters. */
1388
1430
  export interface MoveResourcesListNextOptionalParams
1389
- extends coreClient.OperationOptions {
1390
- /** The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState eq 'Succeeded'. */
1391
- filter?: string;
1392
- }
1431
+ extends coreClient.OperationOptions {}
1393
1432
 
1394
1433
  /** Contains response data for the listNext operation. */
1395
1434
  export type MoveResourcesListNextResponse = MoveResourceCollection;
@@ -1410,14 +1449,7 @@ export type UnresolvedDependenciesGetResponse = UnresolvedDependencyCollection;
1410
1449
 
1411
1450
  /** Optional parameters. */
1412
1451
  export interface UnresolvedDependenciesGetNextOptionalParams
1413
- extends coreClient.OperationOptions {
1414
- /** The filter to apply on the operation. For example, $apply=filter(count eq 2). */
1415
- filter?: string;
1416
- /** Defines the dependency level. */
1417
- dependencyLevel?: DependencyLevel;
1418
- /** OData order by query option. For example, you can use $orderby=Count desc. */
1419
- orderby?: string;
1420
- }
1452
+ extends coreClient.OperationOptions {}
1421
1453
 
1422
1454
  /** Contains response data for the getNext operation. */
1423
1455
  export type UnresolvedDependenciesGetNextResponse = UnresolvedDependencyCollection;
@@ -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 { MoveCollections } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -18,8 +19,10 @@ import {
18
19
  MoveCollection,
19
20
  MoveCollectionsListMoveCollectionsBySubscriptionNextOptionalParams,
20
21
  MoveCollectionsListMoveCollectionsBySubscriptionOptionalParams,
22
+ MoveCollectionsListMoveCollectionsBySubscriptionResponse,
21
23
  MoveCollectionsListMoveCollectionsByResourceGroupNextOptionalParams,
22
24
  MoveCollectionsListMoveCollectionsByResourceGroupOptionalParams,
25
+ MoveCollectionsListMoveCollectionsByResourceGroupResponse,
23
26
  MoveCollectionsCreateOptionalParams,
24
27
  MoveCollectionsCreateResponse,
25
28
  MoveCollectionsUpdateOptionalParams,
@@ -40,8 +43,6 @@ import {
40
43
  MoveCollectionsResolveDependenciesResponse,
41
44
  MoveCollectionsBulkRemoveOptionalParams,
42
45
  MoveCollectionsBulkRemoveResponse,
43
- MoveCollectionsListMoveCollectionsBySubscriptionResponse,
44
- MoveCollectionsListMoveCollectionsByResourceGroupResponse,
45
46
  MoveCollectionsListRequiredForOptionalParams,
46
47
  MoveCollectionsListRequiredForResponse,
47
48
  MoveCollectionsListMoveCollectionsBySubscriptionNextResponse,
@@ -76,25 +77,40 @@ export class MoveCollectionsImpl implements MoveCollections {
76
77
  [Symbol.asyncIterator]() {
77
78
  return this;
78
79
  },
79
- byPage: () => {
80
- return this.listMoveCollectionsBySubscriptionPagingPage(options);
80
+ byPage: (settings?: PageSettings) => {
81
+ if (settings?.maxPageSize) {
82
+ throw new Error("maxPageSize is not supported by this operation.");
83
+ }
84
+ return this.listMoveCollectionsBySubscriptionPagingPage(
85
+ options,
86
+ settings
87
+ );
81
88
  }
82
89
  };
83
90
  }
84
91
 
85
92
  private async *listMoveCollectionsBySubscriptionPagingPage(
86
- options?: MoveCollectionsListMoveCollectionsBySubscriptionOptionalParams
93
+ options?: MoveCollectionsListMoveCollectionsBySubscriptionOptionalParams,
94
+ settings?: PageSettings
87
95
  ): AsyncIterableIterator<MoveCollection[]> {
88
- let result = await this._listMoveCollectionsBySubscription(options);
89
- yield result.value || [];
90
- let continuationToken = result.nextLink;
96
+ let result: MoveCollectionsListMoveCollectionsBySubscriptionResponse;
97
+ let continuationToken = settings?.continuationToken;
98
+ if (!continuationToken) {
99
+ result = await this._listMoveCollectionsBySubscription(options);
100
+ let page = result.value || [];
101
+ continuationToken = result.nextLink;
102
+ setContinuationToken(page, continuationToken);
103
+ yield page;
104
+ }
91
105
  while (continuationToken) {
92
106
  result = await this._listMoveCollectionsBySubscriptionNext(
93
107
  continuationToken,
94
108
  options
95
109
  );
96
110
  continuationToken = result.nextLink;
97
- yield result.value || [];
111
+ let page = result.value || [];
112
+ setContinuationToken(page, continuationToken);
113
+ yield page;
98
114
  }
99
115
  }
100
116
 
@@ -128,10 +144,14 @@ export class MoveCollectionsImpl implements MoveCollections {
128
144
  [Symbol.asyncIterator]() {
129
145
  return this;
130
146
  },
131
- byPage: () => {
147
+ byPage: (settings?: PageSettings) => {
148
+ if (settings?.maxPageSize) {
149
+ throw new Error("maxPageSize is not supported by this operation.");
150
+ }
132
151
  return this.listMoveCollectionsByResourceGroupPagingPage(
133
152
  resourceGroupName,
134
- options
153
+ options,
154
+ settings
135
155
  );
136
156
  }
137
157
  };
@@ -139,14 +159,21 @@ export class MoveCollectionsImpl implements MoveCollections {
139
159
 
140
160
  private async *listMoveCollectionsByResourceGroupPagingPage(
141
161
  resourceGroupName: string,
142
- options?: MoveCollectionsListMoveCollectionsByResourceGroupOptionalParams
162
+ options?: MoveCollectionsListMoveCollectionsByResourceGroupOptionalParams,
163
+ settings?: PageSettings
143
164
  ): AsyncIterableIterator<MoveCollection[]> {
144
- let result = await this._listMoveCollectionsByResourceGroup(
145
- resourceGroupName,
146
- options
147
- );
148
- yield result.value || [];
149
- let continuationToken = result.nextLink;
165
+ let result: MoveCollectionsListMoveCollectionsByResourceGroupResponse;
166
+ let continuationToken = settings?.continuationToken;
167
+ if (!continuationToken) {
168
+ result = await this._listMoveCollectionsByResourceGroup(
169
+ resourceGroupName,
170
+ options
171
+ );
172
+ let page = result.value || [];
173
+ continuationToken = result.nextLink;
174
+ setContinuationToken(page, continuationToken);
175
+ yield page;
176
+ }
150
177
  while (continuationToken) {
151
178
  result = await this._listMoveCollectionsByResourceGroupNext(
152
179
  resourceGroupName,
@@ -154,7 +181,9 @@ export class MoveCollectionsImpl implements MoveCollections {
154
181
  options
155
182
  );
156
183
  continuationToken = result.nextLink;
157
- yield result.value || [];
184
+ let page = result.value || [];
185
+ setContinuationToken(page, continuationToken);
186
+ yield page;
158
187
  }
159
188
  }
160
189
 
@@ -1320,7 +1349,6 @@ const listMoveCollectionsBySubscriptionNextOperationSpec: coreClient.OperationSp
1320
1349
  bodyMapper: Mappers.CloudError
1321
1350
  }
1322
1351
  },
1323
- queryParameters: [Parameters.apiVersion],
1324
1352
  urlParameters: [
1325
1353
  Parameters.$host,
1326
1354
  Parameters.subscriptionId,
@@ -1340,7 +1368,6 @@ const listMoveCollectionsByResourceGroupNextOperationSpec: coreClient.OperationS
1340
1368
  bodyMapper: Mappers.CloudError
1341
1369
  }
1342
1370
  },
1343
- queryParameters: [Parameters.apiVersion],
1344
1371
  urlParameters: [
1345
1372
  Parameters.$host,
1346
1373
  Parameters.subscriptionId,
@@ -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 { MoveResources } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -64,11 +65,15 @@ export class MoveResourcesImpl implements MoveResources {
64
65
  [Symbol.asyncIterator]() {
65
66
  return this;
66
67
  },
67
- byPage: () => {
68
+ byPage: (settings?: PageSettings) => {
69
+ if (settings?.maxPageSize) {
70
+ throw new Error("maxPageSize is not supported by this operation.");
71
+ }
68
72
  return this.listPagingPage(
69
73
  resourceGroupName,
70
74
  moveCollectionName,
71
- options
75
+ options,
76
+ settings
72
77
  );
73
78
  }
74
79
  };
@@ -77,15 +82,18 @@ export class MoveResourcesImpl implements MoveResources {
77
82
  private async *listPagingPage(
78
83
  resourceGroupName: string,
79
84
  moveCollectionName: string,
80
- options?: MoveResourcesListOptionalParams
85
+ options?: MoveResourcesListOptionalParams,
86
+ settings?: PageSettings
81
87
  ): AsyncIterableIterator<MoveResource[]> {
82
- let result = await this._list(
83
- resourceGroupName,
84
- moveCollectionName,
85
- options
86
- );
87
- yield result.value || [];
88
- let continuationToken = result.nextLink;
88
+ let result: MoveResourcesListResponse;
89
+ let continuationToken = settings?.continuationToken;
90
+ if (!continuationToken) {
91
+ result = await this._list(resourceGroupName, moveCollectionName, options);
92
+ let page = result.value || [];
93
+ continuationToken = result.nextLink;
94
+ setContinuationToken(page, continuationToken);
95
+ yield page;
96
+ }
89
97
  while (continuationToken) {
90
98
  result = await this._listNext(
91
99
  resourceGroupName,
@@ -94,7 +102,9 @@ export class MoveResourcesImpl implements MoveResources {
94
102
  options
95
103
  );
96
104
  continuationToken = result.nextLink;
97
- yield result.value || [];
105
+ let page = result.value || [];
106
+ setContinuationToken(page, continuationToken);
107
+ yield page;
98
108
  }
99
109
  }
100
110
 
@@ -478,7 +488,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
478
488
  bodyMapper: Mappers.CloudError
479
489
  }
480
490
  },
481
- queryParameters: [Parameters.apiVersion, Parameters.filter],
482
491
  urlParameters: [
483
492
  Parameters.$host,
484
493
  Parameters.subscriptionId,
@@ -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 { UnresolvedDependencies } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -56,11 +57,15 @@ export class UnresolvedDependenciesImpl implements UnresolvedDependencies {
56
57
  [Symbol.asyncIterator]() {
57
58
  return this;
58
59
  },
59
- byPage: () => {
60
+ byPage: (settings?: PageSettings) => {
61
+ if (settings?.maxPageSize) {
62
+ throw new Error("maxPageSize is not supported by this operation.");
63
+ }
60
64
  return this.getPagingPage(
61
65
  resourceGroupName,
62
66
  moveCollectionName,
63
- options
67
+ options,
68
+ settings
64
69
  );
65
70
  }
66
71
  };
@@ -69,15 +74,18 @@ export class UnresolvedDependenciesImpl implements UnresolvedDependencies {
69
74
  private async *getPagingPage(
70
75
  resourceGroupName: string,
71
76
  moveCollectionName: string,
72
- options?: UnresolvedDependenciesGetOptionalParams
77
+ options?: UnresolvedDependenciesGetOptionalParams,
78
+ settings?: PageSettings
73
79
  ): AsyncIterableIterator<UnresolvedDependency[]> {
74
- let result = await this._get(
75
- resourceGroupName,
76
- moveCollectionName,
77
- options
78
- );
79
- yield result.value || [];
80
- let continuationToken = result.nextLink;
80
+ let result: UnresolvedDependenciesGetResponse;
81
+ let continuationToken = settings?.continuationToken;
82
+ if (!continuationToken) {
83
+ result = await this._get(resourceGroupName, moveCollectionName, options);
84
+ let page = result.value || [];
85
+ continuationToken = result.nextLink;
86
+ setContinuationToken(page, continuationToken);
87
+ yield page;
88
+ }
81
89
  while (continuationToken) {
82
90
  result = await this._getNext(
83
91
  resourceGroupName,
@@ -86,7 +94,9 @@ export class UnresolvedDependenciesImpl implements UnresolvedDependencies {
86
94
  options
87
95
  );
88
96
  continuationToken = result.nextLink;
89
- yield result.value || [];
97
+ let page = result.value || [];
98
+ setContinuationToken(page, continuationToken);
99
+ yield page;
90
100
  }
91
101
  }
92
102
 
@@ -181,12 +191,6 @@ const getNextOperationSpec: coreClient.OperationSpec = {
181
191
  bodyMapper: Mappers.CloudError
182
192
  }
183
193
  },
184
- queryParameters: [
185
- Parameters.apiVersion,
186
- Parameters.filter,
187
- Parameters.dependencyLevel,
188
- Parameters.orderby
189
- ],
190
194
  urlParameters: [
191
195
  Parameters.$host,
192
196
  Parameters.subscriptionId,