From ebed04e009696ded6b83a732d5fda9c396a70188 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 15 Mar 2022 03:17:16 +0000 Subject: [PATCH] CodeGen from PR 18192 in Azure/azure-rest-api-specs Merge 9e9ebca8314ed2dc8cd583bb6fb06945d6048c2f into 9aff6fbac1975af94f6a3bc415be84f67d3311ee --- .../CHANGELOG.md | 3 +- .../README.md | 7 +- .../SAMPLE.md | 568 ++++++++++++++++++ .../pom.xml | 98 +-- .../resourcemover/ResourceMoverManager.java | 45 +- .../fluent/MoveCollectionsClient.java | 72 +-- .../fluent/MoveResourcesClient.java | 22 +- .../fluent/OperationsDiscoveriesClient.java | 2 +- .../fluent/UnresolvedDependenciesClient.java | 4 +- .../fluent/models/MoveCollectionInner.java | 20 +- .../fluent/models/MoveResourceInner.java | 20 +- .../fluent/models/OperationStatusInner.java | 4 - .../OperationsDiscoveryCollectionInner.java | 4 - .../RequiredForResourcesCollectionInner.java | 4 - .../models/UnresolvedDependencyInner.java | 4 - .../implementation/MoveCollectionImpl.java | 5 + .../MoveCollectionsClientImpl.java | 271 +++++---- .../implementation/MoveCollectionsImpl.java | 19 +- .../implementation/MoveResourceImpl.java | 5 + .../MoveResourcesClientImpl.java | 91 +-- .../implementation/MoveResourcesImpl.java | 27 +- .../OperationsDiscoveriesClientImpl.java | 13 +- .../OperationsDiscoveriesImpl.java | 3 +- .../ResourceMoverServiceApiImpl.java | 8 +- .../UnresolvedDependenciesClientImpl.java | 25 +- .../UnresolvedDependenciesImpl.java | 3 +- .../models/AffectedMoveResource.java | 4 - .../models/AutomaticResolutionProperties.java | 4 - .../AvailabilitySetResourceSettings.java | 31 +- .../models/AzureResourceReference.java | 7 +- .../models/BulkRemoveRequest.java | 4 - .../resourcemover/models/CommitRequest.java | 7 +- .../resourcemover/models/DiscardRequest.java | 7 +- .../DiskEncryptionSetResourceSettings.java | 8 +- .../resourcemover/models/Display.java | 4 - .../resourcemover/models/Identity.java | 4 - .../resourcemover/models/JobStatus.java | 4 - .../models/KeyVaultResourceSettings.java | 8 +- .../LBBackendAddressPoolResourceSettings.java | 4 - ...ontendIpConfigurationResourceSettings.java | 4 - ...adBalancerBackendAddressPoolReference.java | 8 +- .../models/LoadBalancerNatRuleReference.java | 8 +- .../models/LoadBalancerResourceSettings.java | 31 +- .../models/ManualResolutionProperties.java | 4 - .../resourcemover/models/MoveCollection.java | 8 + .../models/MoveCollectionProperties.java | 9 +- .../MoveCollectionPropertiesErrors.java | 8 +- .../models/MoveCollectionResultList.java | 4 - .../resourcemover/models/MoveCollections.java | 16 +- .../resourcemover/models/MoveErrorInfo.java | 4 - .../resourcemover/models/MoveResource.java | 8 + .../models/MoveResourceCollection.java | 4 - .../models/MoveResourceDependency.java | 4 - .../MoveResourceDependencyOverride.java | 4 - .../models/MoveResourceError.java | 4 - .../models/MoveResourceErrorBody.java | 4 - .../models/MoveResourceFilterProperties.java | 50 -- .../models/MoveResourceProperties.java | 7 +- .../models/MoveResourcePropertiesErrors.java | 8 +- .../MoveResourcePropertiesMoveStatus.java | 8 +- .../models/MoveResourceStatus.java | 4 - .../resourcemover/models/MoveResources.java | 10 +- .../NetworkInterfaceResourceSettings.java | 31 +- .../NetworkSecurityGroupResourceSettings.java | 31 +- .../NicIpConfigurationResourceSettings.java | 4 - .../resourcemover/models/NsgReference.java | 8 +- .../resourcemover/models/NsgSecurityRule.java | 4 - .../models/OperationErrorAdditionalInfo.java | 4 - .../models/OperationStatusError.java | 4 - .../models/OperationsDiscoveries.java | 2 +- .../models/OperationsDiscovery.java | 4 - .../resourcemover/models/PrepareRequest.java | 7 +- .../models/ProxyResourceReference.java | 4 - .../PublicIpAddressResourceSettings.java | 31 +- .../models/PublicIpReference.java | 8 +- .../models/ResourceGroupResourceSettings.java | 8 +- .../models/ResourceMoveRequest.java | 7 +- .../models/ResourceSettings.java | 7 +- .../models/SqlDatabaseResourceSettings.java | 31 +- .../SqlElasticPoolResourceSettings.java | 31 +- .../models/SqlServerResourceSettings.java | 8 +- .../resourcemover/models/SubnetReference.java | 8 +- .../models/SubnetResourceSettings.java | 4 - .../resourcemover/models/Summary.java | 4 - .../models/SummaryCollection.java | 4 - .../models/UnresolvedDependencies.java | 4 +- ...nresolvedDependenciesFilterProperties.java | 50 -- .../UnresolvedDependencyCollection.java | 4 - .../models/UpdateMoveCollectionRequest.java | 6 +- .../VirtualMachineResourceSettings.java | 58 +- .../VirtualNetworkResourceSettings.java | 31 +- .../MoveCollectionsBulkRemoveSamples.java | 35 ++ .../MoveCollectionsCommitSamples.java | 35 ++ .../MoveCollectionsCreateSamples.java | 31 + .../MoveCollectionsDeleteSamples.java | 22 + .../MoveCollectionsDiscardSamples.java | 35 ++ ...eCollectionsGetByResourceGroupSamples.java | 22 + .../MoveCollectionsInitiateMoveSamples.java | 36 ++ ...CollectionsListByResourceGroupSamples.java | 23 + ...MoveCollectionsListRequiredForSamples.java | 28 + .../generated/MoveCollectionsListSamples.java | 23 + .../MoveCollectionsPrepareSamples.java | 35 ++ ...CollectionsResolveDependenciesSamples.java | 23 + .../MoveCollectionsUpdateSamples.java | 44 ++ .../generated/MoveResourcesCreateSamples.java | 52 ++ .../generated/MoveResourcesDeleteSamples.java | 22 + .../generated/MoveResourcesGetSamples.java | 22 + .../generated/MoveResourcesListSamples.java | 22 + .../OperationsDiscoveryGetSamples.java | 22 + .../UnresolvedDependenciesGetSamples.java | 22 + 110 files changed, 1902 insertions(+), 721 deletions(-) create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/SAMPLE.md delete mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceFilterProperties.java delete mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependenciesFilterProperties.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsBulkRemoveSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCommitSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCreateSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDeleteSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDiscardSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsGetByResourceGroupSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsInitiateMoveSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListByResourceGroupSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListRequiredForSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsPrepareSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsResolveDependenciesSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsUpdateSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesCreateSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesDeleteSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesGetSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesListSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/OperationsDiscoveryGetSamples.java create mode 100644 sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/UnresolvedDependenciesGetSamples.java diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md index 8cc9cdd85354..742d577739af 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-15) +- Azure Resource Manager ResourceMover client library for Java. This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2021-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-12) diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md index 35173b745c9f..1a805755ff81 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ResourceMover client library for Java. -This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2021-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2021-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-resourcemover - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemover/azure-resourcemanager-resourcemover/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/SAMPLE.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/SAMPLE.md new file mode 100644 index 000000000000..225887982550 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/SAMPLE.md @@ -0,0 +1,568 @@ +# Code snippets and samples + + +## MoveCollections + +- [BulkRemove](#movecollections_bulkremove) +- [Commit](#movecollections_commit) +- [Create](#movecollections_create) +- [Delete](#movecollections_delete) +- [Discard](#movecollections_discard) +- [GetByResourceGroup](#movecollections_getbyresourcegroup) +- [InitiateMove](#movecollections_initiatemove) +- [List](#movecollections_list) +- [ListByResourceGroup](#movecollections_listbyresourcegroup) +- [ListRequiredFor](#movecollections_listrequiredfor) +- [Prepare](#movecollections_prepare) +- [ResolveDependencies](#movecollections_resolvedependencies) +- [Update](#movecollections_update) + +## MoveResources + +- [Create](#moveresources_create) +- [Delete](#moveresources_delete) +- [Get](#moveresources_get) +- [List](#moveresources_list) + +## OperationsDiscovery + +- [Get](#operationsdiscovery_get) + +## UnresolvedDependencies + +- [Get](#unresolveddependencies_get) +### MoveCollections_BulkRemove + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest; +import java.util.Arrays; + +/** Samples for MoveCollections BulkRemove. */ +public final class MoveCollectionsBulkRemoveSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_BulkRemove.json + */ + /** + * Sample code: MoveCollections_BulkRemove. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsBulkRemove(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .bulkRemove( + "rg1", + "movecollection1", + new BulkRemoveRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} +``` + +### MoveCollections_Commit + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.CommitRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Commit. */ +public final class MoveCollectionsCommitSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Commit.json + */ + /** + * Sample code: MoveCollections_Commit. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsCommit(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .commit( + "rg1", + "movecollection1", + new CommitRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} +``` + +### MoveCollections_Create + +```java +import com.azure.resourcemanager.resourcemover.models.Identity; +import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties; +import com.azure.resourcemanager.resourcemover.models.ResourceIdentityType; + +/** Samples for MoveCollections Create. */ +public final class MoveCollectionsCreateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Create.json + */ + /** + * Sample code: MoveCollections_Create. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsCreate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .define("movecollection1") + .withRegion("eastus2") + .withExistingResourceGroup("rg1") + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withProperties(new MoveCollectionProperties().withSourceRegion("eastus").withTargetRegion("westus")) + .create(); + } +} +``` + +### MoveCollections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections Delete. */ +public final class MoveCollectionsDeleteSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Delete.json + */ + /** + * Sample code: MoveCollections_Delete. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsDelete(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().delete("rg1", "movecollection1", Context.NONE); + } +} +``` + +### MoveCollections_Discard + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.DiscardRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Discard. */ +public final class MoveCollectionsDiscardSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Discard.json + */ + /** + * Sample code: MoveCollections_Discard. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsDiscard(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .discard( + "rg1", + "movecollection1", + new DiscardRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} +``` + +### MoveCollections_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections GetByResourceGroup. */ +public final class MoveCollectionsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Get.json + */ + /** + * Sample code: MoveCollections_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().getByResourceGroupWithResponse("rg1", "movecollection1", Context.NONE); + } +} +``` + +### MoveCollections_InitiateMove + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest; +import java.util.Arrays; + +/** Samples for MoveCollections InitiateMove. */ +public final class MoveCollectionsInitiateMoveSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_InitiateMove.json + */ + /** + * Sample code: MoveCollections_InitiateMove. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsInitiateMove( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .initiateMove( + "rg1", + "movecollection1", + new ResourceMoveRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} +``` + +### MoveCollections_List + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections List. */ +public final class MoveCollectionsListSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ListMoveCollectionsBySubscription.json + */ + /** + * Sample code: MoveCollections_ListMoveCollectionsBySubscription. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsListMoveCollectionsBySubscription( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().list(Context.NONE); + } +} +``` + +### MoveCollections_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections ListByResourceGroup. */ +public final class MoveCollectionsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ListMoveCollectionsByResourceGroup.json + */ + /** + * Sample code: MoveCollections_ListMoveCollectionsByResourceGroup. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsListMoveCollectionsByResourceGroup( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().listByResourceGroup("rg1", Context.NONE); + } +} +``` + +### MoveCollections_ListRequiredFor + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections ListRequiredFor. */ +public final class MoveCollectionsListRequiredForSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/RequiredFor_Get.json + */ + /** + * Sample code: RequiredFor_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void requiredForGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .listRequiredForWithResponse( + "rg1", + "movecollection1", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/nic1", + Context.NONE); + } +} +``` + +### MoveCollections_Prepare + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.PrepareRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Prepare. */ +public final class MoveCollectionsPrepareSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Prepare.json + */ + /** + * Sample code: MoveCollections_Prepare. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsPrepare(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .prepare( + "rg1", + "movecollection1", + new PrepareRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} +``` + +### MoveCollections_ResolveDependencies + +```java +import com.azure.core.util.Context; + +/** Samples for MoveCollections ResolveDependencies. */ +public final class MoveCollectionsResolveDependenciesSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ResolveDependencies.json + */ + /** + * Sample code: MoveCollections_ResolveDependencies. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsResolveDependencies( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().resolveDependencies("rg1", "movecollection1", Context.NONE); + } +} +``` + +### MoveCollections_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.Identity; +import com.azure.resourcemanager.resourcemover.models.MoveCollection; +import com.azure.resourcemanager.resourcemover.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for MoveCollections Update. */ +public final class MoveCollectionsUpdateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Update.json + */ + /** + * Sample code: MoveCollections_Update. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsUpdate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + MoveCollection resource = + manager.moveCollections().getByResourceGroupWithResponse("rg1", "movecollection1", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("key1", "mc1")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### MoveResources_Create + +```java +import com.azure.resourcemanager.resourcemover.models.MoveResourceDependencyOverride; +import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties; +import com.azure.resourcemanager.resourcemover.models.TargetAvailabilityZone; +import com.azure.resourcemanager.resourcemover.models.VirtualMachineResourceSettings; +import java.util.Arrays; + +/** Samples for MoveResources Create. */ +public final class MoveResourcesCreateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Create.json + */ + /** + * Sample code: MoveResources_Create. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesCreate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveResources() + .define("moveresourcename1") + .withExistingMoveCollection("rg1", "movecollection1") + .withProperties( + new MoveResourceProperties() + .withSourceId( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/virtualMachines/eastusvm1") + .withResourceSettings( + new VirtualMachineResourceSettings() + .withTargetResourceName("westusvm1") + .withUserManagedIdentities( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi1")) + .withTargetAvailabilityZone(TargetAvailabilityZone.TWO) + .withTargetAvailabilitySetId( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/availabilitySets/avset1")) + .withDependsOnOverrides( + Arrays + .asList( + new MoveResourceDependencyOverride() + .withId( + "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140") + .withTargetId( + "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/westusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140")))) + .create(); + } +} +``` + +### MoveResources_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for MoveResources Delete. */ +public final class MoveResourcesDeleteSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Delete.json + */ + /** + * Sample code: MoveResources_Delete. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesDelete(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().delete("rg1", "movecollection1", "moveresourcename1", Context.NONE); + } +} +``` + +### MoveResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MoveResources Get. */ +public final class MoveResourcesGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Get.json + */ + /** + * Sample code: MoveResources_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().getWithResponse("rg1", "movecollection1", "moveresourcename1", Context.NONE); + } +} +``` + +### MoveResources_List + +```java +import com.azure.core.util.Context; + +/** Samples for MoveResources List. */ +public final class MoveResourcesListSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_List.json + */ + /** + * Sample code: MoveResources_List. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesList(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().list("rg1", "movecollection1", null, Context.NONE); + } +} +``` + +### OperationsDiscovery_Get + +```java +import com.azure.core.util.Context; + +/** Samples for OperationsDiscovery Get. */ +public final class OperationsDiscoveryGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/OperationsDiscovery_Get.json + */ + /** + * Sample code: OperationsDiscovery_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void operationsDiscoveryGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.operationsDiscoveries().getWithResponse(Context.NONE); + } +} +``` + +### UnresolvedDependencies_Get + +```java +import com.azure.core.util.Context; + +/** Samples for UnresolvedDependencies Get. */ +public final class UnresolvedDependenciesGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/UnresolvedDependencies_Get.json + */ + /** + * Sample code: UnresolvedDependencies_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void unresolvedDependenciesGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.unresolvedDependencies().get("rg1", "movecollection1", null, null, null, Context.NONE); + } +} +``` + diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml index 8cdd2a5db4f8..28ac25e31260 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-resourcemover - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-resourcemover + 1.0.0-beta.2 + jar - Microsoft Azure SDK for ResourceMover Management - This package contains Microsoft Azure SDK for ResourceMover Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2021-01-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for ResourceMover Management + This package contains Microsoft Azure SDK for ResourceMover Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2021-08-01. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.26.0 - - - com.azure - azure-core-management - 1.5.3 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.26.0 + + + com.azure + azure-core-management + 1.5.3 + + diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java index d26dead6ba51..69072881094d 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -35,6 +36,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * Entry point to ResourceMoverManager. A first party Azure service orchestrating the move of Azure resources from one @@ -87,11 +89,12 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -131,6 +134,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -149,9 +163,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -187,20 +203,33 @@ public ResourceMoverManager authenticate(TokenCredential credential, AzureProfil userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java index 37434cc31c98..95916e467d46 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java @@ -46,7 +46,7 @@ public interface MoveCollectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -75,7 +75,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -89,9 +89,9 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName); @@ -104,9 +104,9 @@ SyncPoller, OperationStatusInner> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, Context context); @@ -159,7 +159,7 @@ SyncPoller, OperationStatusInner> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -177,9 +177,9 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body); @@ -196,9 +196,9 @@ SyncPoller, OperationStatusInner> beginPrepare( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context); @@ -266,9 +266,9 @@ OperationStatusInner prepare( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body); @@ -285,9 +285,9 @@ SyncPoller, OperationStatusInner> beginInitiate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context); @@ -355,9 +355,9 @@ OperationStatusInner initiateMove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body); @@ -374,9 +374,9 @@ SyncPoller, OperationStatusInner> beginCommit( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body, Context context); @@ -444,9 +444,9 @@ OperationStatusInner commit( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body); @@ -463,9 +463,9 @@ SyncPoller, OperationStatusInner> beginDiscard( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context); @@ -529,9 +529,9 @@ OperationStatusInner discard( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName); @@ -544,9 +544,9 @@ SyncPoller, OperationStatusInner> beginResolveD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName, Context context); @@ -588,9 +588,9 @@ SyncPoller, OperationStatusInner> beginResolveD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body); @@ -606,9 +606,9 @@ SyncPoller, OperationStatusInner> beginBulkRemo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context); @@ -666,7 +666,7 @@ OperationStatusInner bulkRemove( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -678,7 +678,7 @@ OperationStatusInner bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -690,7 +690,7 @@ OperationStatusInner bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -703,7 +703,7 @@ OperationStatusInner bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -733,7 +733,7 @@ RequiredForResourcesCollectionInner listRequiredFor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listRequiredForWithResponse( diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java index ce8354ba96ff..aa681f780889 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java @@ -24,7 +24,7 @@ public interface MoveResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String moveCollectionName); @@ -40,7 +40,7 @@ public interface MoveResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -56,9 +56,9 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link SyncPoller} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body); @@ -73,9 +73,9 @@ SyncPoller, MoveResourceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link SyncPoller} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, @@ -143,9 +143,9 @@ MoveResourceInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName); @@ -159,9 +159,9 @@ SyncPoller, OperationStatusInner> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName, Context context); @@ -219,7 +219,7 @@ OperationStatusInner delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java index 06f4b555d6f1..1e942a63d73b 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java @@ -25,7 +25,7 @@ public interface OperationsDiscoveriesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(Context context); diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java index c29de739c441..493a1850c7a0 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java @@ -21,7 +21,7 @@ public interface UnresolvedDependenciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable get(String resourceGroupName, String moveCollectionName); @@ -38,7 +38,7 @@ public interface UnresolvedDependenciesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable get( diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java index be2a02a6a018..e25123fb1865 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java @@ -6,18 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.resourcemover.models.Identity; import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Define the move collection. */ @Fluent public final class MoveCollectionInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionInner.class); - /* * The etag of the resource. */ @@ -36,6 +33,12 @@ public final class MoveCollectionInner extends Resource { @JsonProperty(value = "properties") private MoveCollectionProperties properties; + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** * Get the etag property: The etag of the resource. * @@ -85,6 +88,15 @@ public MoveCollectionInner withProperties(MoveCollectionProperties properties) { return this; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** {@inheritDoc} */ @Override public MoveCollectionInner withLocation(String location) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java index e4fb6c882a70..2bf675909729 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java @@ -6,22 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the move resource. */ @Fluent public final class MoveResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceInner.class); - /* * Defines the move resource properties. */ @JsonProperty(value = "properties") private MoveResourceProperties properties; + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** * Get the properties property: Defines the move resource properties. * @@ -42,6 +45,15 @@ public MoveResourceInner withProperties(MoveResourceProperties properties) { return this; } + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java index 0a331aaeb9b5..3193cfd5bedb 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.models.OperationStatusError; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation status REST resource. */ @Immutable public final class OperationStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class); - /* * Resource Id. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java index 18c47e98d168..b97283ae6251 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.resourcemover.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.models.OperationsDiscovery; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Collection of ClientDiscovery details. */ @Fluent public final class OperationsDiscoveryCollectionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDiscoveryCollectionInner.class); - /* * Gets or sets the ClientDiscovery details. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/RequiredForResourcesCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/RequiredForResourcesCollectionInner.java index 583fe3c58e9a..ca0570182508 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/RequiredForResourcesCollectionInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/RequiredForResourcesCollectionInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Required for resources collection. */ @Fluent public final class RequiredForResourcesCollectionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RequiredForResourcesCollectionInner.class); - /* * Gets or sets the list of source Ids for which the input resource is * required. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyInner.java index 9b3baef4599f..85660da7936e 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyInner.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Unresolved dependency. */ @Fluent public final class UnresolvedDependencyInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnresolvedDependencyInner.class); - /* * Gets or sets the count. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java index c83457611363..3a92b2fd86a6 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.resourcemover.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner; import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest; @@ -62,6 +63,10 @@ public MoveCollectionProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java index 72a94fdb6dc9..4c82615405a1 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resourcemover.fluent.MoveCollectionsClient; @@ -51,8 +50,6 @@ /** An instance of this class provides access to all the operations defined in MoveCollectionsClient. */ public final class MoveCollectionsClientImpl implements MoveCollectionsClient { - private final ClientLogger logger = new ClientLogger(MoveCollectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MoveCollectionsService service; @@ -305,7 +302,7 @@ Mono> listMoveCollectionsByResourceGroupNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -360,7 +357,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -411,7 +408,7 @@ private Mono> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -435,7 +432,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String moveCollectionName) { @@ -477,7 +474,7 @@ public MoveCollectionInner create(String resourceGroupName, String moveCollectio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -494,7 +491,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -549,7 +546,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -600,7 +597,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -624,7 +621,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String moveCollectionName) { @@ -666,7 +663,7 @@ public MoveCollectionInner update(String resourceGroupName, String moveCollectio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return define the move collection. + * @return define the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -682,7 +679,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -732,7 +729,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -778,9 +775,9 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDeleteAsync( String resourceGroupName, String moveCollectionName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, moveCollectionName); @@ -791,7 +788,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -803,9 +800,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDeleteAsync( String resourceGroupName, String moveCollectionName, Context context) { context = this.client.mergeContext(context); @@ -824,9 +821,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName) { return beginDeleteAsync(resourceGroupName, moveCollectionName).getSyncPoller(); @@ -841,9 +838,9 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, Context context) { return beginDeleteAsync(resourceGroupName, moveCollectionName, context).getSyncPoller(); @@ -857,7 +854,7 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String moveCollectionName) { @@ -875,7 +872,7 @@ private Mono deleteAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -924,7 +921,7 @@ public OperationStatusInner delete(String resourceGroupName, String moveCollecti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -974,7 +971,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1020,7 +1017,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String moveCollectionName) { @@ -1059,7 +1056,7 @@ public MoveCollectionInner getByResourceGroup(String resourceGroupName, String m * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1079,7 +1076,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> prepareWithResponseAsync( @@ -1137,7 +1134,7 @@ private Mono>> prepareWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> prepareWithResponseAsync( @@ -1191,9 +1188,9 @@ private Mono>> prepareWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginPrepareAsync( String resourceGroupName, String moveCollectionName, PrepareRequest body) { Mono>> mono = prepareWithResponseAsync(resourceGroupName, moveCollectionName, body); @@ -1204,7 +1201,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1220,9 +1217,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginPrepareAsync( String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) { context = this.client.mergeContext(context); @@ -1246,9 +1243,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body) { return beginPrepareAsync(resourceGroupName, moveCollectionName, body).getSyncPoller(); @@ -1267,9 +1264,9 @@ public SyncPoller, OperationStatusInner> beginP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) { return beginPrepareAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller(); @@ -1287,7 +1284,7 @@ public SyncPoller, OperationStatusInner> beginP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono prepareAsync( @@ -1308,7 +1305,7 @@ private Mono prepareAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono prepareAsync(String resourceGroupName, String moveCollectionName) { @@ -1331,7 +1328,7 @@ private Mono prepareAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono prepareAsync( @@ -1412,7 +1409,7 @@ public OperationStatusInner prepare( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> initiateMoveWithResponseAsync( @@ -1470,7 +1467,7 @@ private Mono>> initiateMoveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> initiateMoveWithResponseAsync( @@ -1524,9 +1521,9 @@ private Mono>> initiateMoveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginInitiateMoveAsync( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) { Mono>> mono = @@ -1538,7 +1535,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1554,9 +1551,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginInitiateMoveAsync( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) { context = this.client.mergeContext(context); @@ -1580,9 +1577,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) { return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body).getSyncPoller(); @@ -1601,9 +1598,9 @@ public SyncPoller, OperationStatusInner> beginI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) { return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller(); @@ -1621,7 +1618,7 @@ public SyncPoller, OperationStatusInner> beginI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono initiateMoveAsync( @@ -1642,7 +1639,7 @@ private Mono initiateMoveAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono initiateMoveAsync(String resourceGroupName, String moveCollectionName) { @@ -1665,7 +1662,7 @@ private Mono initiateMoveAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono initiateMoveAsync( @@ -1747,7 +1744,7 @@ public OperationStatusInner initiateMove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitWithResponseAsync( @@ -1805,7 +1802,7 @@ private Mono>> commitWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> commitWithResponseAsync( @@ -1859,9 +1856,9 @@ private Mono>> commitWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginCommitAsync( String resourceGroupName, String moveCollectionName, CommitRequest body) { Mono>> mono = commitWithResponseAsync(resourceGroupName, moveCollectionName, body); @@ -1872,7 +1869,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1888,9 +1885,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginCommitAsync( String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) { context = this.client.mergeContext(context); @@ -1914,9 +1911,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body) { return beginCommitAsync(resourceGroupName, moveCollectionName, body).getSyncPoller(); @@ -1935,9 +1932,9 @@ public SyncPoller, OperationStatusInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) { return beginCommitAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller(); @@ -1955,7 +1952,7 @@ public SyncPoller, OperationStatusInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitAsync( @@ -1976,7 +1973,7 @@ private Mono commitAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitAsync(String resourceGroupName, String moveCollectionName) { @@ -1999,7 +1996,7 @@ private Mono commitAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono commitAsync( @@ -2080,7 +2077,7 @@ public OperationStatusInner commit( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> discardWithResponseAsync( @@ -2138,7 +2135,7 @@ private Mono>> discardWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> discardWithResponseAsync( @@ -2192,9 +2189,9 @@ private Mono>> discardWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDiscardAsync( String resourceGroupName, String moveCollectionName, DiscardRequest body) { Mono>> mono = discardWithResponseAsync(resourceGroupName, moveCollectionName, body); @@ -2205,7 +2202,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2221,9 +2218,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDiscardAsync( String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) { context = this.client.mergeContext(context); @@ -2247,9 +2244,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body) { return beginDiscardAsync(resourceGroupName, moveCollectionName, body).getSyncPoller(); @@ -2268,9 +2265,9 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) { return beginDiscardAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller(); @@ -2288,7 +2285,7 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono discardAsync( @@ -2309,7 +2306,7 @@ private Mono discardAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono discardAsync(String resourceGroupName, String moveCollectionName) { @@ -2332,7 +2329,7 @@ private Mono discardAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono discardAsync( @@ -2409,7 +2406,7 @@ public OperationStatusInner discard( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resolveDependenciesWithResponseAsync( @@ -2459,7 +2456,7 @@ private Mono>> resolveDependenciesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resolveDependenciesWithResponseAsync( @@ -2505,9 +2502,9 @@ private Mono>> resolveDependenciesWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginResolveDependenciesAsync( String resourceGroupName, String moveCollectionName) { Mono>> mono = @@ -2519,7 +2516,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2531,9 +2528,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginResolveDependenciesAsync( String resourceGroupName, String moveCollectionName, Context context) { context = this.client.mergeContext(context); @@ -2553,9 +2550,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName) { return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName).getSyncPoller(); @@ -2570,9 +2567,9 @@ public SyncPoller, OperationStatusInner> beginR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName, Context context) { return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName, context).getSyncPoller(); @@ -2586,7 +2583,7 @@ public SyncPoller, OperationStatusInner> beginR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resolveDependenciesAsync(String resourceGroupName, String moveCollectionName) { @@ -2604,7 +2601,7 @@ private Mono resolveDependenciesAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resolveDependenciesAsync( @@ -2657,7 +2654,7 @@ public OperationStatusInner resolveDependencies( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> bulkRemoveWithResponseAsync( @@ -2714,7 +2711,7 @@ private Mono>> bulkRemoveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> bulkRemoveWithResponseAsync( @@ -2767,9 +2764,9 @@ private Mono>> bulkRemoveWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginBulkRemoveAsync( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) { Mono>> mono = @@ -2781,7 +2778,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2796,9 +2793,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginBulkRemoveAsync( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) { context = this.client.mergeContext(context); @@ -2821,9 +2818,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) { return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body).getSyncPoller(); @@ -2841,9 +2838,9 @@ public SyncPoller, OperationStatusInner> beginB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) { return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller(); @@ -2860,7 +2857,7 @@ public SyncPoller, OperationStatusInner> beginB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono bulkRemoveAsync( @@ -2880,7 +2877,7 @@ private Mono bulkRemoveAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono bulkRemoveAsync(String resourceGroupName, String moveCollectionName) { @@ -2902,7 +2899,7 @@ private Mono bulkRemoveAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono bulkRemoveAsync( @@ -2974,7 +2971,8 @@ public OperationStatusInner bulkRemove( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -3020,7 +3018,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -3061,7 +3060,7 @@ private Mono> listSinglePageAsync(Context con * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -3076,7 +3075,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -3090,7 +3089,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -3104,7 +3103,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -3118,7 +3117,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -3170,7 +3170,8 @@ private Mono> listByResourceGroupSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -3219,7 +3220,7 @@ private Mono> listByResourceGroupSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -3236,7 +3237,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -3252,7 +3253,7 @@ private PagedFlux listByResourceGroupAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -3267,7 +3268,7 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -3283,7 +3284,7 @@ public PagedIterable listByResourceGroup(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRequiredForWithResponseAsync( @@ -3338,7 +3339,7 @@ private Mono> listRequiredForWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRequiredForWithResponseAsync( @@ -3389,7 +3390,7 @@ private Mono> listRequiredForWithR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listRequiredForAsync( @@ -3432,7 +3433,7 @@ public RequiredForResourcesCollectionInner listRequiredFor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listRequiredForWithResponse( @@ -3447,7 +3448,8 @@ public Response listRequiredForWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move collections. + * @return defines the collection of move collections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMoveCollectionsBySubscriptionNextSinglePageAsync( @@ -3486,7 +3488,8 @@ private Mono> listMoveCollectionsBySubscripti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move collections. + * @return defines the collection of move collections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMoveCollectionsBySubscriptionNextSinglePageAsync( @@ -3522,7 +3525,8 @@ private Mono> listMoveCollectionsBySubscripti * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move collections. + * @return defines the collection of move collections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMoveCollectionsByResourceGroupNextSinglePageAsync( @@ -3562,7 +3566,8 @@ private Mono> listMoveCollectionsByResourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move collections. + * @return defines the collection of move collections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMoveCollectionsByResourceGroupNextSinglePageAsync( diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java index 8bdd332b1a76..6670374bd1da 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java @@ -22,10 +22,9 @@ import com.azure.resourcemanager.resourcemover.models.PrepareRequest; import com.azure.resourcemanager.resourcemover.models.RequiredForResourcesCollection; import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MoveCollectionsImpl implements MoveCollections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MoveCollectionsImpl.class); private final MoveCollectionsClient innerClient; @@ -290,7 +289,7 @@ public Response listRequiredForWithResponse( public MoveCollection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -298,7 +297,7 @@ public MoveCollection getById(String id) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -310,7 +309,7 @@ public MoveCollection getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -318,7 +317,7 @@ public Response getByIdWithResponse(String id, Context context) } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -330,7 +329,7 @@ public Response getByIdWithResponse(String id, Context context) public OperationStatus deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -338,7 +337,7 @@ public OperationStatus deleteById(String id) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -350,7 +349,7 @@ public OperationStatus deleteById(String id) { public OperationStatus deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -358,7 +357,7 @@ public OperationStatus deleteByIdWithResponse(String id, Context context) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java index e88e94ee0ee3..2dafd674ff78 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.resourcemover.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner; import com.azure.resourcemanager.resourcemover.models.MoveResource; @@ -36,6 +37,10 @@ public MoveResourceProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public MoveResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java index 405c40b3f9f7..d65602e9886c 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resourcemover.fluent.MoveResourcesClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in MoveResourcesClient. */ public final class MoveResourcesClientImpl implements MoveResourcesClient { - private final ClientLogger logger = new ClientLogger(MoveResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MoveResourcesService service; @@ -154,7 +151,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -216,7 +214,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -274,7 +273,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String moveCollectionName, String filter) { @@ -291,7 +290,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String moveCollectionName) { @@ -312,7 +311,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -330,7 +329,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String moveCollectionName) { @@ -349,7 +348,7 @@ public PagedIterable list(String resourceGroupName, String mo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -367,7 +366,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -428,7 +427,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -489,9 +488,9 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link PollerFlux} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MoveResourceInner> beginCreateAsync( String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) { Mono>> mono = @@ -499,7 +498,11 @@ private PollerFlux, MoveResourceInner> beginCreate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), MoveResourceInner.class, MoveResourceInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + MoveResourceInner.class, + MoveResourceInner.class, + this.client.getContext()); } /** @@ -513,9 +516,9 @@ private PollerFlux, MoveResourceInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link PollerFlux} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MoveResourceInner> beginCreateAsync( String resourceGroupName, String moveCollectionName, @@ -541,9 +544,9 @@ private PollerFlux, MoveResourceInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link SyncPoller} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) { return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body).getSyncPoller(); @@ -560,9 +563,9 @@ public SyncPoller, MoveResourceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return the {@link SyncPoller} for polling of defines the move resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, @@ -582,7 +585,7 @@ public SyncPoller, MoveResourceInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return defines the move resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -601,7 +604,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return defines the move resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -623,7 +626,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the move resource. + * @return defines the move resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -704,7 +707,7 @@ public MoveResourceInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -760,7 +763,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -812,9 +815,9 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDeleteAsync( String resourceGroupName, String moveCollectionName, String moveResourceName) { Mono>> mono = @@ -826,7 +829,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -839,9 +842,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link PollerFlux} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDeleteAsync( String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) { context = this.client.mergeContext(context); @@ -862,9 +865,9 @@ private PollerFlux, OperationStatusInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName) { return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName).getSyncPoller(); @@ -880,9 +883,9 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return the {@link SyncPoller} for polling of operation status REST resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) { return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName, context).getSyncPoller(); @@ -897,7 +900,7 @@ public SyncPoller, OperationStatusInner> beginD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -917,7 +920,7 @@ private Mono deleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status REST resource. + * @return operation status REST resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -970,7 +973,7 @@ public OperationStatusInner delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1026,7 +1029,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1078,7 +1081,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -1120,7 +1123,7 @@ public MoveResourceInner get(String resourceGroupName, String moveCollectionName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -1135,7 +1138,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1171,7 +1175,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java index 33d0afeb6c8c..69237c0afb63 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java @@ -15,10 +15,9 @@ import com.azure.resourcemanager.resourcemover.models.MoveResource; import com.azure.resourcemanager.resourcemover.models.MoveResources; import com.azure.resourcemanager.resourcemover.models.OperationStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MoveResourcesImpl implements MoveResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MoveResourcesImpl.class); private final MoveResourcesClient innerClient; @@ -90,7 +89,7 @@ public Response getWithResponse( public MoveResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -98,7 +97,7 @@ public MoveResource getById(String id) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,7 +105,7 @@ public MoveResource getById(String id) { } String moveResourceName = Utils.getValueFromIdByName(id, "moveResources"); if (moveResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id))); @@ -117,7 +116,7 @@ public MoveResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -125,7 +124,7 @@ public Response getByIdWithResponse(String id, Context context) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -133,7 +132,7 @@ public Response getByIdWithResponse(String id, Context context) { } String moveResourceName = Utils.getValueFromIdByName(id, "moveResources"); if (moveResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id))); @@ -144,7 +143,7 @@ public Response getByIdWithResponse(String id, Context context) { public OperationStatus deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -152,7 +151,7 @@ public OperationStatus deleteById(String id) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,7 +159,7 @@ public OperationStatus deleteById(String id) { } String moveResourceName = Utils.getValueFromIdByName(id, "moveResources"); if (moveResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id))); @@ -171,7 +170,7 @@ public OperationStatus deleteById(String id) { public OperationStatus deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -179,7 +178,7 @@ public OperationStatus deleteByIdWithResponse(String id, Context context) { } String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections"); if (moveCollectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -187,7 +186,7 @@ public OperationStatus deleteByIdWithResponse(String id, Context context) { } String moveResourceName = Utils.getValueFromIdByName(id, "moveResources"); if (moveResourceName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id))); diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java index 0b58cf50d76e..c0c464d8d82d 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java @@ -20,15 +20,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.fluent.OperationsDiscoveriesClient; import com.azure.resourcemanager.resourcemover.fluent.models.OperationsDiscoveryCollectionInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsDiscoveriesClient. */ public final class OperationsDiscoveriesClientImpl implements OperationsDiscoveriesClient { - private final ClientLogger logger = new ClientLogger(OperationsDiscoveriesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsDiscoveriesService service; @@ -68,7 +65,8 @@ Mono> get( /** * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync() { @@ -90,7 +88,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(Context context) { @@ -108,7 +107,7 @@ private Mono> getWithResponseAsync( /** * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync() { @@ -138,7 +137,7 @@ public OperationsDiscoveryCollectionInner get() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(Context context) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java index 0895a8f09cfe..efd8e6887d14 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.resourcemover.fluent.models.OperationsDiscoveryCollectionInner; import com.azure.resourcemanager.resourcemover.models.OperationsDiscoveries; import com.azure.resourcemanager.resourcemover.models.OperationsDiscoveryCollection; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsDiscoveriesImpl implements OperationsDiscoveries { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDiscoveriesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsDiscoveriesImpl.class); private final OperationsDiscoveriesClient innerClient; diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/ResourceMoverServiceApiImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/ResourceMoverServiceApiImpl.java index 676fca431559..f24c5c585afe 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/ResourceMoverServiceApiImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/ResourceMoverServiceApiImpl.java @@ -39,8 +39,6 @@ /** Initializes a new instance of the ResourceMoverServiceApiImpl type. */ @ServiceClient(builder = ResourceMoverServiceApiBuilder.class) public final class ResourceMoverServiceApiImpl implements ResourceMoverServiceApi { - private final ClientLogger logger = new ClientLogger(ResourceMoverServiceApiImpl.class); - /** The Subscription ID. */ private final String subscriptionId; @@ -183,7 +181,7 @@ public OperationsDiscoveriesClient getOperationsDiscoveries() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-01-01"; + this.apiVersion = "2021-08-01"; this.moveCollections = new MoveCollectionsClientImpl(this); this.moveResources = new MoveResourcesClientImpl(this); this.unresolvedDependencies = new UnresolvedDependenciesClientImpl(this); @@ -273,7 +271,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -332,4 +330,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceMoverServiceApiImpl.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesClientImpl.java index 294c661c59a6..ab19b0e90c54 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesClientImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.fluent.UnresolvedDependenciesClient; import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyInner; import com.azure.resourcemanager.resourcemover.models.DependencyLevel; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in UnresolvedDependenciesClient. */ public final class UnresolvedDependenciesClientImpl implements UnresolvedDependenciesClient { - private final ClientLogger logger = new ClientLogger(UnresolvedDependenciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UnresolvedDependenciesService service; @@ -101,7 +98,8 @@ Mono> getNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSinglePageAsync( @@ -170,7 +168,8 @@ private Mono> getSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSinglePageAsync( @@ -236,7 +235,7 @@ private Mono> getSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getAsync( @@ -258,7 +257,7 @@ private PagedFlux getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getAsync(String resourceGroupName, String moveCollectionName) { @@ -282,7 +281,7 @@ private PagedFlux getAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getAsync( @@ -305,7 +304,7 @@ private PagedFlux getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable get(String resourceGroupName, String moveCollectionName) { @@ -327,7 +326,7 @@ public PagedIterable get(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable get( @@ -348,7 +347,8 @@ public PagedIterable get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return unresolved dependency collection. + * @return unresolved dependency collection along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getNextSinglePageAsync(String nextLink) { @@ -384,7 +384,8 @@ private Mono> getNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return unresolved dependency collection. + * @return unresolved dependency collection along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesImpl.java index 82fe32a60b26..035904a1ea26 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesImpl.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/UnresolvedDependenciesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.resourcemover.models.DependencyLevel; import com.azure.resourcemanager.resourcemover.models.UnresolvedDependencies; import com.azure.resourcemanager.resourcemover.models.UnresolvedDependency; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UnresolvedDependenciesImpl implements UnresolvedDependencies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnresolvedDependenciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UnresolvedDependenciesImpl.class); private final UnresolvedDependenciesClient innerClient; diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AffectedMoveResource.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AffectedMoveResource.java index 37c945a7d0be..fec49069a808 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AffectedMoveResource.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AffectedMoveResource.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The RP custom operation error info. */ @Immutable public final class AffectedMoveResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AffectedMoveResource.class); - /* * The affected move resource id. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AutomaticResolutionProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AutomaticResolutionProperties.java index a7a911ae7a1e..236ae019fac1 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AutomaticResolutionProperties.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AutomaticResolutionProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the properties for automatic resolution. */ @Fluent public final class AutomaticResolutionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomaticResolutionProperties.class); - /* * Gets the MoveResource ARM ID of * the dependent resource if the resolution type is Automatic. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AvailabilitySetResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AvailabilitySetResourceSettings.java index 60b8b6b5a5c2..641209c167be 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AvailabilitySetResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AvailabilitySetResourceSettings.java @@ -5,18 +5,23 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; /** Gets or sets the availability set resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Compute/availabilitySets") @Fluent public final class AvailabilitySetResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilitySetResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets the target fault domain. @@ -30,6 +35,26 @@ public final class AvailabilitySetResourceSettings extends ResourceSettings { @JsonProperty(value = "updateDomain") private Integer updateDomain; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the AvailabilitySetResourceSettings object itself. + */ + public AvailabilitySetResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the faultDomain property: Gets or sets the target fault domain. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AzureResourceReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AzureResourceReference.java index a21339eb9bd6..e23acceaef9a 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AzureResourceReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AzureResourceReference.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines reference to an Azure resource. */ @Fluent public class AzureResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureResourceReference.class); - /* * Gets the ARM resource ID of the tracked resource being referenced. */ @@ -47,10 +44,12 @@ public AzureResourceReference withSourceArmResourceId(String sourceArmResourceId */ public void validate() { if (sourceArmResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceArmResourceId in model AzureResourceReference")); } } + + private static final ClientLogger LOGGER = new ClientLogger(AzureResourceReference.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/BulkRemoveRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/BulkRemoveRequest.java index ebffe991a994..a36d7be3bb72 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/BulkRemoveRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/BulkRemoveRequest.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the request body for bulk remove of move resources operation. */ @Fluent public final class BulkRemoveRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BulkRemoveRequest.class); - /* * Gets or sets a value indicating whether the operation needs to only run * pre-requisite. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/CommitRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/CommitRequest.java index 52d9c9b5d413..914f653d104c 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/CommitRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/CommitRequest.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the request body for commit operation. */ @Fluent public final class CommitRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitRequest.class); - /* * Gets or sets a value indicating whether the operation needs to only run * pre-requisite. @@ -107,9 +104,11 @@ public CommitRequest withMoveResourceInputType(MoveResourceInputType moveResourc */ public void validate() { if (moveResources() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property moveResources in model CommitRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CommitRequest.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiscardRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiscardRequest.java index 70fc033156cb..9725b2d177fe 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiscardRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiscardRequest.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the request body for discard operation. */ @Fluent public final class DiscardRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiscardRequest.class); - /* * Gets or sets a value indicating whether the operation needs to only run * pre-requisite. @@ -107,9 +104,11 @@ public DiscardRequest withMoveResourceInputType(MoveResourceInputType moveResour */ public void validate() { if (moveResources() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property moveResources in model DiscardRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DiscardRequest.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiskEncryptionSetResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiskEncryptionSetResourceSettings.java index 0cac83158a8f..9a5e1071c9a9 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiskEncryptionSetResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiskEncryptionSetResourceSettings.java @@ -4,19 +4,15 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Defines the disk encryption set resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Compute/diskEncryptionSets") -@Immutable +@Fluent public final class DiskEncryptionSetResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskEncryptionSetResourceSettings.class); - /** {@inheritDoc} */ @Override public DiskEncryptionSetResourceSettings withTargetResourceName(String targetResourceName) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Display.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Display.java index 1a8afccbdd2c..c9f7bf9a5dbe 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Display.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Display.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -16,8 +14,6 @@ */ @Fluent public final class Display { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Display.class); - /* * Gets or sets the provider. * The localized friendly form of the resource provider name – it is diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Identity.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Identity.java index 7a5a22ca062b..6dc036093541 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Identity.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Identity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the MSI properties of the Move Collection. */ @Fluent public class Identity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class); - /* * The type of identity used for the resource mover service. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/JobStatus.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/JobStatus.java index 5a794f854388..2698e7fa4ece 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/JobStatus.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/JobStatus.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the job status. */ @Immutable public final class JobStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobStatus.class); - /* * Defines the job name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/KeyVaultResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/KeyVaultResourceSettings.java index 23c1b305ebba..d0f9a61b53e2 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/KeyVaultResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/KeyVaultResourceSettings.java @@ -4,19 +4,15 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Defines the key vault resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.KeyVault/vaults") -@Immutable +@Fluent public final class KeyVaultResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultResourceSettings.class); - /** {@inheritDoc} */ @Override public KeyVaultResourceSettings withTargetResourceName(String targetResourceName) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBBackendAddressPoolResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBBackendAddressPoolResourceSettings.java index 7eaf013c3c66..08ad6e0fee24 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBBackendAddressPoolResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBBackendAddressPoolResourceSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines load balancer backend address pool properties. */ @Fluent public final class LBBackendAddressPoolResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LBBackendAddressPoolResourceSettings.class); - /* * Gets or sets the backend address pool name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBFrontendIpConfigurationResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBFrontendIpConfigurationResourceSettings.java index 6d02bfba7a5a..a96c965a52a8 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBFrontendIpConfigurationResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LBFrontendIpConfigurationResourceSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines load balancer frontend IP configuration properties. */ @Fluent public final class LBFrontendIpConfigurationResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LBFrontendIpConfigurationResourceSettings.class); - /* * Gets or sets the frontend IP configuration name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerBackendAddressPoolReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerBackendAddressPoolReference.java index 415319088c69..24dc23d46a1d 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerBackendAddressPoolReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerBackendAddressPoolReference.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines reference to load balancer backend address pools. */ -@Immutable +@Fluent public final class LoadBalancerBackendAddressPoolReference extends ProxyResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerBackendAddressPoolReference.class); - /** {@inheritDoc} */ @Override public LoadBalancerBackendAddressPoolReference withName(String name) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerNatRuleReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerNatRuleReference.java index 41abe1082d79..667e508f6a91 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerNatRuleReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerNatRuleReference.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines reference to load balancer NAT rules. */ -@Immutable +@Fluent public final class LoadBalancerNatRuleReference extends ProxyResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerNatRuleReference.class); - /** {@inheritDoc} */ @Override public LoadBalancerNatRuleReference withName(String name) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerResourceSettings.java index 9458edda2054..58a121d7ab5a 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/LoadBalancerResourceSettings.java @@ -5,19 +5,24 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; +import java.util.Map; /** Defines the load balancer resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Network/loadBalancers") @Fluent public final class LoadBalancerResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets load balancer sku (Basic/Standard). @@ -45,6 +50,26 @@ public final class LoadBalancerResourceSettings extends ResourceSettings { @JsonProperty(value = "zones") private String zones; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the LoadBalancerResourceSettings object itself. + */ + public LoadBalancerResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the sku property: Gets or sets load balancer sku (Basic/Standard). * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ManualResolutionProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ManualResolutionProperties.java index e766e8531ab0..f882ac87f448 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ManualResolutionProperties.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ManualResolutionProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the properties for manual resolution. */ @Fluent public final class ManualResolutionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManualResolutionProperties.class); - /* * Gets or sets the target resource ARM ID of the dependent resource if the * resource type is Manual. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollection.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollection.java index 40407ffe4603..32c4e55b7307 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollection.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollection.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner; import java.util.Map; @@ -67,6 +68,13 @@ public interface MoveCollection { */ MoveCollectionProperties properties(); + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionProperties.java index 5839d79b2006..b5037c5661c6 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionProperties.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionProperties.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the move collection properties. */ @Fluent public final class MoveCollectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionProperties.class); - /* * Gets or sets the source region. */ @@ -103,13 +100,13 @@ public MoveCollectionPropertiesErrors errors() { */ public void validate() { if (sourceRegion() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceRegion in model MoveCollectionProperties")); } if (targetRegion() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property targetRegion in model MoveCollectionProperties")); @@ -118,4 +115,6 @@ public void validate() { errors().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MoveCollectionProperties.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionPropertiesErrors.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionPropertiesErrors.java index 2b5a5fbda029..0e9c464bca09 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionPropertiesErrors.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionPropertiesErrors.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines the move collection errors. */ -@Immutable +@Fluent public final class MoveCollectionPropertiesErrors extends MoveResourceError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionPropertiesErrors.class); - /** {@inheritDoc} */ @Override public MoveCollectionPropertiesErrors withProperties(MoveResourceErrorBody properties) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionResultList.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionResultList.java index 97e7599f3d59..dc0b7a546bb5 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionResultList.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the collection of move collections. */ @Fluent public final class MoveCollectionResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionResultList.class); - /* * Gets the list of move collections. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollections.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollections.java index ca38e00d391c..db4e0206d0e1 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollections.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollections.java @@ -56,7 +56,7 @@ public interface MoveCollections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String moveCollectionName, Context context); @@ -330,7 +330,7 @@ OperationStatus bulkRemove( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -341,7 +341,7 @@ OperationStatus bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the subscription. + * @return all the Move Collections in the subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -352,7 +352,7 @@ OperationStatus bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -364,7 +364,7 @@ OperationStatus bulkRemove( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Move Collections in the resource group. + * @return all the Move Collections in the resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -392,7 +392,7 @@ RequiredForResourcesCollection listRequiredFor( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return required for resources collection. + * @return required for resources collection along with {@link Response}. */ Response listRequiredForWithResponse( String resourceGroupName, String moveCollectionName, String sourceId, Context context); @@ -404,7 +404,7 @@ Response listRequiredForWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response}. */ MoveCollection getById(String id); @@ -416,7 +416,7 @@ Response listRequiredForWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the move collection. + * @return the move collection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveErrorInfo.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveErrorInfo.java index 342485cda39f..4bb1005fd3ea 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveErrorInfo.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveErrorInfo.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The move custom error info. */ @Immutable public final class MoveErrorInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveErrorInfo.class); - /* * The affected move resources. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResource.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResource.java index af8e32d36783..304f238074b7 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResource.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResource.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.resourcemover.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner; @@ -37,6 +38,13 @@ public interface MoveResource { */ MoveResourceProperties properties(); + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner object. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceCollection.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceCollection.java index 8ae3c23fa6ae..781f7bb8ccb5 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceCollection.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceCollection.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the collection of move resources. */ @Fluent public final class MoveResourceCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceCollection.class); - /* * Gets the list of move resources. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependency.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependency.java index 8847b88b4c5f..60a2c0c04dcd 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependency.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependency.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the dependency of the move resource. */ @Fluent public final class MoveResourceDependency { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceDependency.class); - /* * Gets the source ARM ID of the dependent resource. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependencyOverride.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependencyOverride.java index ee4791c4592d..e46d2548aa3e 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependencyOverride.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceDependencyOverride.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the dependency override of the move resource. */ @Fluent public final class MoveResourceDependencyOverride { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceDependencyOverride.class); - /* * Gets or sets the ARM ID of the dependent resource. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceError.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceError.java index 106f59de8635..3dfb1526d0e8 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceError.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceError.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** An error response from the azure resource mover service. */ @Fluent public class MoveResourceError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceError.class); - /* * The move resource error body. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceErrorBody.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceErrorBody.java index 298259f72342..ab45e57e69ca 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceErrorBody.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceErrorBody.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An error response from the Azure Migrate service. */ @Immutable public final class MoveResourceErrorBody { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceErrorBody.class); - /* * An identifier for the error. Codes are invariant and are intended to be * consumed programmatically. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceFilterProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceFilterProperties.java deleted file mode 100644 index c8b82acfd236..000000000000 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceFilterProperties.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcemover.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The MoveResourceFilterProperties model. */ -@Fluent -public final class MoveResourceFilterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceFilterProperties.class); - - /* - * The provisioning state. - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the MoveResourceFilterProperties object itself. - */ - public MoveResourceFilterProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceProperties.java index b20eb6946ddd..b354987ab4cb 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceProperties.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceProperties.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the move resource properties. */ @Fluent public final class MoveResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceProperties.class); - /* * Defines the provisioning states. */ @@ -233,7 +230,7 @@ public MoveResourcePropertiesErrors errors() { */ public void validate() { if (sourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sourceId in model MoveResourceProperties")); } @@ -256,4 +253,6 @@ public void validate() { errors().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(MoveResourceProperties.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesErrors.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesErrors.java index 3835c0e0e6da..9d48c2c05523 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesErrors.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesErrors.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines the move resource errors. */ -@Immutable +@Fluent public final class MoveResourcePropertiesErrors extends MoveResourceError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcePropertiesErrors.class); - /** {@inheritDoc} */ @Override public MoveResourcePropertiesErrors withProperties(MoveResourceErrorBody properties) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesMoveStatus.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesMoveStatus.java index 6568f0a43005..8d949b8c8be1 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesMoveStatus.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesMoveStatus.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines the move resource status. */ -@Immutable +@Fluent public final class MoveResourcePropertiesMoveStatus extends MoveResourceStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcePropertiesMoveStatus.class); - /** {@inheritDoc} */ @Override public MoveResourcePropertiesMoveStatus withJobStatus(JobStatus jobStatus) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceStatus.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceStatus.java index 734070f93d1b..0440bad0d9ea 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceStatus.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourceStatus.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the move resource status. */ @Fluent public class MoveResourceStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceStatus.class); - /* * Defines the MoveResource states. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResources.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResources.java index 2e202a1709dd..accf861e33a4 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResources.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResources.java @@ -18,7 +18,7 @@ public interface MoveResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String moveCollectionName); @@ -33,7 +33,7 @@ public interface MoveResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the collection of move resources. + * @return defines the collection of move resources as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String moveCollectionName, String filter, Context context); @@ -89,7 +89,7 @@ OperationStatus delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String moveCollectionName, String moveResourceName, Context context); @@ -101,7 +101,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response}. */ MoveResource getById(String id); @@ -113,7 +113,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Move Resource. + * @return the Move Resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkInterfaceResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkInterfaceResourceSettings.java index 71a3d3bbfbb2..54d77ce0ce57 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkInterfaceResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkInterfaceResourceSettings.java @@ -5,19 +5,24 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; +import java.util.Map; /** Defines the network interface resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Network/networkInterfaces") @Fluent public final class NetworkInterfaceResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkInterfaceResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets the IP configurations of the NIC. @@ -32,6 +37,26 @@ public final class NetworkInterfaceResourceSettings extends ResourceSettings { @JsonProperty(value = "enableAcceleratedNetworking") private Boolean enableAcceleratedNetworking; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the NetworkInterfaceResourceSettings object itself. + */ + public NetworkInterfaceResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the ipConfigurations property: Gets or sets the IP configurations of the NIC. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkSecurityGroupResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkSecurityGroupResourceSettings.java index 60eaa798cd78..2c84166bf284 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkSecurityGroupResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NetworkSecurityGroupResourceSettings.java @@ -5,19 +5,24 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; +import java.util.Map; /** Defines the NSG resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Network/networkSecurityGroups") @Fluent public final class NetworkSecurityGroupResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkSecurityGroupResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets Security rules of network security group. @@ -25,6 +30,26 @@ public final class NetworkSecurityGroupResourceSettings extends ResourceSettings @JsonProperty(value = "securityRules") private List securityRules; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the NetworkSecurityGroupResourceSettings object itself. + */ + public NetworkSecurityGroupResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the securityRules property: Gets or sets Security rules of network security group. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NicIpConfigurationResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NicIpConfigurationResourceSettings.java index b4393f0f9e09..385bcc145dae 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NicIpConfigurationResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NicIpConfigurationResourceSettings.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines NIC IP configuration properties. */ @Fluent public final class NicIpConfigurationResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NicIpConfigurationResourceSettings.class); - /* * Gets or sets the IP configuration name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgReference.java index 51c3fdc69a55..8c342055868f 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgReference.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines reference to NSG. */ -@Immutable +@Fluent public final class NsgReference extends AzureResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NsgReference.class); - /** {@inheritDoc} */ @Override public NsgReference withSourceArmResourceId(String sourceArmResourceId) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgSecurityRule.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgSecurityRule.java index 44eefcfe249d..7d35c32b00d4 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgSecurityRule.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgSecurityRule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Security Rule data model for Network Security Groups. */ @Fluent public final class NsgSecurityRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NsgSecurityRule.class); - /* * Gets or sets the Security rule name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationErrorAdditionalInfo.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationErrorAdditionalInfo.java index feec35ad11d2..c17ad3a89fda 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationErrorAdditionalInfo.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationErrorAdditionalInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The operation error info. */ @Immutable public final class OperationErrorAdditionalInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationErrorAdditionalInfo.class); - /* * The error type. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationStatusError.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationStatusError.java index a85742fdfca7..7197ff1b2713 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationStatusError.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationStatusError.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Class for operation status errors. */ @Immutable public final class OperationStatusError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusError.class); - /* * The error code. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscoveries.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscoveries.java index 1b6a95cc6d0e..453e78e10de0 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscoveries.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscoveries.java @@ -21,7 +21,7 @@ public interface OperationsDiscoveries { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of ClientDiscovery details. + * @return collection of ClientDiscovery details along with {@link Response}. */ Response getWithResponse(Context context); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscovery.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscovery.java index d720710b73c2..3cef88c435ba 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscovery.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/OperationsDiscovery.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operations discovery class. */ @Fluent public final class OperationsDiscovery { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDiscovery.class); - /* * Gets or sets Name of the API. * The name of the operation being performed on this particular object. It diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PrepareRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PrepareRequest.java index 7bcc840e5a32..e723e313ba02 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PrepareRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PrepareRequest.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the request body for initiate prepare operation. */ @Fluent public final class PrepareRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrepareRequest.class); - /* * Gets or sets a value indicating whether the operation needs to only run * pre-requisite. @@ -107,9 +104,11 @@ public PrepareRequest withMoveResourceInputType(MoveResourceInputType moveResour */ public void validate() { if (moveResources() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property moveResources in model PrepareRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrepareRequest.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ProxyResourceReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ProxyResourceReference.java index dc69c5eb41bf..d7a3a4183767 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ProxyResourceReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ProxyResourceReference.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines reference to a proxy resource. */ @Fluent public class ProxyResourceReference extends AzureResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ProxyResourceReference.class); - /* * Gets the name of the proxy resource on the target side. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpAddressResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpAddressResourceSettings.java index 695061e99311..a51937a277a8 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpAddressResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpAddressResourceSettings.java @@ -5,18 +5,23 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; /** Defines the public IP address resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Network/publicIPAddresses") @Fluent public final class PublicIpAddressResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicIpAddressResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets the domain name label. @@ -48,6 +53,26 @@ public final class PublicIpAddressResourceSettings extends ResourceSettings { @JsonProperty(value = "zones") private String zones; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the PublicIpAddressResourceSettings object itself. + */ + public PublicIpAddressResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the domainNameLabel property: Gets or sets the domain name label. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpReference.java index c22cc6ba70d6..a97a39326f4a 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpReference.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines reference to a public IP. */ -@Immutable +@Fluent public final class PublicIpReference extends AzureResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicIpReference.class); - /** {@inheritDoc} */ @Override public PublicIpReference withSourceArmResourceId(String sourceArmResourceId) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceGroupResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceGroupResourceSettings.java index ff320686adc6..f6f543c01d0f 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceGroupResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceGroupResourceSettings.java @@ -4,19 +4,15 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Defines the resource group resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("resourceGroups") -@Immutable +@Fluent public final class ResourceGroupResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGroupResourceSettings.class); - /** {@inheritDoc} */ @Override public ResourceGroupResourceSettings withTargetResourceName(String targetResourceName) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceMoveRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceMoveRequest.java index fb244202f569..b40f18326b64 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceMoveRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceMoveRequest.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Defines the request body for resource move operation. */ @Fluent public final class ResourceMoveRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMoveRequest.class); - /* * Gets or sets a value indicating whether the operation needs to only run * pre-requisite. @@ -107,10 +104,12 @@ public ResourceMoveRequest withMoveResourceInputType(MoveResourceInputType moveR */ public void validate() { if (moveResources() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property moveResources in model ResourceMoveRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceMoveRequest.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceSettings.java index 5dcdbf2b8358..6160d3e11711 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/ResourceSettings.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -38,8 +37,6 @@ }) @Fluent public class ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSettings.class); - /* * Gets or sets the target Resource name. */ @@ -73,10 +70,12 @@ public ResourceSettings withTargetResourceName(String targetResourceName) { */ public void validate() { if (targetResourceName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property targetResourceName in model ResourceSettings")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSettings.class); } diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlDatabaseResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlDatabaseResourceSettings.java index 1bbd6c6bed89..6e5af25b49f4 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlDatabaseResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlDatabaseResourceSettings.java @@ -5,18 +5,23 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; /** Defines the Sql Database resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Sql/servers/databases") @Fluent public final class SqlDatabaseResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlDatabaseResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Defines the zone redundant resource setting. @@ -24,6 +29,26 @@ public final class SqlDatabaseResourceSettings extends ResourceSettings { @JsonProperty(value = "zoneRedundant") private ZoneRedundant zoneRedundant; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the SqlDatabaseResourceSettings object itself. + */ + public SqlDatabaseResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the zoneRedundant property: Defines the zone redundant resource setting. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlElasticPoolResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlElasticPoolResourceSettings.java index aaa58cd95b74..8dc081462cb1 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlElasticPoolResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlElasticPoolResourceSettings.java @@ -5,18 +5,23 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; /** Defines the Sql ElasticPool resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Sql/servers/elasticPools") @Fluent public final class SqlElasticPoolResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlElasticPoolResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Defines the zone redundant resource setting. @@ -24,6 +29,26 @@ public final class SqlElasticPoolResourceSettings extends ResourceSettings { @JsonProperty(value = "zoneRedundant") private ZoneRedundant zoneRedundant; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the SqlElasticPoolResourceSettings object itself. + */ + public SqlElasticPoolResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the zoneRedundant property: Defines the zone redundant resource setting. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlServerResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlServerResourceSettings.java index 72b81fbb18fd..0b74a54f863f 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlServerResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SqlServerResourceSettings.java @@ -4,19 +4,15 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** Defines the SQL Server resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Sql/servers") -@Immutable +@Fluent public final class SqlServerResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlServerResourceSettings.class); - /** {@inheritDoc} */ @Override public SqlServerResourceSettings withTargetResourceName(String targetResourceName) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetReference.java index 354ed29e7ccd..6356309a5cae 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetReference.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetReference.java @@ -4,15 +4,11 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; /** Defines reference to subnet. */ -@Immutable +@Fluent public final class SubnetReference extends ProxyResourceReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubnetReference.class); - /** {@inheritDoc} */ @Override public SubnetReference withName(String name) { diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetResourceSettings.java index 82a8d8111c68..0b6150542980 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SubnetResourceSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Defines the virtual network subnets resource settings. */ @Fluent public final class SubnetResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SubnetResourceSettings.class); - /* * Gets or sets the Subnet name. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Summary.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Summary.java index aa091b2d614b..9095808ddc07 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Summary.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/Summary.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Summary item. */ @Fluent public final class Summary { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Summary.class); - /* * Gets the count. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SummaryCollection.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SummaryCollection.java index c753fdb4a492..e4449f481fca 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SummaryCollection.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/SummaryCollection.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Summary Collection. */ @Fluent public final class SummaryCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SummaryCollection.class); - /* * Gets or sets the field name on which summary is done. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencies.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencies.java index 591734575ba1..c1e7742db3ea 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencies.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencies.java @@ -17,7 +17,7 @@ public interface UnresolvedDependencies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ PagedIterable get(String resourceGroupName, String moveCollectionName); @@ -33,7 +33,7 @@ public interface UnresolvedDependencies { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of unresolved dependencies. + * @return a list of unresolved dependencies as paginated response with {@link PagedIterable}. */ PagedIterable get( String resourceGroupName, diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependenciesFilterProperties.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependenciesFilterProperties.java deleted file mode 100644 index 4a91f610dca8..000000000000 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependenciesFilterProperties.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcemover.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The UnresolvedDependenciesFilterProperties model. */ -@Fluent -public final class UnresolvedDependenciesFilterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnresolvedDependenciesFilterProperties.class); - - /* - * The count of the resource. - */ - @JsonProperty(value = "count") - private Integer count; - - /** - * Get the count property: The count of the resource. - * - * @return the count value. - */ - public Integer count() { - return this.count; - } - - /** - * Set the count property: The count of the resource. - * - * @param count the count value to set. - * @return the UnresolvedDependenciesFilterProperties object itself. - */ - public UnresolvedDependenciesFilterProperties withCount(Integer count) { - this.count = count; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencyCollection.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencyCollection.java index de892643db93..60954c00df9d 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencyCollection.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UnresolvedDependencyCollection.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Unresolved dependency collection. */ @Fluent public final class UnresolvedDependencyCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnresolvedDependencyCollection.class); - /* * Gets or sets the list of unresolved dependencies. */ diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UpdateMoveCollectionRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UpdateMoveCollectionRequest.java index 8fbd74e38120..2b6f1fcccc3e 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UpdateMoveCollectionRequest.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UpdateMoveCollectionRequest.java @@ -5,20 +5,18 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Defines the request body for updating move collection. */ @Fluent public final class UpdateMoveCollectionRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateMoveCollectionRequest.class); - /* * Gets or sets the Resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualMachineResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualMachineResourceSettings.java index 937850e27cd6..b906b8e7c058 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualMachineResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualMachineResourceSettings.java @@ -5,18 +5,30 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; /** Gets or sets the virtual machine resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Compute/virtualMachines") @Fluent public final class VirtualMachineResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Gets or sets user-managed identities + */ + @JsonProperty(value = "userManagedIdentities") + private List userManagedIdentities; /* * Gets or sets the target availability zone. @@ -37,6 +49,46 @@ public final class VirtualMachineResourceSettings extends ResourceSettings { @JsonProperty(value = "targetAvailabilitySetId") private String targetAvailabilitySetId; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the VirtualMachineResourceSettings object itself. + */ + public VirtualMachineResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the userManagedIdentities property: Gets or sets user-managed identities. + * + * @return the userManagedIdentities value. + */ + public List userManagedIdentities() { + return this.userManagedIdentities; + } + + /** + * Set the userManagedIdentities property: Gets or sets user-managed identities. + * + * @param userManagedIdentities the userManagedIdentities value to set. + * @return the VirtualMachineResourceSettings object itself. + */ + public VirtualMachineResourceSettings withUserManagedIdentities(List userManagedIdentities) { + this.userManagedIdentities = userManagedIdentities; + return this; + } + /** * Get the targetAvailabilityZone property: Gets or sets the target availability zone. * diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualNetworkResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualNetworkResourceSettings.java index 5d1ff9d9bf87..f658a456d600 100644 --- a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualNetworkResourceSettings.java +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/VirtualNetworkResourceSettings.java @@ -5,19 +5,24 @@ package com.azure.resourcemanager.resourcemover.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; +import java.util.Map; /** Defines the virtual network resource settings. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resourceType") @JsonTypeName("Microsoft.Network/virtualNetworks") @Fluent public final class VirtualNetworkResourceSettings extends ResourceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkResourceSettings.class); + /* + * Gets or sets the Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * Gets or sets a value indicating whether gets or sets whether the @@ -46,6 +51,26 @@ public final class VirtualNetworkResourceSettings extends ResourceSettings { @JsonProperty(value = "subnets") private List subnets; + /** + * Get the tags property: Gets or sets the Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Gets or sets the Resource tags. + * + * @param tags the tags value to set. + * @return the VirtualNetworkResourceSettings object itself. + */ + public VirtualNetworkResourceSettings withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the enableDdosProtection property: Gets or sets a value indicating whether gets or sets whether the DDOS * protection should be switched on. diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsBulkRemoveSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsBulkRemoveSamples.java new file mode 100644 index 000000000000..b1553fab66f0 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsBulkRemoveSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest; +import java.util.Arrays; + +/** Samples for MoveCollections BulkRemove. */ +public final class MoveCollectionsBulkRemoveSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_BulkRemove.json + */ + /** + * Sample code: MoveCollections_BulkRemove. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsBulkRemove(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .bulkRemove( + "rg1", + "movecollection1", + new BulkRemoveRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCommitSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCommitSamples.java new file mode 100644 index 000000000000..2a842dc47427 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCommitSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.CommitRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Commit. */ +public final class MoveCollectionsCommitSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Commit.json + */ + /** + * Sample code: MoveCollections_Commit. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsCommit(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .commit( + "rg1", + "movecollection1", + new CommitRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCreateSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCreateSamples.java new file mode 100644 index 000000000000..589d3ff1f2ce --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsCreateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.resourcemanager.resourcemover.models.Identity; +import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties; +import com.azure.resourcemanager.resourcemover.models.ResourceIdentityType; + +/** Samples for MoveCollections Create. */ +public final class MoveCollectionsCreateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Create.json + */ + /** + * Sample code: MoveCollections_Create. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsCreate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .define("movecollection1") + .withRegion("eastus2") + .withExistingResourceGroup("rg1") + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withProperties(new MoveCollectionProperties().withSourceRegion("eastus").withTargetRegion("westus")) + .create(); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDeleteSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDeleteSamples.java new file mode 100644 index 000000000000..b0d172d90d16 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections Delete. */ +public final class MoveCollectionsDeleteSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Delete.json + */ + /** + * Sample code: MoveCollections_Delete. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsDelete(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().delete("rg1", "movecollection1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDiscardSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDiscardSamples.java new file mode 100644 index 000000000000..85f8f97bb87b --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsDiscardSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.DiscardRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Discard. */ +public final class MoveCollectionsDiscardSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Discard.json + */ + /** + * Sample code: MoveCollections_Discard. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsDiscard(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .discard( + "rg1", + "movecollection1", + new DiscardRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsGetByResourceGroupSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..7c41e08a8623 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections GetByResourceGroup. */ +public final class MoveCollectionsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Get.json + */ + /** + * Sample code: MoveCollections_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().getByResourceGroupWithResponse("rg1", "movecollection1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsInitiateMoveSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsInitiateMoveSamples.java new file mode 100644 index 000000000000..32f74bf1ecd5 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsInitiateMoveSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest; +import java.util.Arrays; + +/** Samples for MoveCollections InitiateMove. */ +public final class MoveCollectionsInitiateMoveSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_InitiateMove.json + */ + /** + * Sample code: MoveCollections_InitiateMove. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsInitiateMove( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .initiateMove( + "rg1", + "movecollection1", + new ResourceMoveRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListByResourceGroupSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListByResourceGroupSamples.java new file mode 100644 index 000000000000..a58f344b1bf9 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections ListByResourceGroup. */ +public final class MoveCollectionsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ListMoveCollectionsByResourceGroup.json + */ + /** + * Sample code: MoveCollections_ListMoveCollectionsByResourceGroup. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsListMoveCollectionsByResourceGroup( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().listByResourceGroup("rg1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListRequiredForSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListRequiredForSamples.java new file mode 100644 index 000000000000..f93f11102335 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListRequiredForSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections ListRequiredFor. */ +public final class MoveCollectionsListRequiredForSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/RequiredFor_Get.json + */ + /** + * Sample code: RequiredFor_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void requiredForGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .listRequiredForWithResponse( + "rg1", + "movecollection1", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/nic1", + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListSamples.java new file mode 100644 index 000000000000..5ddf1a95a58e --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections List. */ +public final class MoveCollectionsListSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ListMoveCollectionsBySubscription.json + */ + /** + * Sample code: MoveCollections_ListMoveCollectionsBySubscription. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsListMoveCollectionsBySubscription( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().list(Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsPrepareSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsPrepareSamples.java new file mode 100644 index 000000000000..7e3627e55e87 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsPrepareSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.PrepareRequest; +import java.util.Arrays; + +/** Samples for MoveCollections Prepare. */ +public final class MoveCollectionsPrepareSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Prepare.json + */ + /** + * Sample code: MoveCollections_Prepare. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsPrepare(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveCollections() + .prepare( + "rg1", + "movecollection1", + new PrepareRequest() + .withValidateOnly(false) + .withMoveResources( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1")), + Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsResolveDependenciesSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsResolveDependenciesSamples.java new file mode 100644 index 000000000000..c7e9783fd03d --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsResolveDependenciesSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveCollections ResolveDependencies. */ +public final class MoveCollectionsResolveDependenciesSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_ResolveDependencies.json + */ + /** + * Sample code: MoveCollections_ResolveDependencies. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsResolveDependencies( + com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveCollections().resolveDependencies("rg1", "movecollection1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsUpdateSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsUpdateSamples.java new file mode 100644 index 000000000000..058f7aa7eef2 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveCollectionsUpdateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.resourcemover.models.Identity; +import com.azure.resourcemanager.resourcemover.models.MoveCollection; +import com.azure.resourcemanager.resourcemover.models.ResourceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** Samples for MoveCollections Update. */ +public final class MoveCollectionsUpdateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveCollections_Update.json + */ + /** + * Sample code: MoveCollections_Update. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveCollectionsUpdate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + MoveCollection resource = + manager.moveCollections().getByResourceGroupWithResponse("rg1", "movecollection1", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("key1", "mc1")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesCreateSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesCreateSamples.java new file mode 100644 index 000000000000..d05bb99af904 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesCreateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.resourcemanager.resourcemover.models.MoveResourceDependencyOverride; +import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties; +import com.azure.resourcemanager.resourcemover.models.TargetAvailabilityZone; +import com.azure.resourcemanager.resourcemover.models.VirtualMachineResourceSettings; +import java.util.Arrays; + +/** Samples for MoveResources Create. */ +public final class MoveResourcesCreateSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Create.json + */ + /** + * Sample code: MoveResources_Create. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesCreate(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager + .moveResources() + .define("moveresourcename1") + .withExistingMoveCollection("rg1", "movecollection1") + .withProperties( + new MoveResourceProperties() + .withSourceId( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/virtualMachines/eastusvm1") + .withResourceSettings( + new VirtualMachineResourceSettings() + .withTargetResourceName("westusvm1") + .withUserManagedIdentities( + Arrays + .asList( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi1")) + .withTargetAvailabilityZone(TargetAvailabilityZone.TWO) + .withTargetAvailabilitySetId( + "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/availabilitySets/avset1")) + .withDependsOnOverrides( + Arrays + .asList( + new MoveResourceDependencyOverride() + .withId( + "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140") + .withTargetId( + "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/westusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140")))) + .create(); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesDeleteSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesDeleteSamples.java new file mode 100644 index 000000000000..c7057f3a7fff --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveResources Delete. */ +public final class MoveResourcesDeleteSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Delete.json + */ + /** + * Sample code: MoveResources_Delete. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesDelete(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().delete("rg1", "movecollection1", "moveresourcename1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesGetSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesGetSamples.java new file mode 100644 index 000000000000..d285e48a5293 --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveResources Get. */ +public final class MoveResourcesGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_Get.json + */ + /** + * Sample code: MoveResources_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().getWithResponse("rg1", "movecollection1", "moveresourcename1", Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesListSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesListSamples.java new file mode 100644 index 000000000000..013f5422495b --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/MoveResourcesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for MoveResources List. */ +public final class MoveResourcesListSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/MoveResources_List.json + */ + /** + * Sample code: MoveResources_List. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void moveResourcesList(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.moveResources().list("rg1", "movecollection1", null, Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/OperationsDiscoveryGetSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/OperationsDiscoveryGetSamples.java new file mode 100644 index 000000000000..dc57b084f12c --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/OperationsDiscoveryGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for OperationsDiscovery Get. */ +public final class OperationsDiscoveryGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/OperationsDiscovery_Get.json + */ + /** + * Sample code: OperationsDiscovery_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void operationsDiscoveryGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.operationsDiscoveries().getWithResponse(Context.NONE); + } +} diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/UnresolvedDependenciesGetSamples.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/UnresolvedDependenciesGetSamples.java new file mode 100644 index 000000000000..4e22fa91da7b --- /dev/null +++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/samples/java/com/azure/resourcemanager/resourcemover/generated/UnresolvedDependenciesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcemover.generated; + +import com.azure.core.util.Context; + +/** Samples for UnresolvedDependencies Get. */ +public final class UnresolvedDependenciesGetSamples { + /* + * x-ms-original-file: specification/resourcemover/resource-manager/Microsoft.Migrate/stable/2021-08-01/examples/UnresolvedDependencies_Get.json + */ + /** + * Sample code: UnresolvedDependencies_Get. + * + * @param manager Entry point to ResourceMoverManager. + */ + public static void unresolvedDependenciesGet(com.azure.resourcemanager.resourcemover.ResourceMoverManager manager) { + manager.unresolvedDependencies().get("rg1", "movecollection1", null, null, null, Context.NONE); + } +}