diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md index 8cc9cdd85354..1806e197f7b6 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-01-20) +- 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 59a0fac1d021..bfe365f296ba 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.24.1 - - - com.azure - azure-core-management - 1.5.1 - - + + 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.24.1 + + + com.azure + azure-core-management + 1.5.1 + + 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..da4849f7e21d 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 @@ -92,6 +94,7 @@ public static final class Configurable { 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. * @@ -187,20 +201,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..11b414d4aed3 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 @@ -20,6 +20,7 @@ import com.azure.resourcemanager.resourcemover.models.PrepareRequest; import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest; import com.azure.resourcemanager.resourcemover.models.UpdateMoveCollectionRequest; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MoveCollectionsClient. */ public interface MoveCollectionsClient { @@ -46,7 +47,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 +76,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 +90,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName); @@ -104,9 +105,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, Context context); @@ -159,7 +160,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 +178,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body); @@ -196,9 +197,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginPrepare( String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context); @@ -266,9 +267,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body); @@ -285,9 +286,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginInitiateMove( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context); @@ -355,9 +356,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body); @@ -374,9 +375,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginCommit( String resourceGroupName, String moveCollectionName, CommitRequest body, Context context); @@ -444,9 +445,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body); @@ -463,9 +464,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDiscard( String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context); @@ -529,9 +530,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName); @@ -544,9 +545,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginResolveDependencies( String resourceGroupName, String moveCollectionName, Context context); @@ -588,9 +589,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body); @@ -606,9 +607,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginBulkRemove( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context); @@ -733,7 +734,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..7c9ff3a9d188 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 @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner; import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MoveResourcesClient. */ public interface MoveResourcesClient { @@ -56,9 +57,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body); @@ -73,9 +74,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, @@ -143,9 +144,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName); @@ -159,9 +160,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationStatusInner> beginDelete( String resourceGroupName, String moveCollectionName, String moveResourceName, Context context); @@ -219,7 +220,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/models/MoveCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java index be2a02a6a018..3708b50480b9 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,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.models.Identity; import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties; @@ -36,6 +37,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 +92,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..f9b26709f34d 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,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -22,6 +23,12 @@ public final class MoveResourceInner extends ProxyResource { @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 +49,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/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..8764a589d197 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 @@ -305,7 +305,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 +360,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 +411,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 +435,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 +477,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 +494,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 +549,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 +600,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 +624,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 +666,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 +682,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 +732,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 +778,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +791,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -803,9 +803,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +824,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +841,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +857,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 +875,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 +924,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 +974,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 +1020,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 +1059,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 +1079,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 +1137,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 +1191,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1204,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1220,9 +1220,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1246,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1267,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1287,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 +1308,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 +1331,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 +1412,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 +1470,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 +1524,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginInitiateMoveAsync( String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) { Mono>> mono = @@ -1538,7 +1538,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1554,9 +1554,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1580,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1601,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1621,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 +1642,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 +1665,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 +1747,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 +1805,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 +1859,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1872,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1888,9 +1888,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1914,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1935,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +1955,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 +1976,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 +1999,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 +2080,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 +2138,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 +2192,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2205,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2221,9 +2221,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2247,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2268,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2288,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 +2309,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 +2332,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 +2409,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 +2459,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 +2505,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginResolveDependenciesAsync( String resourceGroupName, String moveCollectionName) { Mono>> mono = @@ -2519,7 +2519,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2531,9 +2531,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2553,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2570,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2586,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 +2604,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 +2657,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 +2714,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 +2767,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginBulkRemoveAsync( String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) { Mono>> mono = @@ -2781,7 +2781,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2796,9 +2796,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2821,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2841,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +2860,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 +2880,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 +2902,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 +2974,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 +3021,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) { @@ -3118,7 +3120,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 +3173,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( @@ -3283,7 +3287,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 +3342,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 +3393,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 +3436,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 +3451,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 +3491,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 +3528,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 +3569,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/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..722b4e1e7cbe 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 @@ -154,7 +154,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 +217,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( @@ -367,7 +369,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 +430,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 +491,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +501,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 +519,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MoveResourceInner> beginCreateAsync( String resourceGroupName, String moveCollectionName, @@ -541,9 +547,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +566,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 defines the move resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MoveResourceInner> beginCreate( String resourceGroupName, String moveCollectionName, @@ -582,7 +588,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 +607,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 +629,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 +710,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 +766,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 +818,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationStatusInner> beginDeleteAsync( String resourceGroupName, String moveCollectionName, String moveResourceName) { Mono>> mono = @@ -826,7 +832,7 @@ private PollerFlux, OperationStatusInner> begin this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -839,9 +845,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +868,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +886,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 operation status REST resource along with {@link Response} on successful completion of {@link Mono}. */ - @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 +903,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 +923,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 +976,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 +1032,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 +1084,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 +1126,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 +1141,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 +1178,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/OperationsDiscoveriesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java index 0b58cf50d76e..43ffaf89d3d9 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 @@ -68,7 +68,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 +91,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 +110,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 +140,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/ResourceMoverServiceApiImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/ResourceMoverServiceApiImpl.java index 676fca431559..0b4838799f28 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 @@ -183,7 +183,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); 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..496b0ccf58b8 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 @@ -101,7 +101,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 +171,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( @@ -348,7 +350,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 +387,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/models/AvailabilitySetResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/AvailabilitySetResourceSettings.java index 60b8b6b5a5c2..646a92a8a54d 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 @@ -7,9 +7,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.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") @@ -18,6 +20,13 @@ 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 +39,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/DiskEncryptionSetResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/DiskEncryptionSetResourceSettings.java index 0cac83158a8f..df8a49c81280 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,7 +4,7 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,7 +13,7 @@ /** 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); 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..1f9160c126bf 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,7 +4,7 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,7 +13,7 @@ /** 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); 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..922d8ef08d85 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** 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); 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..d1c5130f5623 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines reference to load balancer NAT rules. */ -@Immutable +@Fluent public final class LoadBalancerNatRuleReference extends ProxyResourceReference { @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerNatRuleReference.class); 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..090fab91b167 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 @@ -7,10 +7,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.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") @@ -19,6 +21,13 @@ 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 +54,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/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/MoveCollectionPropertiesErrors.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveCollectionPropertiesErrors.java index 2b5a5fbda029..89ffcf984f36 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines the move collection errors. */ -@Immutable +@Fluent public final class MoveCollectionPropertiesErrors extends MoveResourceError { @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionPropertiesErrors.class); 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..4ee5d95eac10 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); @@ -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/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/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/MoveResourcePropertiesErrors.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/MoveResourcePropertiesErrors.java index 3835c0e0e6da..35350e736026 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines the move resource errors. */ -@Immutable +@Fluent public final class MoveResourcePropertiesErrors extends MoveResourceError { @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcePropertiesErrors.class); 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..771c805475e5 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines the move resource status. */ -@Immutable +@Fluent public final class MoveResourcePropertiesMoveStatus extends MoveResourceStatus { @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcePropertiesMoveStatus.class); 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..0012487c757d 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 @@ -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..8414f5281c96 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 @@ -7,10 +7,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.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") @@ -19,6 +21,13 @@ 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 +41,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..92502fb10bae 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 @@ -7,10 +7,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.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") @@ -19,12 +21,39 @@ 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. */ @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/NsgReference.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/NsgReference.java index 51c3fdc69a55..977a88a21bc9 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines reference to NSG. */ -@Immutable +@Fluent public final class NsgReference extends AzureResourceReference { @JsonIgnore private final ClientLogger logger = new ClientLogger(NsgReference.class); 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/PublicIpAddressResourceSettings.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/PublicIpAddressResourceSettings.java index 695061e99311..b4fa23a88217 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 @@ -7,9 +7,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.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") @@ -18,6 +20,13 @@ 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 +57,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..f2686760d029 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines reference to a public IP. */ -@Immutable +@Fluent public final class PublicIpReference extends AzureResourceReference { @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicIpReference.class); 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..412dc094f4ad 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,7 +4,7 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,7 +13,7 @@ /** 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); 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..4ee85d261b27 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 @@ -7,9 +7,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.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") @@ -18,12 +20,39 @@ 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. */ @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..665aa6acb15f 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 @@ -7,9 +7,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.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") @@ -18,12 +20,39 @@ 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. */ @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..ad7a4ef81137 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,7 +4,7 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,7 +13,7 @@ /** 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); 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..f1e6568f0c2d 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,12 +4,12 @@ package com.azure.resourcemanager.resourcemover.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; /** Defines reference to subnet. */ -@Immutable +@Fluent public final class SubnetReference extends ProxyResourceReference { @JsonIgnore private final ClientLogger logger = new ClientLogger(SubnetReference.class); 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/UpdateMoveCollectionRequest.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/models/UpdateMoveCollectionRequest.java index 8fbd74e38120..41dd20d53f52 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 @@ -7,6 +7,7 @@ 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; @@ -19,6 +20,7 @@ public final class UpdateMoveCollectionRequest { * 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..dc570cce15a8 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 @@ -7,9 +7,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.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") @@ -18,6 +21,19 @@ 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 +53,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..f9d44810cd1b 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 @@ -7,10 +7,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.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") @@ -19,6 +21,13 @@ 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 * DDOS protection should be switched on. @@ -46,6 +55,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); + } +}