diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md index 0d67a701cf8a1..72fc8dd927513 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-01-11) + +- Azure Resource Manager ContainerServiceFleet client library for Java. This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md index e96b8af0a86a1..8d03fef28c551 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerServiceFleet client library for Java. -This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-2023-10. 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 ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02. 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-containerservicefleet - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md index 10a99f8310185..4f71523fcf755 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md @@ -36,30 +36,26 @@ - [Delete](#updateruns_delete) - [Get](#updateruns_get) - [ListByFleet](#updateruns_listbyfleet) +- [Skip](#updateruns_skip) - [Start](#updateruns_start) - [Stop](#updateruns_stop) ### FleetMembers_Create ```java -/** Samples for FleetMembers Create. */ +/** + * Samples for FleetMembers Create. + */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Create.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void createsAFleetMemberResourceWithALongRunningOperation( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleetMembers() - .define("member-1") - .withExistingFleet("rg1", "fleet1") - .withClusterResourceId( - "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1") - .create(); + public static void createsAFleetMemberResourceWithALongRunningOperation(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetMembers().define("member-1").withExistingFleet("rg1", "fleet1").withClusterResourceId("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1").create(); } } ``` @@ -67,18 +63,19 @@ public final class FleetMembersCreateSamples { ### FleetMembers_Delete ```java -/** Samples for FleetMembers Delete. */ +/** + * Samples for FleetMembers Delete. + */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetMembers().delete("rg1", "fleet1", "member-1", null, com.azure.core.util.Context.NONE); } } @@ -87,18 +84,19 @@ public final class FleetMembersDeleteSamples { ### FleetMembers_Get ```java -/** Samples for FleetMembers Get. */ +/** + * Samples for FleetMembers Get. + */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAFleetMemberResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void getsAFleetMemberResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetMembers().getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE); } } @@ -107,18 +105,19 @@ public final class FleetMembersGetSamples { ### FleetMembers_ListByFleet ```java -/** Samples for FleetMembers ListByFleet. */ +/** + * Samples for FleetMembers ListByFleet. + */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheMembersOfAFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listsTheMembersOfAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetMembers().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } } @@ -129,23 +128,20 @@ public final class FleetMembersListByFleetSamples { ```java import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -/** Samples for FleetMembers Update. */ +/** + * Samples for FleetMembers Update. + */ public final class FleetMembersUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void updatesAFleetMemberResourceSynchronously( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - FleetMember resource = - manager - .fleetMembers() - .getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE) - .getValue(); + public static void updatesAFleetMemberResourceSynchronously(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + FleetMember resource = manager.fleetMembers().getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE).getValue(); resource.update().withGroup("staging").apply(); } } @@ -159,32 +155,20 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; import java.util.Arrays; -/** Samples for FleetUpdateStrategies CreateOrUpdate. */ +/** + * Samples for FleetUpdateStrategies CreateOrUpdate. + */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void createAFleetUpdateStrategy( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleetUpdateStrategies() - .define("strartegy1") - .withExistingFleet("rg1", "fleet1") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("stage1") - .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))) - .withAfterStageWaitInSeconds(3600)))) - .create(); + public static void createAFleetUpdateStrategy(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleetUpdateStrategies().define("strartegy1").withExistingFleet("rg1", "fleet1").withStrategy(new UpdateRunStrategy().withStages(Arrays.asList(new UpdateStage().withName("stage1").withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))).withAfterStageWaitInSeconds(3600)))).create(); } } ``` @@ -192,18 +176,19 @@ public final class FleetUpdateStrategiesCreateOrUpdateSamples { ### FleetUpdateStrategies_Delete ```java -/** Samples for FleetUpdateStrategies Delete. */ +/** + * Samples for FleetUpdateStrategies Delete. + */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void deleteAFleetUpdateStrategyResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void deleteAFleetUpdateStrategyResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetUpdateStrategies().delete("rg1", "fleet1", "strategy1", null, com.azure.core.util.Context.NONE); } } @@ -212,18 +197,19 @@ public final class FleetUpdateStrategiesDeleteSamples { ### FleetUpdateStrategies_Get ```java -/** Samples for FleetUpdateStrategies Get. */ +/** + * Samples for FleetUpdateStrategies Get. + */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getAFleetUpdateStrategyResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void getAFleetUpdateStrategyResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetUpdateStrategies().getWithResponse("rg1", "fleet1", "strategy1", com.azure.core.util.Context.NONE); } } @@ -232,18 +218,19 @@ public final class FleetUpdateStrategiesGetSamples { ### FleetUpdateStrategies_ListByFleet ```java -/** Samples for FleetUpdateStrategies ListByFleet. */ +/** + * Samples for FleetUpdateStrategies ListByFleet. + */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listTheFleetUpdateStrategyResourcesByFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listTheFleetUpdateStrategyResourcesByFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetUpdateStrategies().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } } @@ -255,25 +242,20 @@ public final class FleetUpdateStrategiesListByFleetSamples { import java.util.HashMap; import java.util.Map; -/** Samples for Fleets CreateOrUpdate. */ +/** + * Samples for Fleets CreateOrUpdate. + */ public final class FleetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void createsAFleetResourceWithALongRunningOperation( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleets() - .define("fleet1") - .withRegion("East US") - .withExistingResourceGroup("rg1") - .withTags(mapOf("archv2", "", "tier", "production")) - .create(); + public static void createsAFleetResourceWithALongRunningOperation(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.fleets().define("fleet1").withRegion("East US").withExistingResourceGroup("rg1").withTags(mapOf("archv2", "", "tier", "production")).create(); } // Use "Map.of" if available @@ -293,18 +275,19 @@ public final class FleetsCreateOrUpdateSamples { ### Fleets_Delete ```java -/** Samples for Fleets Delete. */ +/** + * Samples for Fleets Delete. + */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void deletesAFleetResourceAsynchronouslyWithALongRunningOperation( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void deletesAFleetResourceAsynchronouslyWithALongRunningOperation(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().delete("rg1", "fleet1", null, com.azure.core.util.Context.NONE); } } @@ -313,18 +296,19 @@ public final class FleetsDeleteSamples { ### Fleets_GetByResourceGroup ```java -/** Samples for Fleets GetByResourceGroup. */ +/** + * Samples for Fleets GetByResourceGroup. + */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAFleetResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void getsAFleetResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE); } } @@ -333,18 +317,19 @@ public final class FleetsGetByResourceGroupSamples { ### Fleets_List ```java -/** Samples for Fleets List. */ +/** + * Samples for Fleets List. + */ public final class FleetsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListBySub.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheFleetResourcesInASubscription( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listsTheFleetResourcesInASubscription(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().list(com.azure.core.util.Context.NONE); } } @@ -353,18 +338,19 @@ public final class FleetsListSamples { ### Fleets_ListByResourceGroup ```java -/** Samples for Fleets ListByResourceGroup. */ +/** + * Samples for Fleets ListByResourceGroup. + */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheFleetResourcesInAResourceGroup( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listsTheFleetResourcesInAResourceGroup(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } @@ -373,18 +359,19 @@ public final class FleetsListByResourceGroupSamples { ### Fleets_ListCredentials ```java -/** Samples for Fleets ListCredentials. */ +/** + * Samples for Fleets ListCredentials. + */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheUserCredentialsOfAFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listsTheUserCredentialsOfAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().listCredentialsWithResponse("rg1", "fleet", com.azure.core.util.Context.NONE); } } @@ -397,23 +384,20 @@ import com.azure.resourcemanager.containerservicefleet.models.Fleet; import java.util.HashMap; import java.util.Map; -/** Samples for Fleets Update. */ +/** + * Samples for Fleets Update. + */ public final class FleetsUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void updateAFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - Fleet resource = - manager - .fleets() - .getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE) - .getValue(); + public static void updateAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + Fleet resource = manager.fleets().getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); } @@ -434,18 +418,19 @@ public final class FleetsUpdateSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Operations_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/Operations_List.json */ /** * Sample code: List the operations for the provider. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listTheOperationsForTheProvider( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listTheOperationsForTheProvider(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -463,42 +448,22 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for UpdateRuns CreateOrUpdate. */ +/** + * Samples for UpdateRuns CreateOrUpdate. + */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void createAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .updateRuns() - .define("run1") - .withExistingFleet("rg1", "fleet1") - .withUpdateStrategyId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("stage1") - .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))) - .withAfterStageWaitInSeconds(3600)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("1.26.1")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))) - .create(); + public static void createAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.updateRuns().define("run1").withExistingFleet("rg1", "fleet1").withUpdateStrategyId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1").withStrategy(new UpdateRunStrategy().withStages(Arrays.asList(new UpdateStage().withName("stage1").withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))).withAfterStageWaitInSeconds(3600)))).withManagedClusterUpdate(new ManagedClusterUpdate().withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.FULL).withKubernetesVersion("1.26.1")).withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))).create(); } } ``` @@ -506,18 +471,19 @@ public final class UpdateRunsCreateOrUpdateSamples { ### UpdateRuns_Delete ```java -/** Samples for UpdateRuns Delete. */ +/** + * Samples for UpdateRuns Delete. + */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void deleteAnUpdateRunResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void deleteAnUpdateRunResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().delete("rg1", "fleet1", "run1", null, com.azure.core.util.Context.NONE); } } @@ -526,18 +492,19 @@ public final class UpdateRunsDeleteSamples { ### UpdateRuns_Get ```java -/** Samples for UpdateRuns Get. */ +/** + * Samples for UpdateRuns Get. + */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAnUpdateRunResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void getsAnUpdateRunResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().getWithResponse("rg1", "fleet1", "run1", com.azure.core.util.Context.NONE); } } @@ -546,38 +513,67 @@ public final class UpdateRunsGetSamples { ### UpdateRuns_ListByFleet ```java -/** Samples for UpdateRuns ListByFleet. */ +/** + * Samples for UpdateRuns ListByFleet. + */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheUpdateRunResourcesByFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void listsTheUpdateRunResourcesByFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } } ``` +### UpdateRuns_Skip + +```java +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; +import com.azure.resourcemanager.containerservicefleet.models.SkipRequest; +import com.azure.resourcemanager.containerservicefleet.models.TargetType; +import java.util.Arrays; +import java.util.stream.Collectors; + +/** + * Samples for UpdateRuns Skip. + */ +public final class UpdateRunsSkipSamples { + /* + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_Skip.json + */ + /** + * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void skipsOneOrMoreMemberGroupStageAfterStageWaitSOfAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.updateRuns().skipWithResponse("rg1", "fleet1", "run1", new SkipProperties().withTargets(Arrays.asList(new SkipRequest().withType(TargetType.MEMBER).withTarget("member-one"), new SkipRequest().withType(TargetType.AFTER_STAGE_WAIT).withTarget("stage1"))), null, com.azure.core.util.Context.NONE); + } +} +``` + ### UpdateRuns_Start ```java -/** Samples for UpdateRuns Start. */ +/** + * Samples for UpdateRuns Start. + */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void startsAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void startsAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().start("rg1", "fleet1", "run1", null, com.azure.core.util.Context.NONE); } } @@ -586,18 +582,19 @@ public final class UpdateRunsStartSamples { ### UpdateRuns_Stop ```java -/** Samples for UpdateRuns Stop. */ +/** + * Samples for UpdateRuns Stop. + */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/examples/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void stopsAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void stopsAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().stop("rg1", "fleet1", "run1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml index 82300ad09943d..6bd54835b6e78 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ContainerServiceFleet Management - This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager Client. Package tag package-2023-10. + This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager Client. Package tag package-preview-2024-02. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java index 2e22cecf46812..90e5ad1fc0302 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/ContainerServiceFleetManager.java @@ -42,7 +42,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ContainerServiceFleetManager. Azure Kubernetes Fleet Manager Client. */ +/** + * Entry point to ContainerServiceFleetManager. + * Azure Kubernetes Fleet Manager Client. + */ public final class ContainerServiceFleetManager { private Operations operations; @@ -56,22 +59,18 @@ public final class ContainerServiceFleetManager { private final ContainerServiceFleetManagementClient clientObject; - private ContainerServiceFleetManager( - HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private ContainerServiceFleetManager(HttpPipeline httpPipeline, AzureProfile profile, + Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ContainerServiceFleetManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new ContainerServiceFleetManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of ContainerServiceFleet service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the ContainerServiceFleet service API instance. @@ -84,7 +83,7 @@ public static ContainerServiceFleetManager authenticate(TokenCredential credenti /** * Creates an instance of ContainerServiceFleet service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the ContainerServiceFleet service API instance. @@ -97,14 +96,16 @@ public static ContainerServiceFleetManager authenticate(HttpPipeline httpPipelin /** * Gets a Configurable instance that can be used to create ContainerServiceFleetManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new ContainerServiceFleetManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -176,8 +177,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -194,8 +195,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -215,21 +216,12 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.containerservicefleet") - .append("/") - .append("1.0.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.containerservicefleet") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -248,38 +240,25 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + 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 - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + 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 = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new ContainerServiceFleetManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -291,7 +270,7 @@ public Operations operations() { /** * Gets the resource collection API of Fleets. It manages Fleet. - * + * * @return Resource collection API of Fleets. */ public Fleets fleets() { @@ -303,7 +282,7 @@ public Fleets fleets() { /** * Gets the resource collection API of FleetMembers. It manages FleetMember. - * + * * @return Resource collection API of FleetMembers. */ public FleetMembers fleetMembers() { @@ -315,7 +294,7 @@ public FleetMembers fleetMembers() { /** * Gets the resource collection API of UpdateRuns. It manages UpdateRun. - * + * * @return Resource collection API of UpdateRuns. */ public UpdateRuns updateRuns() { @@ -327,7 +306,7 @@ public UpdateRuns updateRuns() { /** * Gets the resource collection API of FleetUpdateStrategies. It manages FleetUpdateStrategy. - * + * * @return Resource collection API of FleetUpdateStrategies. */ public FleetUpdateStrategies fleetUpdateStrategies() { @@ -340,7 +319,7 @@ public FleetUpdateStrategies fleetUpdateStrategies() { /** * Gets wrapped service client ContainerServiceFleetManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. - * + * * @return Wrapped service client ContainerServiceFleetManagementClient. */ public ContainerServiceFleetManagementClient serviceClient() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java index d078a056ec217..fbc4010cd543f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java @@ -7,74 +7,76 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for ContainerServiceFleetManagementClient class. */ +/** + * The interface for ContainerServiceFleetManagementClient class. + */ public interface ContainerServiceFleetManagementClient { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the FleetsClient object to access its operations. - * + * * @return the FleetsClient object. */ FleetsClient getFleets(); /** * Gets the FleetMembersClient object to access its operations. - * + * * @return the FleetMembersClient object. */ FleetMembersClient getFleetMembers(); /** * Gets the UpdateRunsClient object to access its operations. - * + * * @return the UpdateRunsClient object. */ UpdateRunsClient getUpdateRuns(); /** * Gets the FleetUpdateStrategiesClient object to access its operations. - * + * * @return the FleetUpdateStrategiesClient object. */ FleetUpdateStrategiesClient getFleetUpdateStrategies(); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java index f63d744b178d3..b6a8be9d8ea59 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; -/** An instance of this class provides access to all the operations defined in FleetMembersClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetMembersClient. + */ public interface FleetMembersClient { /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,7 +33,7 @@ public interface FleetMembersClient { /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -45,7 +47,7 @@ public interface FleetMembersClient { /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -56,12 +58,12 @@ public interface FleetMembersClient { * @return a FleetMember along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String fleetName, String fleetMemberName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, + Context context); /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -75,7 +77,7 @@ Response getWithResponse( /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -86,12 +88,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginCreate( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource); + SyncPoller, FleetMemberInner> beginCreate(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberInner resource); /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -105,18 +107,12 @@ SyncPoller, FleetMemberInner> beginCreate( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginCreate( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + SyncPoller, FleetMemberInner> beginCreate(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -127,12 +123,12 @@ SyncPoller, FleetMemberInner> beginCreate( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner create( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource); + FleetMemberInner create(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource); /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -146,18 +142,12 @@ FleetMemberInner create( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner create( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + FleetMemberInner create(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -168,12 +158,12 @@ FleetMemberInner create( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginUpdate( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties); + SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberUpdate properties); /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -186,17 +176,12 @@ SyncPoller, FleetMemberInner> beginUpdate( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginUpdate( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context); + SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context); /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -207,12 +192,12 @@ SyncPoller, FleetMemberInner> beginUpdate( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner update( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties); + FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties); /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -225,17 +210,12 @@ FleetMemberInner update( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner update( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context); + FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties, String ifMatch, Context context); /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -249,7 +229,7 @@ FleetMemberInner update( /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -261,12 +241,12 @@ FleetMemberInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetMemberName, + String ifMatch, Context context); /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -279,7 +259,7 @@ SyncPoller, Void> beginDelete( /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java index b300330e42c0b..af5ac70c72615 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -/** An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. + */ public interface FleetUpdateStrategiesClient { /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface FleetUpdateStrategiesClient { /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -44,7 +46,7 @@ public interface FleetUpdateStrategiesClient { /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -55,12 +57,12 @@ public interface FleetUpdateStrategiesClient { * @return a FleetUpdateStrategy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String fleetName, String updateStrategyName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, + String updateStrategyName, Context context); /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -74,7 +76,7 @@ Response getWithResponse( /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -83,7 +85,7 @@ Response getWithResponse( * @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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate( @@ -91,7 +93,7 @@ SyncPoller, FleetUpdateStrategyInner> begin /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -103,21 +105,16 @@ SyncPoller, FleetUpdateStrategyInner> begin * @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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource, + String ifMatch, String ifNoneMatch, Context context); /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -128,12 +125,12 @@ SyncPoller, FleetUpdateStrategyInner> begin * @return defines a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetUpdateStrategyInner createOrUpdate( - String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource); + FleetUpdateStrategyInner createOrUpdate(String resourceGroupName, String fleetName, String updateStrategyName, + FleetUpdateStrategyInner resource); /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -147,18 +144,12 @@ FleetUpdateStrategyInner createOrUpdate( * @return defines a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetUpdateStrategyInner createOrUpdate( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + FleetUpdateStrategyInner createOrUpdate(String resourceGroupName, String fleetName, String updateStrategyName, + FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -168,12 +159,12 @@ FleetUpdateStrategyInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateStrategyName); + SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateStrategyName); /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -185,12 +176,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch, Context context); /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -203,7 +194,7 @@ SyncPoller, Void> beginDelete( /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java index 1a8a5cc3e72b0..d639b9d0c44b0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java @@ -15,11 +15,13 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; -/** An instance of this class provides access to all the operations defined in FleetsClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetsClient. + */ public interface FleetsClient { /** * Lists fleets in the specified subscription. - * + * * @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 response of a Fleet list operation as paginated response with {@link PagedIterable}. @@ -29,7 +31,7 @@ public interface FleetsClient { /** * Lists fleets in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,7 +43,7 @@ public interface FleetsClient { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -53,7 +55,7 @@ public interface FleetsClient { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,7 +68,7 @@ public interface FleetsClient { /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -80,7 +82,7 @@ public interface FleetsClient { /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,7 +95,7 @@ public interface FleetsClient { /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -103,12 +105,12 @@ public interface FleetsClient { * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginCreateOrUpdate( - String resourceGroupName, String fleetName, FleetInner resource); + SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName, + FleetInner resource); /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -121,17 +123,12 @@ SyncPoller, FleetInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -145,7 +142,7 @@ SyncPoller, FleetInner> beginCreateOrUpdate( /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -158,17 +155,12 @@ SyncPoller, FleetInner> beginCreateOrUpdate( * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner createOrUpdate( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, + String ifNoneMatch, Context context); /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -178,12 +170,12 @@ FleetInner createOrUpdate( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginUpdate( - String resourceGroupName, String fleetName, FleetPatch properties); + SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + FleetPatch properties); /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -195,12 +187,12 @@ SyncPoller, FleetInner> beginUpdate( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginUpdate( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); + SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch, Context context); /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -214,7 +206,7 @@ SyncPoller, FleetInner> beginUpdate( /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -226,12 +218,12 @@ SyncPoller, FleetInner> beginUpdate( * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner update( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); + FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, + Context context); /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,7 +236,7 @@ FleetInner update( /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -255,12 +247,12 @@ FleetInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String ifMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String ifMatch, + Context context); /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -272,7 +264,7 @@ SyncPoller, Void> beginDelete( /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -286,7 +278,7 @@ SyncPoller, Void> beginDelete( /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -296,12 +288,12 @@ SyncPoller, Void> beginDelete( * @return the Credential results response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listCredentialsWithResponse( - String resourceGroupName, String fleetName, Context context); + Response listCredentialsWithResponse(String resourceGroupName, String fleetName, + Context context); /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java index 49b4687b7b615..6803bb01e8f21 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * List the operations for the provider. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * List the operations for the provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java index 014b760e35b8d..d99d7eec830d5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java @@ -12,12 +12,15 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; -/** An instance of this class provides access to all the operations defined in UpdateRunsClient. */ +/** + * An instance of this class provides access to all the operations defined in UpdateRunsClient. + */ public interface UpdateRunsClient { /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +33,7 @@ public interface UpdateRunsClient { /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -44,7 +47,7 @@ public interface UpdateRunsClient { /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -55,12 +58,12 @@ public interface UpdateRunsClient { * @return a UpdateRun along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String fleetName, String updateRunName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, String updateRunName, + Context context); /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -74,7 +77,7 @@ Response getWithResponse( /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -83,15 +86,15 @@ Response getWithResponse( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginCreateOrUpdate( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource); + SyncPoller, UpdateRunInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource); /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -103,21 +106,16 @@ SyncPoller, UpdateRunInner> beginCreateOrUpdate( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, + SyncPoller, UpdateRunInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -128,12 +126,12 @@ SyncPoller, UpdateRunInner> beginCreateOrUpdate( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner createOrUpdate( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource); + UpdateRunInner createOrUpdate(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource); /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -147,18 +145,12 @@ UpdateRunInner createOrUpdate( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner createOrUpdate( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, - Context context); + UpdateRunInner createOrUpdate(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context); /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -172,7 +164,7 @@ UpdateRunInner createOrUpdate( /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -184,12 +176,12 @@ UpdateRunInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch, Context context); /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -202,7 +194,7 @@ SyncPoller, Void> beginDelete( /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -215,9 +207,42 @@ SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response skipWithResponse(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch, Context context); + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); + /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -225,15 +250,15 @@ SyncPoller, Void> beginDelete( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStart( - String resourceGroupName, String fleetName, String updateRunName); + SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName); /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -243,15 +268,15 @@ SyncPoller, UpdateRunInner> beginStart( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStart( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context); /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -265,7 +290,7 @@ SyncPoller, UpdateRunInner> beginStart( /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -277,12 +302,12 @@ SyncPoller, UpdateRunInner> beginStart( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner start( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context); /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -290,15 +315,15 @@ UpdateRunInner start( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStop( - String resourceGroupName, String fleetName, String updateRunName); + SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, + String updateRunName); /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -308,15 +333,15 @@ SyncPoller, UpdateRunInner> beginStop( * @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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStop( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context); /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -330,7 +355,7 @@ SyncPoller, UpdateRunInner> beginStop( /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -342,6 +367,6 @@ SyncPoller, UpdateRunInner> beginStop( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner stop( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java index 18206743527ff..3f8f6ffccd3a1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The Credential results response. */ +/** + * The Credential results response. + */ @Immutable public final class FleetCredentialResultsInner { /* @@ -18,13 +20,15 @@ public final class FleetCredentialResultsInner { @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY) private List kubeconfigs; - /** Creates an instance of FleetCredentialResultsInner class. */ + /** + * Creates an instance of FleetCredentialResultsInner class. + */ public FleetCredentialResultsInner() { } /** * Get the kubeconfigs property: Array of base64-encoded Kubernetes configuration files. - * + * * @return the kubeconfigs value. */ public List kubeconfigs() { @@ -33,7 +37,7 @@ public List kubeconfigs() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java index 837aa10b5b9ba..3333a16715e07 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The Fleet resource. */ +/** + * The Fleet resource. + */ @Fluent public final class FleetInner extends Resource { /* @@ -42,13 +44,15 @@ public final class FleetInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of FleetInner class. */ + /** + * Creates an instance of FleetInner class. + */ public FleetInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private FleetProperties innerProperties() { @@ -57,10 +61,10 @@ private FleetProperties innerProperties() { /** * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the - * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. - * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - * and If-Range (section 14.27) header fields. - * + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. + * * @return the etag value. */ public String etag() { @@ -69,7 +73,7 @@ public String etag() { /** * Get the identity property: Managed identity. - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -78,7 +82,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed identity. - * + * * @param identity the identity value to set. * @return the FleetInner object itself. */ @@ -89,21 +93,25 @@ public FleetInner withIdentity(ManagedServiceIdentity identity) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FleetInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public FleetInner withTags(Map tags) { super.withTags(tags); @@ -112,7 +120,7 @@ public FleetInner withTags(Map tags) { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public FleetProvisioningState provisioningState() { @@ -121,7 +129,7 @@ public FleetProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java index c71631cf03914..2ce3a02b79ac9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */ +/** + * A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. + */ @Fluent public final class FleetMemberInner extends ProxyResource { /* @@ -34,13 +36,15 @@ public final class FleetMemberInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of FleetMemberInner class. */ + /** + * Creates an instance of FleetMemberInner class. + */ public FleetMemberInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private FleetMemberProperties innerProperties() { @@ -49,10 +53,10 @@ private FleetMemberProperties innerProperties() { /** * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the - * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. - * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - * and If-Range (section 14.27) header fields. - * + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. + * * @return the etag value. */ public String etag() { @@ -61,7 +65,7 @@ public String etag() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -72,7 +76,7 @@ public SystemData systemData() { * Get the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid * Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. - * + * * @return the clusterResourceId value. */ public String clusterResourceId() { @@ -83,7 +87,7 @@ public String clusterResourceId() { * Set the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid * Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. - * + * * @param clusterResourceId the clusterResourceId value to set. * @return the FleetMemberInner object itself. */ @@ -97,7 +101,7 @@ public FleetMemberInner withClusterResourceId(String clusterResourceId) { /** * Get the group property: The group this member belongs to for multi-cluster update management. - * + * * @return the group value. */ public String group() { @@ -106,7 +110,7 @@ public String group() { /** * Set the group property: The group this member belongs to for multi-cluster update management. - * + * * @param group the group value to set. * @return the FleetMemberInner object itself. */ @@ -120,7 +124,7 @@ public FleetMemberInner withGroup(String group) { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public FleetMemberProvisioningState provisioningState() { @@ -129,7 +133,7 @@ public FleetMemberProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java index 1fe40bda2c31f..994d746314d03 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java @@ -9,12 +9,15 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */ +/** + * A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. + */ @Fluent public final class FleetMemberProperties { /* * The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/ + * managedClusters/{clusterName}'. */ @JsonProperty(value = "clusterResourceId", required = true) private String clusterResourceId; @@ -31,7 +34,9 @@ public final class FleetMemberProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private FleetMemberProvisioningState provisioningState; - /** Creates an instance of FleetMemberProperties class. */ + /** + * Creates an instance of FleetMemberProperties class. + */ public FleetMemberProperties() { } @@ -39,7 +44,7 @@ public FleetMemberProperties() { * Get the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid * Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. - * + * * @return the clusterResourceId value. */ public String clusterResourceId() { @@ -50,7 +55,7 @@ public String clusterResourceId() { * Set the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid * Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. - * + * * @param clusterResourceId the clusterResourceId value to set. * @return the FleetMemberProperties object itself. */ @@ -61,7 +66,7 @@ public FleetMemberProperties withClusterResourceId(String clusterResourceId) { /** * Get the group property: The group this member belongs to for multi-cluster update management. - * + * * @return the group value. */ public String group() { @@ -70,7 +75,7 @@ public String group() { /** * Set the group property: The group this member belongs to for multi-cluster update management. - * + * * @param group the group value to set. * @return the FleetMemberProperties object itself. */ @@ -81,7 +86,7 @@ public FleetMemberProperties withGroup(String group) { /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public FleetMemberProvisioningState provisioningState() { @@ -90,15 +95,13 @@ public FleetMemberProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (clusterResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clusterResourceId in model FleetMemberProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clusterResourceId in model FleetMemberProperties")); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java index c2d10155bba57..f99012df8e11f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The updatable properties of the FleetMember. */ +/** + * The updatable properties of the FleetMember. + */ @Fluent public final class FleetMemberUpdateProperties { /* @@ -16,13 +18,15 @@ public final class FleetMemberUpdateProperties { @JsonProperty(value = "group") private String group; - /** Creates an instance of FleetMemberUpdateProperties class. */ + /** + * Creates an instance of FleetMemberUpdateProperties class. + */ public FleetMemberUpdateProperties() { } /** * Get the group property: The group this member belongs to for multi-cluster update management. - * + * * @return the group value. */ public String group() { @@ -31,7 +35,7 @@ public String group() { /** * Set the group property: The group this member belongs to for multi-cluster update management. - * + * * @param group the group value to set. * @return the FleetMemberUpdateProperties object itself. */ @@ -42,7 +46,7 @@ public FleetMemberUpdateProperties withGroup(String group) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java index 01fa8291d3db8..d59ad7bab7a28 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Fleet properties. */ +/** + * Fleet properties. + */ @Immutable public final class FleetProperties { /* @@ -17,13 +19,15 @@ public final class FleetProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private FleetProvisioningState provisioningState; - /** Creates an instance of FleetProperties class. */ + /** + * Creates an instance of FleetProperties class. + */ public FleetProperties() { } /** * Get the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ public FleetProvisioningState provisioningState() { @@ -32,7 +36,7 @@ public FleetProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java index ecb0ff4966a51..ea686f942c63a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines a multi-stage process to perform update operations across members of a Fleet. */ +/** + * Defines a multi-stage process to perform update operations across members of a Fleet. + */ @Fluent public final class FleetUpdateStrategyInner extends ProxyResource { /* @@ -35,13 +37,15 @@ public final class FleetUpdateStrategyInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of FleetUpdateStrategyInner class. */ + /** + * Creates an instance of FleetUpdateStrategyInner class. + */ public FleetUpdateStrategyInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private FleetUpdateStrategyProperties innerProperties() { @@ -50,10 +54,10 @@ private FleetUpdateStrategyProperties innerProperties() { /** * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the - * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. - * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - * and If-Range (section 14.27) header fields. - * + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. + * * @return the etag value. */ public String etag() { @@ -62,7 +66,7 @@ public String etag() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -71,7 +75,7 @@ public SystemData systemData() { /** * Get the provisioningState property: The provisioning state of the UpdateStrategy resource. - * + * * @return the provisioningState value. */ public FleetUpdateStrategyProvisioningState provisioningState() { @@ -80,7 +84,7 @@ public FleetUpdateStrategyProvisioningState provisioningState() { /** * Get the strategy property: Defines the update sequence of the clusters. - * + * * @return the strategy value. */ public UpdateRunStrategy strategy() { @@ -89,7 +93,7 @@ public UpdateRunStrategy strategy() { /** * Set the strategy property: Defines the update sequence of the clusters. - * + * * @param strategy the strategy value to set. * @return the FleetUpdateStrategyInner object itself. */ @@ -103,7 +107,7 @@ public FleetUpdateStrategyInner withStrategy(UpdateRunStrategy strategy) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java index d96273b339759..f97b6e10c7cb3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of the UpdateStrategy. */ +/** + * The properties of the UpdateStrategy. + */ @Fluent public final class FleetUpdateStrategyProperties { /* @@ -25,13 +27,15 @@ public final class FleetUpdateStrategyProperties { @JsonProperty(value = "strategy", required = true) private UpdateRunStrategy strategy; - /** Creates an instance of FleetUpdateStrategyProperties class. */ + /** + * Creates an instance of FleetUpdateStrategyProperties class. + */ public FleetUpdateStrategyProperties() { } /** * Get the provisioningState property: The provisioning state of the UpdateStrategy resource. - * + * * @return the provisioningState value. */ public FleetUpdateStrategyProvisioningState provisioningState() { @@ -40,7 +44,7 @@ public FleetUpdateStrategyProvisioningState provisioningState() { /** * Get the strategy property: Defines the update sequence of the clusters. - * + * * @return the strategy value. */ public UpdateRunStrategy strategy() { @@ -49,7 +53,7 @@ public UpdateRunStrategy strategy() { /** * Set the strategy property: Defines the update sequence of the clusters. - * + * * @param strategy the strategy value to set. * @return the FleetUpdateStrategyProperties object itself. */ @@ -60,15 +64,13 @@ public FleetUpdateStrategyProperties withStrategy(UpdateRunStrategy strategy) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (strategy() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property strategy in model FleetUpdateStrategyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property strategy in model FleetUpdateStrategyProperties")); } else { strategy().validate(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java index c0c713aa7bbc6..7479bdd5a1922 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java @@ -12,8 +12,8 @@ /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { @@ -50,14 +50,16 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +118,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java index 91f51010c27b3..5c943ef61b17f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java @@ -13,7 +13,9 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.fasterxml.jackson.annotation.JsonProperty; -/** A multi-stage process to perform update operations across members of a Fleet. */ +/** + * A multi-stage process to perform update operations across members of a Fleet. + */ @Fluent public final class UpdateRunInner extends ProxyResource { /* @@ -37,13 +39,15 @@ public final class UpdateRunInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of UpdateRunInner class. */ + /** + * Creates an instance of UpdateRunInner class. + */ public UpdateRunInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private UpdateRunProperties innerProperties() { @@ -52,10 +56,10 @@ private UpdateRunProperties innerProperties() { /** * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the - * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. - * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), - * and If-Range (section 14.27) header fields. - * + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested + * resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + * (section 14.26), and If-Range (section 14.27) header fields. + * * @return the etag value. */ public String etag() { @@ -64,7 +68,7 @@ public String etag() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -73,7 +77,7 @@ public SystemData systemData() { /** * Get the provisioningState property: The provisioning state of the UpdateRun resource. - * + * * @return the provisioningState value. */ public UpdateRunProvisioningState provisioningState() { @@ -82,18 +86,20 @@ public UpdateRunProvisioningState provisioningState() { /** * Get the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in - * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since - * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both - * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and - * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not - * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" + * unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and + * store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + * * @return the updateStrategyId value. */ public String updateStrategyId() { @@ -102,18 +108,20 @@ public String updateStrategyId() { /** * Set the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in - * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since - * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both - * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and - * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not - * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" + * unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and + * store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + * * @param updateStrategyId the updateStrategyId value to set. * @return the UpdateRunInner object itself. */ @@ -126,10 +134,11 @@ public UpdateRunInner withUpdateStrategyId(String updateStrategyId) { } /** - * Get the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single - * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started. - * + * Get the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a + * single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. + * * @return the strategy value. */ public UpdateRunStrategy strategy() { @@ -137,10 +146,11 @@ public UpdateRunStrategy strategy() { } /** - * Set the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single - * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started. - * + * Set the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a + * single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. + * * @param strategy the strategy value to set. * @return the UpdateRunInner object itself. */ @@ -155,7 +165,7 @@ public UpdateRunInner withStrategy(UpdateRunStrategy strategy) { /** * Get the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The * managedClusterUpdate can be modified until the run is started. - * + * * @return the managedClusterUpdate value. */ public ManagedClusterUpdate managedClusterUpdate() { @@ -165,7 +175,7 @@ public ManagedClusterUpdate managedClusterUpdate() { /** * Set the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The * managedClusterUpdate can be modified until the run is started. - * + * * @param managedClusterUpdate the managedClusterUpdate value to set. * @return the UpdateRunInner object itself. */ @@ -179,7 +189,7 @@ public UpdateRunInner withManagedClusterUpdate(ManagedClusterUpdate managedClust /** * Get the status property: The status of the UpdateRun. - * + * * @return the status value. */ public UpdateRunStatus status() { @@ -188,7 +198,7 @@ public UpdateRunStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java index bdafc6dc98b67..af4711028450c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java @@ -12,7 +12,9 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of the UpdateRun. */ +/** + * The properties of the UpdateRun. + */ @Fluent public final class UpdateRunProperties { /* @@ -23,15 +25,15 @@ public final class UpdateRunProperties { /* * The resource id of the FleetUpdateStrategy resource to reference. - * + * * When creating a new run, there are three ways to define a strategy for the run: * 1. Define a new strategy in place: Set the "strategy" field. * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" * unset. (since 2023-08-15-preview) - * + * * Setting both "updateStrategyId" and "strategy" is invalid. - * + * * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and * store it in the "strategy" field. * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. @@ -62,13 +64,15 @@ public final class UpdateRunProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private UpdateRunStatus status; - /** Creates an instance of UpdateRunProperties class. */ + /** + * Creates an instance of UpdateRunProperties class. + */ public UpdateRunProperties() { } /** * Get the provisioningState property: The provisioning state of the UpdateRun resource. - * + * * @return the provisioningState value. */ public UpdateRunProvisioningState provisioningState() { @@ -77,18 +81,20 @@ public UpdateRunProvisioningState provisioningState() { /** * Get the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in - * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since - * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both - * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and - * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not - * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" + * unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and + * store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + * * @return the updateStrategyId value. */ public String updateStrategyId() { @@ -97,18 +103,20 @@ public String updateStrategyId() { /** * Set the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in - * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since - * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both - * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and - * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not - * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" + * unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and + * store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + * * @param updateStrategyId the updateStrategyId value to set. * @return the UpdateRunProperties object itself. */ @@ -118,10 +126,11 @@ public UpdateRunProperties withUpdateStrategyId(String updateStrategyId) { } /** - * Get the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single - * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started. - * + * Get the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a + * single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. + * * @return the strategy value. */ public UpdateRunStrategy strategy() { @@ -129,10 +138,11 @@ public UpdateRunStrategy strategy() { } /** - * Set the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single - * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started. - * + * Set the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a + * single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. + * * @param strategy the strategy value to set. * @return the UpdateRunProperties object itself. */ @@ -144,7 +154,7 @@ public UpdateRunProperties withStrategy(UpdateRunStrategy strategy) { /** * Get the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The * managedClusterUpdate can be modified until the run is started. - * + * * @return the managedClusterUpdate value. */ public ManagedClusterUpdate managedClusterUpdate() { @@ -154,7 +164,7 @@ public ManagedClusterUpdate managedClusterUpdate() { /** * Set the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The * managedClusterUpdate can be modified until the run is started. - * + * * @param managedClusterUpdate the managedClusterUpdate value to set. * @return the UpdateRunProperties object itself. */ @@ -165,7 +175,7 @@ public UpdateRunProperties withManagedClusterUpdate(ManagedClusterUpdate managed /** * Get the status property: The status of the UpdateRun. - * + * * @return the status value. */ public UpdateRunStatus status() { @@ -174,7 +184,7 @@ public UpdateRunStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -182,10 +192,8 @@ public void validate() { strategy().validate(); } if (managedClusterUpdate() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property managedClusterUpdate in model UpdateRunProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property managedClusterUpdate in model UpdateRunProperties")); } else { managedClusterUpdate().validate(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java index d5577476bd3ce..b607f24aa6631 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager - * Client. + * Package containing the inner data models for ContainerServiceFleetManagementClient. + * Azure Kubernetes Fleet Manager Client. */ package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java index 2717bb0f140bb..c3fd33604ffe5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager - * Client. + * Package containing the service clients for ContainerServiceFleetManagementClient. + * Azure Kubernetes Fleet Manager Client. */ package com.azure.resourcemanager.containerservicefleet.fluent; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java index c6c133263ee1c..5fd098c8f4d40 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the ContainerServiceFleetManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ContainerServiceFleetManagementClientImpl.class}) +/** + * A builder for creating a new instance of the ContainerServiceFleetManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ContainerServiceFleetManagementClientImpl.class }) public final class ContainerServiceFleetManagementClientBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class ContainerServiceFleetManagementClientBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -40,7 +42,7 @@ public ContainerServiceFleetManagementClientBuilder subscriptionId(String subscr /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -56,7 +58,7 @@ public ContainerServiceFleetManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -72,7 +74,7 @@ public ContainerServiceFleetManagementClientBuilder environment(AzureEnvironment /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -88,7 +90,7 @@ public ContainerServiceFleetManagementClientBuilder pipeline(HttpPipeline pipeli /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -104,7 +106,7 @@ public ContainerServiceFleetManagementClientBuilder defaultPollInterval(Duration /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the ContainerServiceFleetManagementClientBuilder. */ @@ -115,30 +117,20 @@ public ContainerServiceFleetManagementClientBuilder serializerAdapter(Serializer /** * Builds an instance of ContainerServiceFleetManagementClientImpl with the provided parameters. - * + * * @return an instance of ContainerServiceFleetManagementClientImpl. */ public ContainerServiceFleetManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ContainerServiceFleetManagementClientImpl client = - new ContainerServiceFleetManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerServiceFleetManagementClientImpl client = new ContainerServiceFleetManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java index f339bc016a73e..46e2bca78ff90 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java @@ -37,135 +37,159 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the ContainerServiceFleetManagementClientImpl type. */ +/** + * Initializes a new instance of the ContainerServiceFleetManagementClientImpl type. + */ @ServiceClient(builder = ContainerServiceFleetManagementClientBuilder.class) public final class ContainerServiceFleetManagementClientImpl implements ContainerServiceFleetManagementClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The FleetsClient object to access its operations. */ + /** + * The FleetsClient object to access its operations. + */ private final FleetsClient fleets; /** * Gets the FleetsClient object to access its operations. - * + * * @return the FleetsClient object. */ public FleetsClient getFleets() { return this.fleets; } - /** The FleetMembersClient object to access its operations. */ + /** + * The FleetMembersClient object to access its operations. + */ private final FleetMembersClient fleetMembers; /** * Gets the FleetMembersClient object to access its operations. - * + * * @return the FleetMembersClient object. */ public FleetMembersClient getFleetMembers() { return this.fleetMembers; } - /** The UpdateRunsClient object to access its operations. */ + /** + * The UpdateRunsClient object to access its operations. + */ private final UpdateRunsClient updateRuns; /** * Gets the UpdateRunsClient object to access its operations. - * + * * @return the UpdateRunsClient object. */ public UpdateRunsClient getUpdateRuns() { return this.updateRuns; } - /** The FleetUpdateStrategiesClient object to access its operations. */ + /** + * The FleetUpdateStrategiesClient object to access its operations. + */ private final FleetUpdateStrategiesClient fleetUpdateStrategies; /** * Gets the FleetUpdateStrategiesClient object to access its operations. - * + * * @return the FleetUpdateStrategiesClient object. */ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { @@ -174,7 +198,7 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { /** * Initializes an instance of ContainerServiceFleetManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -182,19 +206,14 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - ContainerServiceFleetManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + ContainerServiceFleetManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-10-15"; + this.apiVersion = "2024-02-02-preview"; this.operations = new OperationsClientImpl(this); this.fleets = new FleetsClientImpl(this); this.fleetMembers = new FleetMembersClientImpl(this); @@ -204,7 +223,7 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -213,7 +232,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -223,7 +242,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -233,26 +252,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -265,19 +273,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java index c04c0e7651c66..41fbd0adabdb2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java @@ -15,8 +15,7 @@ public final class FleetCredentialResultsImpl implements FleetCredentialResults private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - FleetCredentialResultsImpl( - FleetCredentialResultsInner innerObject, + FleetCredentialResultsImpl(FleetCredentialResultsInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java index 7f855d798b6ac..71d7d64670dee 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java @@ -101,27 +101,19 @@ public FleetImpl withExistingResourceGroup(String resourceGroupName) { } public Fleet create() { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .createOrUpdate( - resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleets().createOrUpdate(resourceGroupName, fleetName, + this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); return this; } public Fleet create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .createOrUpdate( - resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, context); + this.innerObject = serviceManager.serviceClient().getFleets().createOrUpdate(resourceGroupName, fleetName, + this.innerModel(), createIfMatch, createIfNoneMatch, context); return this; } - FleetImpl( - String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + FleetImpl(String name, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = new FleetInner(); this.serviceManager = serviceManager; this.fleetName = name; @@ -136,25 +128,18 @@ public FleetImpl update() { } public Fleet apply() { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleets().update(resourceGroupName, fleetName, + updateProperties, updateIfMatch, Context.NONE); return this; } public Fleet apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, context); + this.innerObject = serviceManager.serviceClient().getFleets().update(resourceGroupName, fleetName, + updateProperties, updateIfMatch, context); return this; } - FleetImpl( - FleetInner innerObject, + FleetImpl(FleetInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -163,22 +148,14 @@ public Fleet apply(Context context) { } public Fleet refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleets() + .getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE).getValue(); return this; } public Fleet refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleets() - .getByResourceGroupWithResponse(resourceGroupName, fleetName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleets() + .getByResourceGroupWithResponse(resourceGroupName, fleetName, context).getValue(); return this; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java index e0af292a07ba3..62f87fb236b5d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java @@ -81,39 +81,19 @@ public FleetMemberImpl withExistingFleet(String resourceGroupName, String fleetN } public FleetMember create() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .create( - resourceGroupName, - fleetName, - fleetMemberName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleetMembers().create(resourceGroupName, fleetName, + fleetMemberName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); return this; } public FleetMember create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .create( - resourceGroupName, - fleetName, - fleetMemberName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - context); + this.innerObject = serviceManager.serviceClient().getFleetMembers().create(resourceGroupName, fleetName, + fleetMemberName, this.innerModel(), createIfMatch, createIfNoneMatch, context); return this; } - FleetMemberImpl( - String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + FleetMemberImpl(String name, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = new FleetMemberInner(); this.serviceManager = serviceManager; this.fleetMemberName = name; @@ -128,25 +108,18 @@ public FleetMemberImpl update() { } public FleetMember apply() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleetMembers().update(resourceGroupName, fleetName, + fleetMemberName, updateProperties, updateIfMatch, Context.NONE); return this; } public FleetMember apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context); + this.innerObject = serviceManager.serviceClient().getFleetMembers().update(resourceGroupName, fleetName, + fleetMemberName, updateProperties, updateIfMatch, context); return this; } - FleetMemberImpl( - FleetMemberInner innerObject, + FleetMemberImpl(FleetMemberInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -156,22 +129,14 @@ public FleetMember apply(Context context) { } public FleetMember refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleetMembers() + .getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE).getValue(); return this; } public FleetMember refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetMembers() - .getWithResponse(resourceGroupName, fleetName, fleetMemberName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleetMembers() + .getWithResponse(resourceGroupName, fleetName, fleetMemberName, context).getValue(); return this; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java index 6761e079572ce..7ec41dcbe5d0a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FleetMembersClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetMembersClient. + */ public final class FleetMembersClientImpl implements FleetMembersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FleetMembersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerServiceFleetManagementClientImpl client; /** * Initializes an instance of FleetMembersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FleetMembersClientImpl(ContainerServiceFleetManagementClientImpl client) { - this.service = - RestProxy.create(FleetMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(FleetMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,122 +72,88 @@ public final class FleetMembersClientImpl implements FleetMembersClient { @Host("{$host}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetMembersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByFleet(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @PathParam("fleetMemberName") String fleetMemberName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @PathParam("fleetMemberName") String fleetMemberName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @PathParam("fleetName") String fleetName, + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, - @BodyParam("application/json") FleetMemberInner resource, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetMemberInner resource, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("fleetMemberName") String fleetMemberName, - @BodyParam("application/json") FleetMemberUpdate properties, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, + @BodyParam("application/json") FleetMemberUpdate properties, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("fleetMemberName") String fleetMemberName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @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 response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync( - String resourceGroupName, String fleetName) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -192,32 +164,16 @@ private Mono> listByFleetSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -225,22 +181,18 @@ private Mono> listByFleetSinglePageAsync( * @throws 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 response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync( - String resourceGroupName, String fleetName, Context context) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -252,28 +204,15 @@ private Mono> listByFleetSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,14 +222,13 @@ private Mono> listByFleetSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), nextLink -> listByFleetNextSinglePageAsync(nextLink)); } /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -301,14 +239,13 @@ private PagedFlux listByFleetAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); } /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,7 +260,7 @@ public PagedIterable listByFleet(String resourceGroupName, Str /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -339,7 +276,7 @@ public PagedIterable listByFleet(String resourceGroupName, Str /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -349,19 +286,15 @@ public PagedIterable listByFleet(String resourceGroupName, Str * @return a FleetMember along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String fleetMemberName) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -376,24 +309,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - fleetMemberName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetMemberName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -404,19 +327,15 @@ private Mono> getWithResponseAsync( * @return a FleetMember along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String fleetMemberName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -431,21 +350,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - fleetMemberName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, fleetMemberName, accept, context); } /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -462,7 +373,7 @@ private Mono getAsync(String resourceGroupName, String fleetNa /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -473,14 +384,14 @@ private Mono getAsync(String resourceGroupName, String fleetNa * @return a FleetMember along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String fleetName, String fleetMemberName, Context context) { + public Response getWithResponse(String resourceGroupName, String fleetName, + String fleetMemberName, Context context) { return getWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, context).block(); } /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -496,7 +407,7 @@ public FleetMemberInner get(String resourceGroupName, String fleetName, String f /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -509,24 +420,15 @@ public FleetMemberInner get(String resourceGroupName, String fleetName, String f * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch) { + private Mono>> createWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -546,27 +448,15 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - fleetMemberName, - resource, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, fleetMemberName, + resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -580,25 +470,15 @@ private Mono>> createWithResponseAsync( * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -618,24 +498,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - fleetMemberName, - resource, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, ifNoneMatch, fleetName, fleetMemberName, resource, accept, context); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -648,28 +517,17 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginCreateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetMemberInner.class, - FleetMemberInner.class, - this.client.getContext()); + private PollerFlux, FleetMemberInner> beginCreateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -680,25 +538,19 @@ private PollerFlux, FleetMemberInner> beginCreateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginCreateAsync( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) { + private PollerFlux, FleetMemberInner> beginCreateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = - createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetMemberInner.class, - FleetMemberInner.class, - this.client.getContext()); + Mono>> mono + = createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -712,27 +564,19 @@ private PollerFlux, FleetMemberInner> beginCreateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginCreateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, + private PollerFlux, FleetMemberInner> beginCreateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync( - resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, context); + Mono>> mono = createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, + resource, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, context); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -743,18 +587,17 @@ private PollerFlux, FleetMemberInner> beginCreateAs * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginCreate( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) { + public SyncPoller, FleetMemberInner> beginCreate(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return this - .beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch) + return this.beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch) .getSyncPoller(); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -768,13 +611,8 @@ public SyncPoller, FleetMemberInner> beginCreate( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginCreate( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, + public SyncPoller, FleetMemberInner> beginCreate(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context) { return this .beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context) @@ -783,7 +621,7 @@ public SyncPoller, FleetMemberInner> beginCreate( /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -796,21 +634,15 @@ public SyncPoller, FleetMemberInner> beginCreate( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch) { - return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch) - .last() + private Mono createAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource, String ifMatch, String ifNoneMatch) { + return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -821,18 +653,17 @@ private Mono createAsync( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) { + private Mono createAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch) - .last() + return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -846,22 +677,15 @@ private Mono createAsync( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + private Mono createAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context) { return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -872,8 +696,8 @@ private Mono createAsync( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner create( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) { + public FleetMemberInner create(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource) { final String ifMatch = null; final String ifNoneMatch = null; return createAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch).block(); @@ -881,7 +705,7 @@ public FleetMemberInner create( /** * Create a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -895,21 +719,15 @@ public FleetMemberInner create( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner create( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + public FleetMemberInner create(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner resource, String ifMatch, String ifNoneMatch, Context context) { return createAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context) .block(); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -921,23 +739,15 @@ public FleetMemberInner create( * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberUpdate properties, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -957,26 +767,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - fleetMemberName, - properties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, fleetMemberName, properties, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -989,24 +788,15 @@ private Mono>> updateWithResponseAsync( * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1026,23 +816,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - fleetMemberName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, fleetMemberName, properties, accept, context); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1054,27 +834,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetMemberInner.class, - FleetMemberInner.class, - this.client.getContext()); + private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1085,24 +855,18 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { + private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetMemberInner.class, - FleetMemberInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1115,25 +879,18 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context) { + private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + FleetMemberInner.class, FleetMemberInner.class, context); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1144,17 +901,16 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginUpdate( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { + public SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return this - .beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) + return this.beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) .getSyncPoller(); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1167,21 +923,15 @@ public SyncPoller, FleetMemberInner> beginUpdate( * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginUpdate( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) + public SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { + return this.beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) .getSyncPoller(); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1193,20 +943,15 @@ public SyncPoller, FleetMemberInner> beginUpdate( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch) { - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) - .last() + private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties, String ifMatch) { + return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1217,17 +962,16 @@ private Mono updateAsync( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { + private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties) { final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) - .last() + return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1240,21 +984,15 @@ private Mono updateAsync( * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context) { - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) - .last() + private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties, String ifMatch, Context context) { + return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1265,15 +1003,15 @@ private Mono updateAsync( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner update( - String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { + public FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties) { final String ifMatch = null; return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).block(); } /** * Update a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1286,19 +1024,14 @@ public FleetMemberInner update( * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner update( - String resourceGroupName, - String fleetName, - String fleetMemberName, - FleetMemberUpdate properties, - String ifMatch, - Context context) { + public FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberUpdate properties, String ifMatch, Context context) { return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).block(); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1309,19 +1042,15 @@ public FleetMemberInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1335,26 +1064,14 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter fleetMemberName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - fleetMemberName, - accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, fleetMemberName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1366,19 +1083,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String fleetMemberName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1393,22 +1106,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - fleetMemberName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, fleetMemberName, accept, context); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1419,19 +1123,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String fleetMemberName, String ifMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1441,20 +1143,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String fleetMemberName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String fleetMemberName) { final String ifMatch = null; - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1466,19 +1166,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String fleetMemberName, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1488,15 +1187,15 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String fleetMemberName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String fleetMemberName) { final String ifMatch = null; return this.beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch).getSyncPoller(); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1508,14 +1207,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String fleetMemberName, String ifMatch, Context context) { return this.beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context).getSyncPoller(); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1527,14 +1226,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1546,14 +1244,13 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetMemberName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1565,16 +1262,15 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context) - .last() + private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, + Context context) { + return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1590,7 +1286,7 @@ public void delete(String resourceGroupName, String fleetName, String fleetMembe /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -1601,21 +1297,22 @@ public void delete(String resourceGroupName, String fleetName, String fleetMembe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, + Context context) { deleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetNextSinglePageAsync(String nextLink) { @@ -1623,37 +1320,29 @@ private Mono> listByFleetNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetNextSinglePageAsync(String nextLink, Context context) { @@ -1661,23 +1350,13 @@ private Mono> listByFleetNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java index 0ff47c31b12da..33b7aa66536ff 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java @@ -21,8 +21,7 @@ public final class FleetMembersImpl implements FleetMembers { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - public FleetMembersImpl( - FleetMembersClient innerClient, + public FleetMembersImpl(FleetMembersClient innerClient, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -38,15 +37,12 @@ public PagedIterable listByFleet(String resourceGroupName, String f return Utils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String fleetName, String fleetMemberName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, fleetName, fleetMemberName, context); + public Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, fleetName, fleetMemberName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FleetMemberImpl(inner.getValue(), this.manager())); } else { return null; @@ -66,33 +62,26 @@ public void delete(String resourceGroupName, String fleetName, String fleetMembe this.serviceClient().delete(resourceGroupName, fleetName, fleetMemberName); } - public void delete( - String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, + Context context) { this.serviceClient().delete(resourceGroupName, fleetName, fleetMemberName, ifMatch, context); } public FleetMember getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String fleetMemberName = Utils.getValueFromIdByName(id, "members"); if (fleetMemberName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE).getValue(); } @@ -100,25 +89,18 @@ public FleetMember getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String fleetMemberName = Utils.getValueFromIdByName(id, "members"); if (fleetMemberName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, fleetMemberName, context); } @@ -126,25 +108,18 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String fleetMemberName = Utils.getValueFromIdByName(id, "members"); if (fleetMemberName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); } String localIfMatch = null; this.delete(resourceGroupName, fleetName, fleetMemberName, localIfMatch, Context.NONE); @@ -153,25 +128,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, String ifMatch, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String fleetMemberName = Utils.getValueFromIdByName(id, "members"); if (fleetMemberName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id))); } this.delete(resourceGroupName, fleetName, fleetMemberName, ifMatch, context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java index 6fa960d9abfc8..b98e4f2e3cde4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java @@ -38,132 +38,109 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. + */ public final class FleetUpdateStrategiesClientImpl implements FleetUpdateStrategiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FleetUpdateStrategiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerServiceFleetManagementClientImpl client; /** * Initializes an instance of FleetUpdateStrategiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FleetUpdateStrategiesClientImpl(ContainerServiceFleetManagementClientImpl client) { - this.service = - RestProxy - .create(FleetUpdateStrategiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(FleetUpdateStrategiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerServiceFleetManagementClientFleetUpdateStrategies to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for ContainerServiceFleetManagementClientFleetUpdateStrategies to be + * used by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetUpdateStrategiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByFleet(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @PathParam("updateStrategyName") String updateStrategyName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @PathParam("updateStrategyName") String updateStrategyName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @PathParam("fleetName") String fleetName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, @PathParam("updateStrategyName") String updateStrategyName, - @BodyParam("application/json") FleetUpdateStrategyInner resource, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetUpdateStrategyInner resource, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("updateStrategyName") String updateStrategyName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateStrategyName") String updateStrategyName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync( - String resourceGroupName, String fleetName) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,32 +151,16 @@ private Mono> listByFleetSinglePageAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -207,22 +168,18 @@ private Mono> listByFleetSinglePageAsync * @throws 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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync( - String resourceGroupName, String fleetName, Context context) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -234,28 +191,15 @@ private Mono> listByFleetSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,14 +209,13 @@ private Mono> listByFleetSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), nextLink -> listByFleetNextSinglePageAsync(nextLink)); } /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -282,16 +225,15 @@ private PagedFlux listByFleetAsync(String resourceGrou * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync( - String resourceGroupName, String fleetName, Context context) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, + Context context) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); } /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -306,7 +248,7 @@ public PagedIterable listByFleet(String resourceGroupN /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -316,14 +258,14 @@ public PagedIterable listByFleet(String resourceGroupN * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet( - String resourceGroupName, String fleetName, Context context) { + public PagedIterable listByFleet(String resourceGroupName, String fleetName, + Context context) { return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); } /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -333,19 +275,15 @@ public PagedIterable listByFleet( * @return a FleetUpdateStrategy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String updateStrategyName) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -360,24 +298,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - updateStrategyName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, updateStrategyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -388,19 +316,15 @@ private Mono> getWithResponseAsync( * @return a FleetUpdateStrategy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String updateStrategyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,21 +339,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - updateStrategyName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, updateStrategyName, accept, context); } /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -439,15 +355,15 @@ private Mono> getWithResponseAsync( * @return a FleetUpdateStrategy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String fleetName, String updateStrategyName) { + private Mono getAsync(String resourceGroupName, String fleetName, + String updateStrategyName) { return getWithResponseAsync(resourceGroupName, fleetName, updateStrategyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -458,14 +374,14 @@ private Mono getAsync( * @return a FleetUpdateStrategy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String fleetName, String updateStrategyName, Context context) { + public Response getWithResponse(String resourceGroupName, String fleetName, + String updateStrategyName, Context context) { return getWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, context).block(); } /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -481,7 +397,7 @@ public FleetUpdateStrategyInner get(String resourceGroupName, String fleetName, /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -491,28 +407,19 @@ public FleetUpdateStrategyInner get(String resourceGroupName, String fleetName, * @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 a multi-stage process to perform update operations across members of a Fleet along with {@link - * Response} on successful completion of {@link Mono}. + * @return defines a multi-stage process to perform update operations across members of a Fleet along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -532,27 +439,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - updateStrategyName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateStrategyName, + resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -563,29 +458,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 a multi-stage process to perform update operations across members of a Fleet along with {@link - * Response} on successful completion of {@link Mono}. + * @return defines a multi-stage process to perform update operations across members of a Fleet along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -605,24 +491,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - updateStrategyName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateStrategyName, + resource, accept, context); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -633,32 +509,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws 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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetUpdateStrategyInner.class, - FleetUpdateStrategyInner.class, - this.client.getContext()); + String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource, + String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateStrategyName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FleetUpdateStrategyInner.class, FleetUpdateStrategyInner.class, + this.client.getContext()); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -667,29 +533,23 @@ private PollerFlux, FleetUpdateStrategyInne * @throws 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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync( String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetUpdateStrategyInner.class, - FleetUpdateStrategyInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateStrategyName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FleetUpdateStrategyInner.class, FleetUpdateStrategyInner.class, + this.client.getContext()); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -701,34 +561,22 @@ private PollerFlux, FleetUpdateStrategyInne * @throws 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 {@link PollerFlux} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FleetUpdateStrategyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource, + String ifMatch, String ifNoneMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FleetUpdateStrategyInner.class, - FleetUpdateStrategyInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateStrategyName, resource, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FleetUpdateStrategyInner.class, FleetUpdateStrategyInner.class, context); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -737,7 +585,7 @@ private PollerFlux, FleetUpdateStrategyInne * @throws 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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate( @@ -751,7 +599,7 @@ public SyncPoller, FleetUpdateStrategyInner /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -763,26 +611,19 @@ public SyncPoller, FleetUpdateStrategyInner * @throws 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 {@link SyncPoller} for polling of defines a multi-stage process to perform update operations across - * members of a Fleet. + * members of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FleetUpdateStrategyInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context) - .getSyncPoller(); + String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource, + String ifMatch, String ifNoneMatch, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, + ifNoneMatch, context).getSyncPoller(); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -793,25 +634,18 @@ public SyncPoller, FleetUpdateStrategyInner * @throws 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 a multi-stage process to perform update operations across members of a Fleet on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch) { - return beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -820,22 +654,20 @@ private Mono createOrUpdateAsync( * @throws 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 a multi-stage process to perform update operations across members of a Fleet on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) { + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, + ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -847,26 +679,19 @@ private Mono createOrUpdateAsync( * @throws 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 a multi-stage process to perform update operations across members of a Fleet on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, + ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -877,8 +702,8 @@ private Mono createOrUpdateAsync( * @return defines a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetUpdateStrategyInner createOrUpdate( - String resourceGroupName, String fleetName, String updateStrategyName, FleetUpdateStrategyInner resource) { + public FleetUpdateStrategyInner createOrUpdate(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource) { final String ifMatch = null; final String ifNoneMatch = null; return createOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch) @@ -887,7 +712,7 @@ public FleetUpdateStrategyInner createOrUpdate( /** * Create a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -901,22 +726,16 @@ public FleetUpdateStrategyInner createOrUpdate( * @return defines a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetUpdateStrategyInner createOrUpdate( - String resourceGroupName, - String fleetName, - String updateStrategyName, - FleetUpdateStrategyInner resource, - String ifMatch, - String ifNoneMatch, + public FleetUpdateStrategyInner createOrUpdate(String resourceGroupName, String fleetName, + String updateStrategyName, FleetUpdateStrategyInner resource, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync( - resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, context) - .block(); + return createOrUpdateAsync(resourceGroupName, fleetName, updateStrategyName, resource, ifMatch, ifNoneMatch, + context).block(); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -927,19 +746,15 @@ public FleetUpdateStrategyInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -954,25 +769,15 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateStrategyName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateStrategyName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -984,19 +789,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1011,22 +812,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateStrategyName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateStrategyName, accept, context); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1037,19 +829,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1059,20 +849,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateStrategyName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateStrategyName) { final String ifMatch = null; - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1084,19 +872,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1106,15 +893,15 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateStrategyName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateStrategyName) { final String ifMatch = null; return this.beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch).getSyncPoller(); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1126,16 +913,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { - return this - .beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateStrategyName, String ifMatch, Context context) { + return this.beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context) .getSyncPoller(); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1146,16 +932,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch) - .last() + private Mono deleteAsync(String resourceGroupName, String fleetName, String updateStrategyName, + String ifMatch) { + return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1167,14 +952,13 @@ private Mono deleteAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String updateStrategyName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1186,16 +970,15 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context) - .last() + private Mono deleteAsync(String resourceGroupName, String fleetName, String updateStrategyName, + String ifMatch, Context context) { + return beginDeleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1211,7 +994,7 @@ public void delete(String resourceGroupName, String fleetName, String updateStra /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -1222,21 +1005,22 @@ public void delete(String resourceGroupName, String fleetName, String updateStra * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, + Context context) { deleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetNextSinglePageAsync(String nextLink) { @@ -1244,62 +1028,44 @@ private Mono> listByFleetNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByFleetNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java index 6d04b6b9e826f..fe7c3b2b7acef 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java @@ -21,8 +21,7 @@ public final class FleetUpdateStrategiesImpl implements FleetUpdateStrategies { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - public FleetUpdateStrategiesImpl( - FleetUpdateStrategiesClient innerClient, + public FleetUpdateStrategiesImpl(FleetUpdateStrategiesClient innerClient, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -34,20 +33,17 @@ public PagedIterable listByFleet(String resourceGroupName, } public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - PagedIterable inner = - this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + PagedIterable inner + = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); return Utils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String fleetName, String updateStrategyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, fleetName, updateStrategyName, context); + public Response getWithResponse(String resourceGroupName, String fleetName, + String updateStrategyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, fleetName, updateStrategyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FleetUpdateStrategyImpl(inner.getValue(), this.manager())); } else { return null; @@ -67,35 +63,26 @@ public void delete(String resourceGroupName, String fleetName, String updateStra this.serviceClient().delete(resourceGroupName, fleetName, updateStrategyName); } - public void delete( - String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, + Context context) { this.serviceClient().delete(resourceGroupName, fleetName, updateStrategyName, ifMatch, context); } public FleetUpdateStrategy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies"); if (updateStrategyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE).getValue(); } @@ -103,27 +90,18 @@ public FleetUpdateStrategy getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies"); if (updateStrategyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, updateStrategyName, context); } @@ -131,27 +109,18 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies"); if (updateStrategyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); } String localIfMatch = null; this.delete(resourceGroupName, fleetName, updateStrategyName, localIfMatch, Context.NONE); @@ -160,27 +129,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, String ifMatch, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateStrategyName = Utils.getValueFromIdByName(id, "updateStrategies"); if (updateStrategyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateStrategies'.", id))); } this.delete(resourceGroupName, fleetName, updateStrategyName, ifMatch, context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java index 450dcd506073f..d51066879ae51 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java @@ -78,39 +78,19 @@ public FleetUpdateStrategyImpl withExistingFleet(String resourceGroupName, Strin } public FleetUpdateStrategy create() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .createOrUpdate( - resourceGroupName, - fleetName, - updateStrategyName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies().createOrUpdate(resourceGroupName, + fleetName, updateStrategyName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); return this; } public FleetUpdateStrategy create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .createOrUpdate( - resourceGroupName, - fleetName, - updateStrategyName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - context); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies().createOrUpdate(resourceGroupName, + fleetName, updateStrategyName, this.innerModel(), createIfMatch, createIfNoneMatch, context); return this; } - FleetUpdateStrategyImpl( - String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + FleetUpdateStrategyImpl(String name, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = new FleetUpdateStrategyInner(); this.serviceManager = serviceManager; this.updateStrategyName = name; @@ -125,39 +105,18 @@ public FleetUpdateStrategyImpl update() { } public FleetUpdateStrategy apply() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .createOrUpdate( - resourceGroupName, - fleetName, - updateStrategyName, - this.innerModel(), - updateIfMatch, - updateIfNoneMatch, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies().createOrUpdate(resourceGroupName, + fleetName, updateStrategyName, this.innerModel(), updateIfMatch, updateIfNoneMatch, Context.NONE); return this; } public FleetUpdateStrategy apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .createOrUpdate( - resourceGroupName, - fleetName, - updateStrategyName, - this.innerModel(), - updateIfMatch, - updateIfNoneMatch, - context); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies().createOrUpdate(resourceGroupName, + fleetName, updateStrategyName, this.innerModel(), updateIfMatch, updateIfNoneMatch, context); return this; } - FleetUpdateStrategyImpl( - FleetUpdateStrategyInner innerObject, + FleetUpdateStrategyImpl(FleetUpdateStrategyInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -167,22 +126,14 @@ public FleetUpdateStrategy apply(Context context) { } public FleetUpdateStrategy refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies() + .getWithResponse(resourceGroupName, fleetName, updateStrategyName, Context.NONE).getValue(); return this; } public FleetUpdateStrategy refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFleetUpdateStrategies() - .getWithResponse(resourceGroupName, fleetName, updateStrategyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getFleetUpdateStrategies() + .getWithResponse(resourceGroupName, fleetName, updateStrategyName, context).getValue(); return this; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java index f2cf5e21992c1..3e20635e3e423 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java @@ -42,17 +42,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in FleetsClient. */ +/** + * An instance of this class provides access to all the operations defined in FleetsClient. + */ public final class FleetsClientImpl implements FleetsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final FleetsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerServiceFleetManagementClientImpl client; /** * Initializes an instance of FleetsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ FleetsClientImpl(ContainerServiceFleetManagementClientImpl client) { @@ -67,232 +73,159 @@ public final class FleetsClientImpl implements FleetsClient { @Host("{$host}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") - @ExpectedResponses({200, 201}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @PathParam("fleetName") String fleetName, - @BodyParam("application/json") FleetInner resource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") - @ExpectedResponses({200, 202}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, + @BodyParam("application/json") FleetInner resource, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @BodyParam("application/json") FleetPatch properties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") - @ExpectedResponses({200, 202, 204}) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @BodyParam("application/json") FleetPatch properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials") - @ExpectedResponses({200}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredentials( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listCredentials(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists fleets in the specified subscription. - * + * * @throws 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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists fleets in the specified subscription. - * + * * @param context The context to associate with this operation. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists fleets in the specified subscription. - * + * * @throws 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 response of a Fleet list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Lists fleets in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -301,13 +234,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Lists fleets in the specified subscription. - * + * * @throws 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 response of a Fleet list operation as paginated response with {@link PagedIterable}. @@ -319,7 +252,7 @@ public PagedIterable list() { /** * Lists fleets in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -333,27 +266,23 @@ public PagedIterable list(Context context) { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -361,53 +290,34 @@ private Mono> listByResourceGroupSinglePageAsync(Strin } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -416,27 +326,15 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,14 +343,13 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -462,14 +359,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -483,7 +379,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -498,7 +394,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, C /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,16 +405,12 @@ public PagedIterable listByResourceGroup(String resourceGroupName, C @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String fleetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -529,23 +421,14 @@ private Mono> getByResourceGroupWithResponseAsync(String re } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -555,19 +438,15 @@ private Mono> getByResourceGroupWithResponseAsync(String re * @return a Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String fleetName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String fleetName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -578,20 +457,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context); } /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,7 +479,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -617,14 +489,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin * @return a Fleet along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String fleetName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, fleetName, context).block(); } /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -639,7 +511,7 @@ public FleetInner getByResourceGroup(String resourceGroupName, String fleetName) /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -651,19 +523,15 @@ public FleetInner getByResourceGroup(String resourceGroupName, String fleetName) * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -679,26 +547,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, resource, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -711,24 +568,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -744,23 +592,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, resource, accept, + context); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -772,19 +611,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync( - String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); + private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, this.client.getContext()); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -794,21 +631,19 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync( - String resourceGroupName, String fleetName, FleetInner resource) { + private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, this.client.getContext()); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -821,25 +656,18 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, context); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -849,18 +677,17 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginCreateOrUpdate( - String resourceGroupName, String fleetName, FleetInner resource) { + public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch) + return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch) .getSyncPoller(); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -873,21 +700,15 @@ public SyncPoller, FleetInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context) + public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context) .getSyncPoller(); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -899,16 +720,15 @@ public SyncPoller, FleetInner> beginCreateOrUpdate( * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource, + String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -921,14 +741,13 @@ private Mono createOrUpdateAsync( private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -941,21 +760,15 @@ private Mono createOrUpdateAsync(String resourceGroupName, String fl * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource, + String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -973,7 +786,7 @@ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, Fle /** * Creates or updates a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param resource Resource create parameters. @@ -986,19 +799,14 @@ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, Fle * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner createOrUpdate( - String resourceGroupName, - String fleetName, - FleetInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, + String ifNoneMatch, Context context) { return createOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).block(); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1009,19 +817,15 @@ public FleetInner createOrUpdate( * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1037,25 +841,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - properties, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, properties, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1067,19 +860,15 @@ private Mono>> updateWithResponseAsync( * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1095,22 +884,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - properties, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, properties, accept, context); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1121,19 +901,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); + private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, this.client.getContext()); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1143,20 +921,18 @@ private PollerFlux, FleetInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync( - String resourceGroupName, String fleetName, FleetPatch properties) { + private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, + FleetPatch properties) { final String ifMatch = null; - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, this.client.getContext()); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1168,20 +944,18 @@ private PollerFlux, FleetInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { + private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, + FleetInner.class, context); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1191,15 +965,15 @@ private PollerFlux, FleetInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginUpdate( - String resourceGroupName, String fleetName, FleetPatch properties) { + public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + FleetPatch properties) { final String ifMatch = null; return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).getSyncPoller(); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1211,14 +985,14 @@ public SyncPoller, FleetInner> beginUpdate( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginUpdate( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { + public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + FleetPatch properties, String ifMatch, Context context) { return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context).getSyncPoller(); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1229,16 +1003,15 @@ public SyncPoller, FleetInner> beginUpdate( * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch) - .last() + private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, + String ifMatch) { + return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1250,14 +1023,13 @@ private Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch) - .last() + return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1269,16 +1041,15 @@ private Mono updateAsync(String resourceGroupName, String fleetName, * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context) - .last() + private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, + String ifMatch, Context context) { + return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1295,7 +1066,7 @@ public FleetInner update(String resourceGroupName, String fleetName, FleetPatch /** * Update a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param properties The resource properties to be updated. @@ -1307,14 +1078,14 @@ public FleetInner update(String resourceGroupName, String fleetName, FleetPatch * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner update( - String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { + public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, + Context context) { return updateAsync(resourceGroupName, fleetName, properties, ifMatch, context).block(); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1324,19 +1095,15 @@ public FleetInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String ifMatch) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1347,24 +1114,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1375,19 +1132,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String ifMatch, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1398,21 +1151,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, accept, context); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1422,18 +1167,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String ifMatch) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String ifMatch) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1445,15 +1188,13 @@ private PollerFlux, Void> beginDeleteAsync( private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName) { final String ifMatch = null; Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1464,18 +1205,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String ifMatch, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1491,7 +1231,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1502,14 +1242,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String ifMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String ifMatch, + Context context) { return this.beginDeleteAsync(resourceGroupName, fleetName, ifMatch, context).getSyncPoller(); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1520,14 +1260,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, fleetName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1538,14 +1277,13 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, fleetName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1557,14 +1295,13 @@ private Mono deleteAsync(String resourceGroupName, String fleetName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, fleetName, ifMatch, context) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1579,7 +1316,7 @@ public void delete(String resourceGroupName, String fleetName) { /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -1595,7 +1332,7 @@ public void delete(String resourceGroupName, String fleetName, String ifMatch, C /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1604,19 +1341,15 @@ public void delete(String resourceGroupName, String fleetName, String ifMatch, C * @return the Credential results response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCredentialsWithResponseAsync( - String resourceGroupName, String fleetName) { + private Mono> listCredentialsWithResponseAsync(String resourceGroupName, + String fleetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1627,23 +1360,14 @@ private Mono> listCredentialsWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listCredentials( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context)) + .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -1653,19 +1377,15 @@ private Mono> listCredentialsWithResponseA * @return the Credential results response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCredentialsWithResponseAsync( - String resourceGroupName, String fleetName, Context context) { + private Mono> listCredentialsWithResponseAsync(String resourceGroupName, + String fleetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1676,20 +1396,13 @@ private Mono> listCredentialsWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listCredentials( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context); + return service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context); } /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1705,7 +1418,7 @@ private Mono listCredentialsAsync(String resourceGr /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -1715,14 +1428,14 @@ private Mono listCredentialsAsync(String resourceGr * @return the Credential results response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCredentialsWithResponse( - String resourceGroupName, String fleetName, Context context) { + public Response listCredentialsWithResponse(String resourceGroupName, String fleetName, + Context context) { return listCredentialsWithResponseAsync(resourceGroupName, fleetName, context).block(); } /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1737,14 +1450,15 @@ public FleetCredentialResultsInner listCredentials(String resourceGroupName, Str /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1752,38 +1466,30 @@ private Mono> listBySubscriptionNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -1791,36 +1497,27 @@ private Mono> listBySubscriptionNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1828,38 +1525,30 @@ private Mono> listByResourceGroupNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -1867,23 +1556,13 @@ private Mono> listByResourceGroupNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java index f4d77d52c4edf..2ed240c2c0e0d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java @@ -23,8 +23,7 @@ public final class FleetsImpl implements Fleets { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - public FleetsImpl( - FleetsClient innerClient, + public FleetsImpl(FleetsClient innerClient, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -51,13 +50,10 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Contex } public Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, fleetName, context); + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, fleetName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FleetImpl(inner.getValue(), this.manager())); } else { return null; @@ -81,15 +77,12 @@ public void delete(String resourceGroupName, String fleetName, String ifMatch, C this.serviceClient().delete(resourceGroupName, fleetName, ifMatch, context); } - public Response listCredentialsWithResponse( - String resourceGroupName, String fleetName, Context context) { - Response inner = - this.serviceClient().listCredentialsWithResponse(resourceGroupName, fleetName, context); + public Response listCredentialsWithResponse(String resourceGroupName, String fleetName, + Context context) { + Response inner + = this.serviceClient().listCredentialsWithResponse(resourceGroupName, fleetName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FleetCredentialResultsImpl(inner.getValue(), this.manager())); } else { return null; @@ -108,18 +101,13 @@ public FleetCredentialResults listCredentials(String resourceGroupName, String f public Fleet getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE).getValue(); } @@ -127,18 +115,13 @@ public Fleet getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, fleetName, context); } @@ -146,18 +129,13 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String localIfMatch = null; this.delete(resourceGroupName, fleetName, localIfMatch, Context.NONE); @@ -166,18 +144,13 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, String ifMatch, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } this.delete(resourceGroupName, fleetName, ifMatch, context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java index 10ea069c828d5..8ec2a71a828a8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java @@ -15,8 +15,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java index 8ecb23c26ea49..b67f7bad096c3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.containerservicefleet.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerServiceFleetManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(ContainerServiceFleetManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,99 +62,74 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "ContainerServiceFlee") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ContainerService/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List the operations for the provider. - * + * * @throws 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 REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the operations for the provider. - * + * * @param context The context to associate with this operation. * @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 REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the operations for the provider. - * + * * @throws 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -157,27 +138,27 @@ private PagedFlux listAsync() { /** * List the operations for the provider. - * + * * @param context The context to associate with this operation. * @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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the operations for the provider. - * + * * @throws 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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -186,13 +167,13 @@ public PagedIterable list() { /** * List the operations for the provider. - * + * * @param context The context to associate with this operation. * @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 REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -201,14 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -216,37 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -254,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java index 10dbb5bc4d0eb..7a96bb26e89a1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java index c2944f414c433..8dbb8fc02cfca 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java @@ -4,10 +4,12 @@ package com.azure.resourcemanager.containerservicefleet.implementation; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus; @@ -91,39 +93,19 @@ public UpdateRunImpl withExistingFleet(String resourceGroupName, String fleetNam } public UpdateRun create() { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .createOrUpdate( - resourceGroupName, - fleetName, - updateRunName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getUpdateRuns().createOrUpdate(resourceGroupName, fleetName, + updateRunName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); return this; } public UpdateRun create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .createOrUpdate( - resourceGroupName, - fleetName, - updateRunName, - this.innerModel(), - createIfMatch, - createIfNoneMatch, - context); + this.innerObject = serviceManager.serviceClient().getUpdateRuns().createOrUpdate(resourceGroupName, fleetName, + updateRunName, this.innerModel(), createIfMatch, createIfNoneMatch, context); return this; } - UpdateRunImpl( - String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { + UpdateRunImpl(String name, + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = new UpdateRunInner(); this.serviceManager = serviceManager; this.updateRunName = name; @@ -138,39 +120,18 @@ public UpdateRunImpl update() { } public UpdateRun apply() { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .createOrUpdate( - resourceGroupName, - fleetName, - updateRunName, - this.innerModel(), - updateIfMatch, - updateIfNoneMatch, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getUpdateRuns().createOrUpdate(resourceGroupName, fleetName, + updateRunName, this.innerModel(), updateIfMatch, updateIfNoneMatch, Context.NONE); return this; } public UpdateRun apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .createOrUpdate( - resourceGroupName, - fleetName, - updateRunName, - this.innerModel(), - updateIfMatch, - updateIfNoneMatch, - context); + this.innerObject = serviceManager.serviceClient().getUpdateRuns().createOrUpdate(resourceGroupName, fleetName, + updateRunName, this.innerModel(), updateIfMatch, updateIfNoneMatch, context); return this; } - UpdateRunImpl( - UpdateRunInner innerObject, + UpdateRunImpl(UpdateRunInner innerObject, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -180,25 +141,26 @@ public UpdateRun apply(Context context) { } public UpdateRun refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .getWithResponse(resourceGroupName, fleetName, updateRunName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getUpdateRuns() + .getWithResponse(resourceGroupName, fleetName, updateRunName, Context.NONE).getValue(); return this; } public UpdateRun refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getUpdateRuns() - .getWithResponse(resourceGroupName, fleetName, updateRunName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getUpdateRuns() + .getWithResponse(resourceGroupName, fleetName, updateRunName, context).getValue(); return this; } + public Response skipWithResponse(SkipProperties body, String ifMatch, Context context) { + return serviceManager.updateRuns().skipWithResponse(resourceGroupName, fleetName, updateRunName, body, ifMatch, + context); + } + + public UpdateRun skip(SkipProperties body) { + return serviceManager.updateRuns().skip(resourceGroupName, fleetName, updateRunName, body); + } + public UpdateRun start() { return serviceManager.updateRuns().start(resourceGroupName, fleetName, updateRunName); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java index 4bcf8f12d0da8..bf055209a42ce 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java @@ -34,27 +34,34 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in UpdateRunsClient. */ +/** + * An instance of this class provides access to all the operations defined in UpdateRunsClient. + */ public final class UpdateRunsClientImpl implements UpdateRunsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final UpdateRunsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerServiceFleetManagementClientImpl client; /** * Initializes an instance of UpdateRunsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ UpdateRunsClientImpl(ContainerServiceFleetManagementClientImpl client) { - this.service = - RestProxy.create(UpdateRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(UpdateRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -65,136 +72,104 @@ public final class UpdateRunsClientImpl implements UpdateRunsClient { @Host("{$host}") @ServiceInterface(name = "ContainerServiceFlee") public interface UpdateRunsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFleet(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") - @ExpectedResponses({200}) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @PathParam("updateRunName") String updateRunName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") - @ExpectedResponses({200, 201}) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, + @PathParam("updateRunName") String updateRunName, @BodyParam("application/json") UpdateRunInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, - @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, - @BodyParam("application/json") UpdateRunInner resource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") - @ExpectedResponses({200, 202, 204}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/skip") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start") - @ExpectedResponses({200, 202}) + Mono> skip(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, + @BodyParam("application/json") SkipProperties body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop") - @ExpectedResponses({200, 202}) + Mono>> start(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + Mono>> stop(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @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 response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -205,32 +180,16 @@ private Mono> listByFleetSinglePageAsync(String re } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -238,22 +197,18 @@ private Mono> listByFleetSinglePageAsync(String re * @throws 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 response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync( - String resourceGroupName, String fleetName, Context context) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -265,28 +220,15 @@ private Mono> listByFleetSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByFleet( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,14 +238,13 @@ private Mono> listByFleetSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), nextLink -> listByFleetNextSinglePageAsync(nextLink)); } /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -314,14 +255,13 @@ private PagedFlux listByFleetAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { - return new PagedFlux<>( - () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); } /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -336,7 +276,7 @@ public PagedIterable listByFleet(String resourceGroupName, Strin /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -352,7 +292,7 @@ public PagedIterable listByFleet(String resourceGroupName, Strin /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -362,19 +302,15 @@ public PagedIterable listByFleet(String resourceGroupName, Strin * @return a UpdateRun along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -388,24 +324,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - updateRunName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, updateRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -416,19 +342,15 @@ private Mono> getWithResponseAsync( * @return a UpdateRun along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -442,21 +364,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - fleetName, - updateRunName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, updateRunName, accept, context); } /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -473,7 +387,7 @@ private Mono getAsync(String resourceGroupName, String fleetName /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -484,14 +398,14 @@ private Mono getAsync(String resourceGroupName, String fleetName * @return a UpdateRun along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String fleetName, String updateRunName, Context context) { + public Response getWithResponse(String resourceGroupName, String fleetName, String updateRunName, + Context context) { return getWithResponseAsync(resourceGroupName, fleetName, updateRunName, context).block(); } /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -507,7 +421,7 @@ public UpdateRunInner get(String resourceGroupName, String fleetName, String upd /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -518,27 +432,18 @@ public UpdateRunInner get(String resourceGroupName, String fleetName, String upd * @throws 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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -557,27 +462,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - updateRunName, - resource, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateRunName, + resource, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -589,28 +482,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -629,24 +512,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - ifNoneMatch, - fleetName, - updateRunName, - resource, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateRunName, + resource, accept, context); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -657,32 +530,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateRunName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -691,29 +552,22 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource) { + private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateRunName, resource, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -725,30 +579,22 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, + private PollerFlux, UpdateRunInner> beginCreateOrUpdateAsync(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, + updateRunName, resource, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, context); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -757,11 +603,11 @@ private PollerFlux, UpdateRunInner> beginCreateOrUpda * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginCreateOrUpdate( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource) { + public SyncPoller, UpdateRunInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource) { final String ifMatch = null; final String ifNoneMatch = null; return this @@ -771,7 +617,7 @@ public SyncPoller, UpdateRunInner> beginCreateOrUpdat /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -783,26 +629,19 @@ public SyncPoller, UpdateRunInner> beginCreateOrUpdat * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginCreateOrUpdate( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, + public SyncPoller, UpdateRunInner> beginCreateOrUpdate(String resourceGroupName, + String fleetName, String updateRunName, UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch, context) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, + ifNoneMatch, context).getSyncPoller(); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -813,24 +652,18 @@ public SyncPoller, UpdateRunInner> beginCreateOrUpdat * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch) { + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource, String ifMatch, String ifNoneMatch) { return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -839,21 +672,20 @@ private Mono createOrUpdateAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource) { + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource) { final String ifMatch = null; final String ifNoneMatch = null; return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -865,26 +697,18 @@ private Mono createOrUpdateAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -895,8 +719,8 @@ private Mono createOrUpdateAsync( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner createOrUpdate( - String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource) { + public UpdateRunInner createOrUpdate(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource) { final String ifMatch = null; final String ifNoneMatch = null; return createOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch).block(); @@ -904,7 +728,7 @@ public UpdateRunInner createOrUpdate( /** * Create a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -918,21 +742,15 @@ public UpdateRunInner createOrUpdate( * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner createOrUpdate( - String resourceGroupName, - String fleetName, - String updateRunName, - UpdateRunInner resource, - String ifMatch, - String ifNoneMatch, - Context context) { + public UpdateRunInner createOrUpdate(String resourceGroupName, String fleetName, String updateRunName, + UpdateRunInner resource, String ifMatch, String ifNoneMatch, Context context) { return createOrUpdateAsync(resourceGroupName, fleetName, updateRunName, resource, ifMatch, ifNoneMatch, context) .block(); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -943,19 +761,15 @@ public UpdateRunInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -969,25 +783,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -999,19 +802,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1025,22 +824,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1051,19 +841,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1073,20 +861,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateRunName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateRunName) { final String ifMatch = null; - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1098,19 +884,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1120,15 +905,15 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateRunName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateRunName) { final String ifMatch = null; return this.beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1140,14 +925,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { return this.beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1159,14 +944,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1178,14 +962,13 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1197,16 +980,15 @@ private Mono deleteAsync(String resourceGroupName, String fleetName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context) - .last() + private Mono deleteAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { + return beginDeleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1222,7 +1004,7 @@ public void delete(String resourceGroupName, String fleetName, String updateRunN /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1233,38 +1015,188 @@ public void delete(String resourceGroupName, String fleetName, String updateRunN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { deleteAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); } /** - * Starts an UpdateRun. - * + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this 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 a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { + private Mono> skipWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch) { if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.skip(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> skipWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.skip(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, body, accept, context); + } + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @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 multi-stage process to perform update operations across members of a Fleet on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body) { + final String ifMatch = null; + return skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @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 multi-stage process to perform update operations across members of a Fleet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response skipWithResponse(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch, Context context) { + return skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).block(); + } + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @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 multi-stage process to perform update operations across members of a Fleet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { + final String ifMatch = null; + return skipWithResponse(resourceGroupName, fleetName, updateRunName, body, ifMatch, Context.NONE).getValue(); + } + + /** + * Starts an UpdateRun. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param ifMatch The request should only proceed if an entity matches this 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 a multi-stage process to perform update operations across members of a Fleet along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1278,25 +1210,14 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1306,22 +1227,18 @@ private Mono>> startWithResponseAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1335,22 +1252,13 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1359,26 +1267,20 @@ private Mono>> startWithResponseAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - Mono>> mono = - startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch) { + Mono>> mono + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1386,27 +1288,21 @@ private PollerFlux, UpdateRunInner> beginStartAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync( - String resourceGroupName, String fleetName, String updateRunName) { + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName) { final String ifMatch = null; - Mono>> mono = - startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + Mono>> mono + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1416,23 +1312,21 @@ private PollerFlux, UpdateRunInner> beginStartAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); + Mono>> mono + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, context); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1440,18 +1334,18 @@ private PollerFlux, UpdateRunInner> beginStartAsync( * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStart( - String resourceGroupName, String fleetName, String updateRunName) { + public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName) { final String ifMatch = null; return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1461,17 +1355,17 @@ public SyncPoller, UpdateRunInner> beginStart( * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStart( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1480,19 +1374,18 @@ public SyncPoller, UpdateRunInner> beginStart( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch) { + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1500,19 +1393,18 @@ private Mono startAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1522,19 +1414,18 @@ private Mono startAsync(String resourceGroupName, String fleetNa * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context) - .last() + private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch, Context context) { + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1551,7 +1442,7 @@ public UpdateRunInner start(String resourceGroupName, String fleetName, String u /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1563,14 +1454,14 @@ public UpdateRunInner start(String resourceGroupName, String fleetName, String u * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner start( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { return startAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1579,22 +1470,18 @@ public UpdateRunInner start( * @throws 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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1608,25 +1495,14 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1636,22 +1512,18 @@ private Mono>> stopWithResponseAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1665,22 +1537,13 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ifMatch, - fleetName, - updateRunName, - accept, - context); + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1689,26 +1552,20 @@ private Mono>> stopWithResponseAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - Mono>> mono = - stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch) { + Mono>> mono + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1716,27 +1573,21 @@ private PollerFlux, UpdateRunInner> beginStopAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync( - String resourceGroupName, String fleetName, String updateRunName) { + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, + String fleetName, String updateRunName) { final String ifMatch = null; - Mono>> mono = - stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - UpdateRunInner.class, - UpdateRunInner.class, - this.client.getContext()); + Mono>> mono + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1746,23 +1597,21 @@ private PollerFlux, UpdateRunInner> beginStopAsync( * @throws 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 {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); + Mono>> mono + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, context); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1770,18 +1619,18 @@ private PollerFlux, UpdateRunInner> beginStopAsync( * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStop( - String resourceGroupName, String fleetName, String updateRunName) { + public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, + String updateRunName) { final String ifMatch = null; return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1791,17 +1640,17 @@ public SyncPoller, UpdateRunInner> beginStop( * @throws 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 {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * of a Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStop( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1810,19 +1659,18 @@ public SyncPoller, UpdateRunInner> beginStop( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch) { + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1830,19 +1678,18 @@ private Mono stopAsync( * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch) - .last() + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1852,19 +1699,18 @@ private Mono stopAsync(String resourceGroupName, String fleetNam * @throws 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 multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context) - .last() + private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch, Context context) { + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1881,7 +1727,7 @@ public UpdateRunInner stop(String resourceGroupName, String fleetName, String up /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -1893,21 +1739,22 @@ public UpdateRunInner stop(String resourceGroupName, String fleetName, String up * @return a multi-stage process to perform update operations across members of a Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner stop( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { return stopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetNextSinglePageAsync(String nextLink) { @@ -1915,37 +1762,29 @@ private Mono> listByFleetNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @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 response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByFleetNextSinglePageAsync(String nextLink, Context context) { @@ -1953,23 +1792,13 @@ private Mono> listByFleetNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByFleetNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java index bf15e99178ab0..4c0e6bf6973c7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java @@ -11,6 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; import com.azure.resourcemanager.containerservicefleet.models.UpdateRuns; @@ -21,8 +22,7 @@ public final class UpdateRunsImpl implements UpdateRuns { private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager; - public UpdateRunsImpl( - UpdateRunsClient innerClient, + public UpdateRunsImpl(UpdateRunsClient innerClient, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -38,15 +38,12 @@ public PagedIterable listByFleet(String resourceGroupName, String fle return Utils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String fleetName, String updateRunName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, fleetName, updateRunName, context); + public Response getWithResponse(String resourceGroupName, String fleetName, String updateRunName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, fleetName, updateRunName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UpdateRunImpl(inner.getValue(), this.manager())); } else { return null; @@ -66,11 +63,32 @@ public void delete(String resourceGroupName, String fleetName, String updateRunN this.serviceClient().delete(resourceGroupName, fleetName, updateRunName); } - public void delete( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { this.serviceClient().delete(resourceGroupName, fleetName, updateRunName, ifMatch, context); } + public Response skipWithResponse(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch, Context context) { + Response inner = this.serviceClient().skipWithResponse(resourceGroupName, fleetName, + updateRunName, body, ifMatch, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateRunImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { + UpdateRunInner inner = this.serviceClient().skip(resourceGroupName, fleetName, updateRunName, body); + if (inner != null) { + return new UpdateRunImpl(inner, this.manager()); + } else { + return null; + } + } + public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName) { UpdateRunInner inner = this.serviceClient().start(resourceGroupName, fleetName, updateRunName); if (inner != null) { @@ -80,10 +98,10 @@ public UpdateRun start(String resourceGroupName, String fleetName, String update } } - public UpdateRun start( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - UpdateRunInner inner = - this.serviceClient().start(resourceGroupName, fleetName, updateRunName, ifMatch, context); + public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { + UpdateRunInner inner + = this.serviceClient().start(resourceGroupName, fleetName, updateRunName, ifMatch, context); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -100,8 +118,8 @@ public UpdateRun stop(String resourceGroupName, String fleetName, String updateR } } - public UpdateRun stop( - String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { + public UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { UpdateRunInner inner = this.serviceClient().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); @@ -113,25 +131,18 @@ public UpdateRun stop( public UpdateRun getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateRunName = Utils.getValueFromIdByName(id, "updateRuns"); if (updateRunName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, updateRunName, Context.NONE).getValue(); } @@ -139,25 +150,18 @@ public UpdateRun getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateRunName = Utils.getValueFromIdByName(id, "updateRuns"); if (updateRunName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); } return this.getWithResponse(resourceGroupName, fleetName, updateRunName, context); } @@ -165,25 +169,18 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateRunName = Utils.getValueFromIdByName(id, "updateRuns"); if (updateRunName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); } String localIfMatch = null; this.delete(resourceGroupName, fleetName, updateRunName, localIfMatch, Context.NONE); @@ -192,25 +189,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, String ifMatch, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String fleetName = Utils.getValueFromIdByName(id, "fleets"); if (fleetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id))); } String updateRunName = Utils.getValueFromIdByName(id, "updateRuns"); if (updateRunName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); } this.delete(resourceGroupName, fleetName, updateRunName, ifMatch, context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/Utils.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/Utils.java index 53a5fee9e0b60..c793601ab6f7f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/Utils.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/Utils.java @@ -41,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -74,6 +75,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { @@ -87,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java index e672e37e26f5c..1ae401cdc0283 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager - * Client. + * Package containing the implementations for ContainerServiceFleetManagementClient. + * Azure Kubernetes Fleet Manager Client. */ package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java index c9ed9bddb5752..af97efe7a4d3f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java index ed8ed7eba073e..f91addfb7743d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java @@ -11,39 +11,41 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; import java.util.Map; -/** An immutable client-side representation of Fleet. */ +/** + * An immutable client-side representation of Fleet. + */ public interface Fleet { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -53,79 +55,84 @@ public interface Fleet { * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. - * + * * @return the etag value. */ String etag(); /** * Gets the identity property: Managed identity. - * + * * @return the identity value. */ ManagedServiceIdentity identity(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ FleetProvisioningState provisioningState(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner object. - * + * * @return the inner object. */ FleetInner innerModel(); - /** The entirety of the Fleet definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Fleet definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Fleet definition stages. */ + /** + * The Fleet definition stages. + */ interface DefinitionStages { - /** The first stage of the Fleet definition. */ + /** + * The first stage of the Fleet definition. + */ interface Blank extends WithLocation { } - /** The stage of the Fleet definition allowing to specify location. */ + /** + * The stage of the Fleet definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -133,18 +140,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Fleet definition allowing to specify parent resource. */ + /** + * The stage of the Fleet definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -155,65 +164,70 @@ interface WithResourceGroup { * The stage of the Fleet definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithIfMatch, - DefinitionStages.WithIfNoneMatch { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. - * + * * @return the created resource. */ Fleet create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Fleet create(Context context); } - /** The stage of the Fleet definition allowing to specify tags. */ + /** + * The stage of the Fleet definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Fleet definition allowing to specify identity. */ + /** + * The stage of the Fleet definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Managed identity.. - * + * * @param identity Managed identity. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the Fleet definition allowing to specify ifMatch. */ + /** + * The stage of the Fleet definition allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ WithCreate withIfMatch(String ifMatch); } - /** The stage of the Fleet definition allowing to specify ifNoneMatch. */ + /** + * The stage of the Fleet definition allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -223,58 +237,68 @@ interface WithIfNoneMatch { /** * Begins update for the Fleet resource. - * + * * @return the stage of resource update. */ Fleet.Update update(); - /** The template for Fleet update. */ + /** + * The template for Fleet update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithIfMatch { /** * Executes the update request. - * + * * @return the updated resource. */ Fleet apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Fleet apply(Context context); } - /** The Fleet update stages. */ + /** + * The Fleet update stages. + */ interface UpdateStages { - /** The stage of the Fleet update allowing to specify tags. */ + /** + * The stage of the Fleet update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Fleet update allowing to specify identity. */ + /** + * The stage of the Fleet update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Managed identity.. - * + * * @param identity Managed identity. * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); } - /** The stage of the Fleet update allowing to specify ifMatch. */ + /** + * The stage of the Fleet update allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ @@ -284,14 +308,14 @@ interface WithIfMatch { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Fleet refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -299,7 +323,7 @@ interface WithIfMatch { /** * Lists the user credentials of a Fleet. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -310,7 +334,7 @@ interface WithIfMatch { /** * Lists the user credentials of a Fleet. - * + * * @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 Credential results response. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java index 5223de38c340a..e97b50c24cfe7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java @@ -8,7 +8,9 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; -/** One credential result item. */ +/** + * One credential result item. + */ @Immutable public final class FleetCredentialResult { /* @@ -23,13 +25,15 @@ public final class FleetCredentialResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private byte[] value; - /** Creates an instance of FleetCredentialResult class. */ + /** + * Creates an instance of FleetCredentialResult class. + */ public FleetCredentialResult() { } /** * Get the name property: The name of the credential. - * + * * @return the name value. */ public String name() { @@ -38,7 +42,7 @@ public String name() { /** * Get the value property: Base64-encoded Kubernetes configuration file. - * + * * @return the value value. */ public byte[] value() { @@ -47,7 +51,7 @@ public byte[] value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java index 6ac05ea3c5a71..28129c2b31219 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResults.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner; import java.util.List; -/** An immutable client-side representation of FleetCredentialResults. */ +/** + * An immutable client-side representation of FleetCredentialResults. + */ public interface FleetCredentialResults { /** * Gets the kubeconfigs property: Array of base64-encoded Kubernetes configuration files. - * + * * @return the kubeconfigs value. */ List kubeconfigs(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner object. - * + * * @return the inner object. */ FleetCredentialResultsInner innerModel(); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java index ddb16c6e0a686..4cc501057f928 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a Fleet list operation. */ +/** + * The response of a Fleet list operation. + */ @Fluent public final class FleetListResult { /* @@ -25,13 +27,15 @@ public final class FleetListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of FleetListResult class. */ + /** + * Creates an instance of FleetListResult class. + */ public FleetListResult() { } /** * Get the value property: The Fleet items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The Fleet items on this page. - * + * * @param value the value value to set. * @return the FleetListResult object itself. */ @@ -51,7 +55,7 @@ public FleetListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the FleetListResult object itself. */ @@ -71,14 +75,13 @@ public FleetListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model FleetListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model FleetListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java index fcd78346cce8f..0fbdd36db1df9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMember.java @@ -8,25 +8,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -/** An immutable client-side representation of FleetMember. */ +/** + * An immutable client-side representation of FleetMember. + */ public interface FleetMember { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); @@ -36,14 +38,14 @@ public interface FleetMember { * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); @@ -52,55 +54,63 @@ public interface FleetMember { * Gets the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid * Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. - * + * * @return the clusterResourceId value. */ String clusterResourceId(); /** * Gets the group property: The group this member belongs to for multi-cluster update management. - * + * * @return the group value. */ String group(); /** * Gets the provisioningState property: The status of the last operation. - * + * * @return the provisioningState value. */ FleetMemberProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner object. - * + * * @return the inner object. */ FleetMemberInner innerModel(); - /** The entirety of the FleetMember definition. */ + /** + * The entirety of the FleetMember definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The FleetMember definition stages. */ + /** + * The FleetMember definition stages. + */ interface DefinitionStages { - /** The first stage of the FleetMember definition. */ + /** + * The first stage of the FleetMember definition. + */ interface Blank extends WithParentResource { } - /** The stage of the FleetMember definition allowing to specify parent resource. */ + /** + * The stage of the FleetMember definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, fleetName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @return the next definition stage. @@ -112,69 +122,74 @@ interface WithParentResource { * The stage of the FleetMember definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithClusterResourceId, - DefinitionStages.WithGroup, - DefinitionStages.WithIfMatch, - DefinitionStages.WithIfNoneMatch { + interface WithCreate extends DefinitionStages.WithClusterResourceId, DefinitionStages.WithGroup, + DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. - * + * * @return the created resource. */ FleetMember create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ FleetMember create(Context context); } - /** The stage of the FleetMember definition allowing to specify clusterResourceId. */ + /** + * The stage of the FleetMember definition allowing to specify clusterResourceId. + */ interface WithClusterResourceId { /** * Specifies the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must * be a valid Azure resource id. e.g.: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.. - * + * * @param clusterResourceId The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure - * resource id. e.g.: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. + * resource id. e.g.: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'. * @return the next definition stage. */ WithCreate withClusterResourceId(String clusterResourceId); } - /** The stage of the FleetMember definition allowing to specify group. */ + /** + * The stage of the FleetMember definition allowing to specify group. + */ interface WithGroup { /** * Specifies the group property: The group this member belongs to for multi-cluster update management.. - * + * * @param group The group this member belongs to for multi-cluster update management. * @return the next definition stage. */ WithCreate withGroup(String group); } - /** The stage of the FleetMember definition allowing to specify ifMatch. */ + /** + * The stage of the FleetMember definition allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ WithCreate withIfMatch(String ifMatch); } - /** The stage of the FleetMember definition allowing to specify ifNoneMatch. */ + /** + * The stage of the FleetMember definition allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -184,47 +199,55 @@ interface WithIfNoneMatch { /** * Begins update for the FleetMember resource. - * + * * @return the stage of resource update. */ FleetMember.Update update(); - /** The template for FleetMember update. */ + /** + * The template for FleetMember update. + */ interface Update extends UpdateStages.WithGroup, UpdateStages.WithIfMatch { /** * Executes the update request. - * + * * @return the updated resource. */ FleetMember apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ FleetMember apply(Context context); } - /** The FleetMember update stages. */ + /** + * The FleetMember update stages. + */ interface UpdateStages { - /** The stage of the FleetMember update allowing to specify group. */ + /** + * The stage of the FleetMember update allowing to specify group. + */ interface WithGroup { /** * Specifies the group property: The group this member belongs to for multi-cluster update management.. - * + * * @param group The group this member belongs to for multi-cluster update management. * @return the next definition stage. */ Update withGroup(String group); } - /** The stage of the FleetMember update allowing to specify ifMatch. */ + /** + * The stage of the FleetMember update allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ @@ -234,14 +257,14 @@ interface WithIfMatch { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ FleetMember refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java index 5a1ca9bf1c646..9e0a931f3ed87 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a FleetMember list operation. */ +/** + * The response of a FleetMember list operation. + */ @Fluent public final class FleetMemberListResult { /* @@ -25,13 +27,15 @@ public final class FleetMemberListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of FleetMemberListResult class. */ + /** + * Creates an instance of FleetMemberListResult class. + */ public FleetMemberListResult() { } /** * Get the value property: The FleetMember items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The FleetMember items on this page. - * + * * @param value the value value to set. * @return the FleetMemberListResult object itself. */ @@ -51,7 +55,7 @@ public FleetMemberListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the FleetMemberListResult object itself. */ @@ -71,14 +75,13 @@ public FleetMemberListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model FleetMemberListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model FleetMemberListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java index ac6abb4731271..4a0203f3ef9a4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state of the last accepted operation. */ +/** + * The provisioning state of the last accepted operation. + */ public final class FleetMemberProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for FleetMemberProvisioningState. */ + /** + * Static value Succeeded for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for FleetMemberProvisioningState. */ + /** + * Static value Failed for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for FleetMemberProvisioningState. */ + /** + * Static value Canceled for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState CANCELED = fromString("Canceled"); - /** Static value Joining for FleetMemberProvisioningState. */ + /** + * Static value Joining for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState JOINING = fromString("Joining"); - /** Static value Leaving for FleetMemberProvisioningState. */ + /** + * Static value Leaving for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState LEAVING = fromString("Leaving"); - /** Static value Updating for FleetMemberProvisioningState. */ + /** + * Static value Updating for FleetMemberProvisioningState. + */ public static final FleetMemberProvisioningState UPDATING = fromString("Updating"); /** * Creates a new instance of FleetMemberProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public FleetMemberProvisioningState() { /** * Creates or finds a FleetMemberProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding FleetMemberProvisioningState. */ @@ -50,7 +64,7 @@ public static FleetMemberProvisioningState fromString(String name) { /** * Gets known FleetMemberProvisioningState values. - * + * * @return known FleetMemberProvisioningState values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java index ee71b313a200d..97b5e2a367531 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The type used for update operations of the FleetMember. */ +/** + * The type used for update operations of the FleetMember. + */ @Fluent public final class FleetMemberUpdate { /* @@ -17,13 +19,15 @@ public final class FleetMemberUpdate { @JsonProperty(value = "properties") private FleetMemberUpdateProperties innerProperties; - /** Creates an instance of FleetMemberUpdate class. */ + /** + * Creates an instance of FleetMemberUpdate class. + */ public FleetMemberUpdate() { } /** * Get the innerProperties property: The updatable properties of the FleetMember. - * + * * @return the innerProperties value. */ private FleetMemberUpdateProperties innerProperties() { @@ -32,7 +36,7 @@ private FleetMemberUpdateProperties innerProperties() { /** * Get the group property: The group this member belongs to for multi-cluster update management. - * + * * @return the group value. */ public String group() { @@ -41,7 +45,7 @@ public String group() { /** * Set the group property: The group this member belongs to for multi-cluster update management. - * + * * @param group the group value to set. * @return the FleetMemberUpdate object itself. */ @@ -55,7 +59,7 @@ public FleetMemberUpdate withGroup(String group) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java index c22d5e25e8062..91c22d148f6e1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of FleetMembers. */ +/** + * Resource collection API of FleetMembers. + */ public interface FleetMembers { /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface FleetMembers { /** * List FleetMember resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface FleetMembers { /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -47,12 +49,12 @@ public interface FleetMembers { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a FleetMember along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String fleetName, String fleetMemberName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, + Context context); /** * Get a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a FleetMember. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. @@ -91,7 +93,7 @@ Response getWithResponse( /** * Get a FleetMember. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,7 +104,7 @@ Response getWithResponse( /** * Get a FleetMember. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,7 +116,7 @@ Response getWithResponse( /** * Delete a FleetMember. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,7 +126,7 @@ Response getWithResponse( /** * Delete a FleetMember. - * + * * @param id the resource ID. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. @@ -136,7 +138,7 @@ Response getWithResponse( /** * Begins definition for a new FleetMember resource. - * + * * @param name resource name. * @return the first stage of the new FleetMember definition. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java index f91f23d305942..2f98c9f305035 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Properties of a Fleet that can be patched. */ +/** + * Properties of a Fleet that can be patched. + */ @Fluent public final class FleetPatch { /* @@ -25,13 +27,15 @@ public final class FleetPatch { @JsonProperty(value = "identity") private ManagedServiceIdentity identity; - /** Creates an instance of FleetPatch class. */ + /** + * Creates an instance of FleetPatch class. + */ public FleetPatch() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -40,7 +44,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the FleetPatch object itself. */ @@ -51,7 +55,7 @@ public FleetPatch withTags(Map tags) { /** * Get the identity property: Managed identity. - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -60,7 +64,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed identity. - * + * * @param identity the identity value to set. * @return the FleetPatch object itself. */ @@ -71,7 +75,7 @@ public FleetPatch withIdentity(ManagedServiceIdentity identity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java index e2f3e4c83955e..3cf9b89592812 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state of the last accepted operation. */ +/** + * The provisioning state of the last accepted operation. + */ public final class FleetProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for FleetProvisioningState. */ + /** + * Static value Succeeded for FleetProvisioningState. + */ public static final FleetProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for FleetProvisioningState. */ + /** + * Static value Failed for FleetProvisioningState. + */ public static final FleetProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for FleetProvisioningState. */ + /** + * Static value Canceled for FleetProvisioningState. + */ public static final FleetProvisioningState CANCELED = fromString("Canceled"); - /** Static value Creating for FleetProvisioningState. */ + /** + * Static value Creating for FleetProvisioningState. + */ public static final FleetProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for FleetProvisioningState. */ + /** + * Static value Updating for FleetProvisioningState. + */ public static final FleetProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for FleetProvisioningState. */ + /** + * Static value Deleting for FleetProvisioningState. + */ public static final FleetProvisioningState DELETING = fromString("Deleting"); /** * Creates a new instance of FleetProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public FleetProvisioningState() { /** * Creates or finds a FleetProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding FleetProvisioningState. */ @@ -50,7 +64,7 @@ public static FleetProvisioningState fromString(String name) { /** * Gets known FleetProvisioningState values. - * + * * @return known FleetProvisioningState values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java index c2cdb4982af08..f01f4b42010fd 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of FleetUpdateStrategies. */ +/** + * Resource collection API of FleetUpdateStrategies. + */ public interface FleetUpdateStrategies { /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface FleetUpdateStrategies { /** * List FleetUpdateStrategy resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface FleetUpdateStrategies { /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -47,12 +49,12 @@ public interface FleetUpdateStrategies { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a FleetUpdateStrategy along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String fleetName, String updateStrategyName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, String updateStrategyName, + Context context); /** * Get a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a FleetUpdateStrategy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. @@ -91,7 +93,7 @@ Response getWithResponse( /** * Get a FleetUpdateStrategy. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,7 +104,7 @@ Response getWithResponse( /** * Get a FleetUpdateStrategy. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,7 +116,7 @@ Response getWithResponse( /** * Delete a FleetUpdateStrategy. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,7 +126,7 @@ Response getWithResponse( /** * Delete a FleetUpdateStrategy. - * + * * @param id the resource ID. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. @@ -136,7 +138,7 @@ Response getWithResponse( /** * Begins definition for a new FleetUpdateStrategy resource. - * + * * @param name resource name. * @return the first stage of the new FleetUpdateStrategy definition. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java index 0d062691fec26..b7d301a9825a3 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java @@ -8,25 +8,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -/** An immutable client-side representation of FleetUpdateStrategy. */ +/** + * An immutable client-side representation of FleetUpdateStrategy. + */ public interface FleetUpdateStrategy { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); @@ -36,62 +38,70 @@ public interface FleetUpdateStrategy { * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: The provisioning state of the UpdateStrategy resource. - * + * * @return the provisioningState value. */ FleetUpdateStrategyProvisioningState provisioningState(); /** * Gets the strategy property: Defines the update sequence of the clusters. - * + * * @return the strategy value. */ UpdateRunStrategy strategy(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner object. - * + * * @return the inner object. */ FleetUpdateStrategyInner innerModel(); - /** The entirety of the FleetUpdateStrategy definition. */ + /** + * The entirety of the FleetUpdateStrategy definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The FleetUpdateStrategy definition stages. */ + /** + * The FleetUpdateStrategy definition stages. + */ interface DefinitionStages { - /** The first stage of the FleetUpdateStrategy definition. */ + /** + * The first stage of the FleetUpdateStrategy definition. + */ interface Blank extends WithParentResource { } - /** The stage of the FleetUpdateStrategy definition allowing to specify parent resource. */ + /** + * The stage of the FleetUpdateStrategy definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, fleetName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @return the next definition stage. @@ -107,47 +117,53 @@ interface WithCreate extends DefinitionStages.WithStrategy, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. - * + * * @return the created resource. */ FleetUpdateStrategy create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ FleetUpdateStrategy create(Context context); } - /** The stage of the FleetUpdateStrategy definition allowing to specify strategy. */ + /** + * The stage of the FleetUpdateStrategy definition allowing to specify strategy. + */ interface WithStrategy { /** * Specifies the strategy property: Defines the update sequence of the clusters.. - * + * * @param strategy Defines the update sequence of the clusters. * @return the next definition stage. */ WithCreate withStrategy(UpdateRunStrategy strategy); } - /** The stage of the FleetUpdateStrategy definition allowing to specify ifMatch. */ + /** + * The stage of the FleetUpdateStrategy definition allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ WithCreate withIfMatch(String ifMatch); } - /** The stage of the FleetUpdateStrategy definition allowing to specify ifNoneMatch. */ + /** + * The stage of the FleetUpdateStrategy definition allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -157,58 +173,68 @@ interface WithIfNoneMatch { /** * Begins update for the FleetUpdateStrategy resource. - * + * * @return the stage of resource update. */ FleetUpdateStrategy.Update update(); - /** The template for FleetUpdateStrategy update. */ + /** + * The template for FleetUpdateStrategy update. + */ interface Update extends UpdateStages.WithStrategy, UpdateStages.WithIfMatch, UpdateStages.WithIfNoneMatch { /** * Executes the update request. - * + * * @return the updated resource. */ FleetUpdateStrategy apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ FleetUpdateStrategy apply(Context context); } - /** The FleetUpdateStrategy update stages. */ + /** + * The FleetUpdateStrategy update stages. + */ interface UpdateStages { - /** The stage of the FleetUpdateStrategy update allowing to specify strategy. */ + /** + * The stage of the FleetUpdateStrategy update allowing to specify strategy. + */ interface WithStrategy { /** * Specifies the strategy property: Defines the update sequence of the clusters.. - * + * * @param strategy Defines the update sequence of the clusters. * @return the next definition stage. */ Update withStrategy(UpdateRunStrategy strategy); } - /** The stage of the FleetUpdateStrategy update allowing to specify ifMatch. */ + /** + * The stage of the FleetUpdateStrategy update allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ Update withIfMatch(String ifMatch); } - /** The stage of the FleetUpdateStrategy update allowing to specify ifNoneMatch. */ + /** + * The stage of the FleetUpdateStrategy update allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -218,14 +244,14 @@ interface WithIfNoneMatch { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ FleetUpdateStrategy refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java index 4d98a91024394..7a9448232fa03 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a FleetUpdateStrategy list operation. */ +/** + * The response of a FleetUpdateStrategy list operation. + */ @Fluent public final class FleetUpdateStrategyListResult { /* @@ -25,13 +27,15 @@ public final class FleetUpdateStrategyListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of FleetUpdateStrategyListResult class. */ + /** + * Creates an instance of FleetUpdateStrategyListResult class. + */ public FleetUpdateStrategyListResult() { } /** * Get the value property: The FleetUpdateStrategy items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The FleetUpdateStrategy items on this page. - * + * * @param value the value value to set. * @return the FleetUpdateStrategyListResult object itself. */ @@ -51,7 +55,7 @@ public FleetUpdateStrategyListResult withValue(List va /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the FleetUpdateStrategyListResult object itself. */ @@ -71,15 +75,13 @@ public FleetUpdateStrategyListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model FleetUpdateStrategyListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model FleetUpdateStrategyListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java index 160854df88e7f..8028457e34168 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java @@ -8,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state of the UpdateStrategy resource. */ +/** + * The provisioning state of the UpdateStrategy resource. + */ public final class FleetUpdateStrategyProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for FleetUpdateStrategyProvisioningState. */ + /** + * Static value Succeeded for FleetUpdateStrategyProvisioningState. + */ public static final FleetUpdateStrategyProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for FleetUpdateStrategyProvisioningState. */ + /** + * Static value Failed for FleetUpdateStrategyProvisioningState. + */ public static final FleetUpdateStrategyProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for FleetUpdateStrategyProvisioningState. */ + /** + * Static value Canceled for FleetUpdateStrategyProvisioningState. + */ public static final FleetUpdateStrategyProvisioningState CANCELED = fromString("Canceled"); /** * Creates a new instance of FleetUpdateStrategyProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public FleetUpdateStrategyProvisioningState() { /** * Creates or finds a FleetUpdateStrategyProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding FleetUpdateStrategyProvisioningState. */ @@ -42,7 +50,7 @@ public static FleetUpdateStrategyProvisioningState fromString(String name) { /** * Gets known FleetUpdateStrategyProvisioningState values. - * + * * @return known FleetUpdateStrategyProvisioningState values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java index 4cfcf0cc8202f..69a517775512d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Fleets. */ +/** + * Resource collection API of Fleets. + */ public interface Fleets { /** * Lists fleets in the specified subscription. - * + * * @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 response of a Fleet list operation as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface Fleets { /** * Lists fleets in the specified subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface Fleets { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface Fleets { /** * Lists fleets in the specified subscription and resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +57,7 @@ public interface Fleets { /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -68,7 +70,7 @@ public interface Fleets { /** * Gets a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,7 +82,7 @@ public interface Fleets { /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,7 +93,7 @@ public interface Fleets { /** * Delete a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param ifMatch The request should only proceed if an entity matches this string. @@ -104,7 +106,7 @@ public interface Fleets { /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -113,12 +115,12 @@ public interface Fleets { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Credential results response along with {@link Response}. */ - Response listCredentialsWithResponse( - String resourceGroupName, String fleetName, Context context); + Response listCredentialsWithResponse(String resourceGroupName, String fleetName, + Context context); /** * Lists the user credentials of a Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +132,7 @@ Response listCredentialsWithResponse( /** * Gets a Fleet. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response listCredentialsWithResponse( /** * Gets a Fleet. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +155,7 @@ Response listCredentialsWithResponse( /** * Delete a Fleet. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,7 +165,7 @@ Response listCredentialsWithResponse( /** * Delete a Fleet. - * + * * @param id the resource ID. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. @@ -175,7 +177,7 @@ Response listCredentialsWithResponse( /** * Begins definition for a new Fleet resource. - * + * * @param name resource name. * @return the first stage of the new Fleet definition. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java index c720623b9d7a0..6fb0aaed340e9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The update to be applied to the ManagedClusters. */ +/** + * The update to be applied to the ManagedClusters. + */ @Fluent public final class ManagedClusterUpdate { /* @@ -23,13 +25,15 @@ public final class ManagedClusterUpdate { @JsonProperty(value = "nodeImageSelection") private NodeImageSelection nodeImageSelection; - /** Creates an instance of ManagedClusterUpdate class. */ + /** + * Creates an instance of ManagedClusterUpdate class. + */ public ManagedClusterUpdate() { } /** * Get the upgrade property: The upgrade to apply to the ManagedClusters. - * + * * @return the upgrade value. */ public ManagedClusterUpgradeSpec upgrade() { @@ -38,7 +42,7 @@ public ManagedClusterUpgradeSpec upgrade() { /** * Set the upgrade property: The upgrade to apply to the ManagedClusters. - * + * * @param upgrade the upgrade value to set. * @return the ManagedClusterUpdate object itself. */ @@ -49,7 +53,7 @@ public ManagedClusterUpdate withUpgrade(ManagedClusterUpgradeSpec upgrade) { /** * Get the nodeImageSelection property: The node image upgrade to be applied to the target nodes in update run. - * + * * @return the nodeImageSelection value. */ public NodeImageSelection nodeImageSelection() { @@ -58,7 +62,7 @@ public NodeImageSelection nodeImageSelection() { /** * Set the nodeImageSelection property: The node image upgrade to be applied to the target nodes in update run. - * + * * @param nodeImageSelection the nodeImageSelection value to set. * @return the ManagedClusterUpdate object itself. */ @@ -69,14 +73,13 @@ public ManagedClusterUpdate withNodeImageSelection(NodeImageSelection nodeImageS /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (upgrade() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property upgrade in model ManagedClusterUpdate")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property upgrade in model ManagedClusterUpdate")); } else { upgrade().validate(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java index ed0973be575ba..8df506aeb1e78 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The upgrade to apply to a ManagedCluster. */ +/** + * The upgrade to apply to a ManagedCluster. + */ @Fluent public final class ManagedClusterUpgradeSpec { /* @@ -25,14 +27,17 @@ public final class ManagedClusterUpgradeSpec { @JsonProperty(value = "kubernetesVersion") private String kubernetesVersion; - /** Creates an instance of ManagedClusterUpgradeSpec class. */ + /** + * Creates an instance of ManagedClusterUpgradeSpec class. + */ public ManagedClusterUpgradeSpec() { } /** - * Get the type property: The upgrade type. Full requires the KubernetesVersion property to be set. NodeImageOnly - * requires the KubernetesVersion property not to be set. - * + * Get the type property: The upgrade type. + * Full requires the KubernetesVersion property to be set. + * NodeImageOnly requires the KubernetesVersion property not to be set. + * * @return the type value. */ public ManagedClusterUpgradeType type() { @@ -40,9 +45,10 @@ public ManagedClusterUpgradeType type() { } /** - * Set the type property: The upgrade type. Full requires the KubernetesVersion property to be set. NodeImageOnly - * requires the KubernetesVersion property not to be set. - * + * Set the type property: The upgrade type. + * Full requires the KubernetesVersion property to be set. + * NodeImageOnly requires the KubernetesVersion property not to be set. + * * @param type the type value to set. * @return the ManagedClusterUpgradeSpec object itself. */ @@ -53,7 +59,7 @@ public ManagedClusterUpgradeSpec withType(ManagedClusterUpgradeType type) { /** * Get the kubernetesVersion property: The Kubernetes version to upgrade the member clusters to. - * + * * @return the kubernetesVersion value. */ public String kubernetesVersion() { @@ -62,7 +68,7 @@ public String kubernetesVersion() { /** * Set the kubernetesVersion property: The Kubernetes version to upgrade the member clusters to. - * + * * @param kubernetesVersion the kubernetesVersion value to set. * @return the ManagedClusterUpgradeSpec object itself. */ @@ -73,14 +79,13 @@ public ManagedClusterUpgradeSpec withKubernetesVersion(String kubernetesVersion) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ManagedClusterUpgradeSpec")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ManagedClusterUpgradeSpec")); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java index ce65d51596133..a0a8a5c368b1b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of upgrade to perform when targeting ManagedClusters. */ +/** + * The type of upgrade to perform when targeting ManagedClusters. + */ public final class ManagedClusterUpgradeType extends ExpandableStringEnum { - /** Static value Full for ManagedClusterUpgradeType. */ + /** + * Static value Full for ManagedClusterUpgradeType. + */ public static final ManagedClusterUpgradeType FULL = fromString("Full"); - /** Static value NodeImageOnly for ManagedClusterUpgradeType. */ + /** + * Static value NodeImageOnly for ManagedClusterUpgradeType. + */ public static final ManagedClusterUpgradeType NODE_IMAGE_ONLY = fromString("NodeImageOnly"); /** * Creates a new instance of ManagedClusterUpgradeType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ManagedClusterUpgradeType() { /** * Creates or finds a ManagedClusterUpgradeType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedClusterUpgradeType. */ @@ -38,7 +44,7 @@ public static ManagedClusterUpgradeType fromString(String name) { /** * Gets known ManagedClusterUpgradeType values. - * + * * @return known ManagedClusterUpgradeType values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java index ea8e5411345b4..d428723b5f3d7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java @@ -11,7 +11,9 @@ import java.util.Map; import java.util.UUID; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** + * Managed service identity (system assigned and/or user assigned identities). + */ @Fluent public final class ManagedServiceIdentity { /* @@ -37,21 +39,24 @@ public final class ManagedServiceIdentity { /* * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of ManagedServiceIdentity class. */ + /** + * Creates an instance of ManagedServiceIdentity class. + */ public ManagedServiceIdentity() { } /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -59,9 +64,9 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * * @return the tenantId value. */ public UUID tenantId() { @@ -71,7 +76,7 @@ public UUID tenantId() { /** * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @return the type value. */ public ManagedServiceIdentityType type() { @@ -81,7 +86,7 @@ public ManagedServiceIdentityType type() { /** * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. */ @@ -95,7 +100,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -107,7 +112,7 @@ public Map userAssignedIdentities() { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. */ @@ -118,24 +123,20 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java index 6c8b5c0ececfa..e42b6f7e81582 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ + /** + * Static value None for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedServiceIdentityType. */ + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedServiceIdentityType. */ + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned, UserAssigned"); + /** + * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned, UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ManagedServiceIdentityType() { /** * Creates or finds a ManagedServiceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ @@ -45,7 +55,7 @@ public static ManagedServiceIdentityType fromString(String name) { /** * Gets known ManagedServiceIdentityType values. - * + * * @return known ManagedServiceIdentityType values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java index 14dcfc32be3cc..f260457de85e9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The status of a member update operation. */ +/** + * The status of a member update operation. + */ @Immutable public final class MemberUpdateStatus { /* @@ -40,13 +42,15 @@ public final class MemberUpdateStatus { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of MemberUpdateStatus class. */ + /** + * Creates an instance of MemberUpdateStatus class. + */ public MemberUpdateStatus() { } /** * Get the status property: The status of the MemberUpdate operation. - * + * * @return the status value. */ public UpdateStatus status() { @@ -55,7 +59,7 @@ public UpdateStatus status() { /** * Get the name property: The name of the FleetMember. - * + * * @return the name value. */ public String name() { @@ -64,7 +68,7 @@ public String name() { /** * Get the clusterResourceId property: The Azure resource id of the target Kubernetes cluster. - * + * * @return the clusterResourceId value. */ public String clusterResourceId() { @@ -73,7 +77,7 @@ public String clusterResourceId() { /** * Get the operationId property: The operation resource id of the latest attempt to perform the operation. - * + * * @return the operationId value. */ public String operationId() { @@ -82,7 +86,7 @@ public String operationId() { /** * Get the message property: The status message after processing the member update operation. - * + * * @return the message value. */ public String message() { @@ -91,7 +95,7 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java index 1bd5f5b435210..b65c30607517e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The node image upgrade to be applied to the target nodes in update run. */ +/** + * The node image upgrade to be applied to the target nodes in update run. + */ @Fluent public final class NodeImageSelection { /* @@ -17,13 +19,15 @@ public final class NodeImageSelection { @JsonProperty(value = "type", required = true) private NodeImageSelectionType type; - /** Creates an instance of NodeImageSelection class. */ + /** + * Creates an instance of NodeImageSelection class. + */ public NodeImageSelection() { } /** * Get the type property: The node image upgrade type. - * + * * @return the type value. */ public NodeImageSelectionType type() { @@ -32,7 +36,7 @@ public NodeImageSelectionType type() { /** * Set the type property: The node image upgrade type. - * + * * @param type the type value to set. * @return the NodeImageSelection object itself. */ @@ -43,14 +47,13 @@ public NodeImageSelection withType(NodeImageSelectionType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model NodeImageSelection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model NodeImageSelection")); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java index 99be24967dffa..8d7c29a22de2a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The node image upgrade specs for the update run. */ +/** + * The node image upgrade specs for the update run. + */ @Immutable public final class NodeImageSelectionStatus { /* @@ -17,13 +19,15 @@ public final class NodeImageSelectionStatus { @JsonProperty(value = "selectedNodeImageVersions", access = JsonProperty.Access.WRITE_ONLY) private List selectedNodeImageVersions; - /** Creates an instance of NodeImageSelectionStatus class. */ + /** + * Creates an instance of NodeImageSelectionStatus class. + */ public NodeImageSelectionStatus() { } /** * Get the selectedNodeImageVersions property: The image versions to upgrade the nodes to. - * + * * @return the selectedNodeImageVersions value. */ public List selectedNodeImageVersions() { @@ -32,7 +36,7 @@ public List selectedNodeImageVersions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java index 36b051843e7d9..356946b12b07d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The node image upgrade type. */ +/** + * The node image upgrade type. + */ public final class NodeImageSelectionType extends ExpandableStringEnum { - /** Static value Latest for NodeImageSelectionType. */ + /** + * Static value Latest for NodeImageSelectionType. + */ public static final NodeImageSelectionType LATEST = fromString("Latest"); - /** Static value Consistent for NodeImageSelectionType. */ + /** + * Static value Consistent for NodeImageSelectionType. + */ public static final NodeImageSelectionType CONSISTENT = fromString("Consistent"); /** * Creates a new instance of NodeImageSelectionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public NodeImageSelectionType() { /** * Creates or finds a NodeImageSelectionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding NodeImageSelectionType. */ @@ -38,7 +44,7 @@ public static NodeImageSelectionType fromString(String name) { /** * Gets known NodeImageSelectionType values. - * + * * @return known NodeImageSelectionType values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java index ba7d55c932b3f..e655b4d8812a8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The node upgrade image version. */ +/** + * The node upgrade image version. + */ @Immutable public final class NodeImageVersion { /* @@ -16,14 +18,16 @@ public final class NodeImageVersion { @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; - /** Creates an instance of NodeImageVersion class. */ + /** + * Creates an instance of NodeImageVersion class. + */ public NodeImageVersion() { } /** * Get the version property: The image version to upgrade the nodes to (e.g., * 'AKSUbuntu-1804gen2containerd-2022.12.13'). - * + * * @return the version value. */ public String version() { @@ -32,7 +36,7 @@ public String version() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java index 4209e4d6b5597..7ec0fad043426 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java index b92423048b4d2..649f0745f8664 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* @@ -37,14 +39,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java index 6e188784530e0..59ffd340f8a5f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java index b17748523c802..b597df0c0f1bf 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * List the operations for the provider. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * List the operations for the provider. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java index 85d42c1f659de..c401746c58ff5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java new file mode 100644 index 0000000000000..4284f059dd458 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The properties of a skip operation containing multiple skip requests. + */ +@Fluent +public final class SkipProperties { + /* + * The targets to skip. + */ + @JsonProperty(value = "targets", required = true) + private List targets; + + /** + * Creates an instance of SkipProperties class. + */ + public SkipProperties() { + } + + /** + * Get the targets property: The targets to skip. + * + * @return the targets value. + */ + public List targets() { + return this.targets; + } + + /** + * Set the targets property: The targets to skip. + * + * @param targets the targets value to set. + * @return the SkipProperties object itself. + */ + public SkipProperties withTargets(List targets) { + this.targets = targets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targets() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property targets in model SkipProperties")); + } else { + targets().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SkipProperties.class); +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipRequest.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipRequest.java new file mode 100644 index 0000000000000..9b2d2ff7547ec --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipRequest.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The definition of a single skip request. + */ +@Fluent +public final class SkipRequest { + /* + * The skip target type. + */ + @JsonProperty(value = "type", required = true) + private TargetType type; + + /* + * The skip target. + * To skip a member/group/stage, use the member/group/stage's name; + * Tp skip an after stage wait, use the parent stage's name. + */ + @JsonProperty(value = "target", required = true) + private String target; + + /** + * Creates an instance of SkipRequest class. + */ + public SkipRequest() { + } + + /** + * Get the type property: The skip target type. + * + * @return the type value. + */ + public TargetType type() { + return this.type; + } + + /** + * Set the type property: The skip target type. + * + * @param type the type value to set. + * @return the SkipRequest object itself. + */ + public SkipRequest withType(TargetType type) { + this.type = type; + return this; + } + + /** + * Get the target property: The skip target. + * To skip a member/group/stage, use the member/group/stage's name; + * Tp skip an after stage wait, use the parent stage's name. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The skip target. + * To skip a member/group/stage, use the member/group/stage's name; + * Tp skip an after stage wait, use the parent stage's name. + * + * @param target the target value to set. + * @return the SkipRequest object itself. + */ + public SkipRequest withTarget(String target) { + this.target = target; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model SkipRequest")); + } + if (target() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property target in model SkipRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SkipRequest.class); +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java new file mode 100644 index 0000000000000..226c3b5e8297a --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The target type of a skip request. + */ +public final class TargetType extends ExpandableStringEnum { + /** + * Static value Member for TargetType. + */ + public static final TargetType MEMBER = fromString("Member"); + + /** + * Static value Group for TargetType. + */ + public static final TargetType GROUP = fromString("Group"); + + /** + * Static value Stage for TargetType. + */ + public static final TargetType STAGE = fromString("Stage"); + + /** + * Static value AfterStageWait for TargetType. + */ + public static final TargetType AFTER_STAGE_WAIT = fromString("AfterStageWait"); + + /** + * Creates a new instance of TargetType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TargetType() { + } + + /** + * Creates or finds a TargetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TargetType. + */ + @JsonCreator + public static TargetType fromString(String name) { + return fromString(name, TargetType.class); + } + + /** + * Gets known TargetType values. + * + * @return known TargetType values. + */ + public static Collection values() { + return values(TargetType.class); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java index 2e8d4a7479701..6c67df6c53848 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** A group to be updated. */ +/** + * A group to be updated. + */ @Fluent public final class UpdateGroup { /* @@ -18,13 +20,16 @@ public final class UpdateGroup { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of UpdateGroup class. */ + /** + * Creates an instance of UpdateGroup class. + */ public UpdateGroup() { } /** - * Get the name property: Name of the group. It must match a group name of an existing fleet member. - * + * Get the name property: Name of the group. + * It must match a group name of an existing fleet member. + * * @return the name value. */ public String name() { @@ -32,8 +37,9 @@ public String name() { } /** - * Set the name property: Name of the group. It must match a group name of an existing fleet member. - * + * Set the name property: Name of the group. + * It must match a group name of an existing fleet member. + * * @param name the name value to set. * @return the UpdateGroup object itself. */ @@ -44,14 +50,13 @@ public UpdateGroup withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model UpdateGroup")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model UpdateGroup")); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java index 0f43d01e19bf9..5a325663cec1c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The status of a UpdateGroup. */ +/** + * The status of a UpdateGroup. + */ @Immutable public final class UpdateGroupStatus { /* @@ -29,13 +31,15 @@ public final class UpdateGroupStatus { @JsonProperty(value = "members", access = JsonProperty.Access.WRITE_ONLY) private List members; - /** Creates an instance of UpdateGroupStatus class. */ + /** + * Creates an instance of UpdateGroupStatus class. + */ public UpdateGroupStatus() { } /** * Get the status property: The status of the UpdateGroup. - * + * * @return the status value. */ public UpdateStatus status() { @@ -44,7 +48,7 @@ public UpdateStatus status() { /** * Get the name property: The name of the UpdateGroup. - * + * * @return the name value. */ public String name() { @@ -53,7 +57,7 @@ public String name() { /** * Get the members property: The list of member this UpdateGroup updates. - * + * * @return the members value. */ public List members() { @@ -62,7 +66,7 @@ public List members() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java index a0451181b4aca..3450d89e46758 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java @@ -4,29 +4,32 @@ package com.azure.resourcemanager.containerservicefleet.models; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; -/** An immutable client-side representation of UpdateRun. */ +/** + * An immutable client-side representation of UpdateRun. + */ public interface UpdateRun { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); @@ -36,48 +39,51 @@ public interface UpdateRun { * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), * and If-Range (section 14.27) header fields. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: The provisioning state of the UpdateRun resource. - * + * * @return the provisioningState value. */ UpdateRunProvisioningState provisioningState(); /** * Gets the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new strategy in - * place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" field. (since - * 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave both - * "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and - * store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy resource do not - * propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and "strategy" + * unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation and store + * it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. + * * @return the updateStrategyId value. */ String updateStrategyId(); /** - * Gets the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single - * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started. - * + * Gets the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a + * single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. + * * @return the strategy value. */ UpdateRunStrategy strategy(); @@ -85,48 +91,56 @@ public interface UpdateRun { /** * Gets the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The * managedClusterUpdate can be modified until the run is started. - * + * * @return the managedClusterUpdate value. */ ManagedClusterUpdate managedClusterUpdate(); /** * Gets the status property: The status of the UpdateRun. - * + * * @return the status value. */ UpdateRunStatus status(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner object. - * + * * @return the inner object. */ UpdateRunInner innerModel(); - /** The entirety of the UpdateRun definition. */ + /** + * The entirety of the UpdateRun definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The UpdateRun definition stages. */ + /** + * The UpdateRun definition stages. + */ interface DefinitionStages { - /** The first stage of the UpdateRun definition. */ + /** + * The first stage of the UpdateRun definition. + */ interface Blank extends WithParentResource { } - /** The stage of the UpdateRun definition allowing to specify parent resource. */ + /** + * The stage of the UpdateRun definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, fleetName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @return the next definition stage. @@ -138,107 +152,118 @@ interface WithParentResource { * The stage of the UpdateRun definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithUpdateStrategyId, - DefinitionStages.WithStrategy, - DefinitionStages.WithManagedClusterUpdate, - DefinitionStages.WithIfMatch, - DefinitionStages.WithIfNoneMatch { + interface WithCreate extends DefinitionStages.WithUpdateStrategyId, DefinitionStages.WithStrategy, + DefinitionStages.WithManagedClusterUpdate, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. - * + * * @return the created resource. */ UpdateRun create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ UpdateRun create(Context context); } - /** The stage of the UpdateRun definition allowing to specify updateStrategyId. */ + /** + * The stage of the UpdateRun definition allowing to specify updateStrategyId. + */ interface WithUpdateStrategyId { /** * Specifies the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to * reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new - * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" - * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave - * both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of - * creation and store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy - * resource do not propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before - * launching the UpdateRun.. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and + * "strategy" unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation + * and store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.. + * * @param updateStrategyId The resource id of the FleetUpdateStrategy resource to reference. - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new - * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" - * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: - * Leave both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - *

Setting both "updateStrategyId" and "strategy" is invalid. - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of - * creation and store it in the "strategy" field. Subsequent changes to the referenced - * FleetUpdateStrategy resource do not propagate. UpdateRunStrategy changes can be made directly on the - * "strategy" field before launching the UpdateRun. + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and + * "strategy" unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation + * and store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. * @return the next definition stage. */ WithCreate withUpdateStrategyId(String updateStrategyId); } - /** The stage of the UpdateRun definition allowing to specify strategy. */ + /** + * The stage of the UpdateRun definition allowing to specify strategy. + */ interface WithStrategy { /** - * Specifies the strategy property: The strategy defines the order in which the clusters will be updated. If - * not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage - * and a single UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the - * run is started.. - * - * @param strategy The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a - * single UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run - * is started. + * Specifies the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage + * and a single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started.. + * + * @param strategy The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage + * and a single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. * @return the next definition stage. */ WithCreate withStrategy(UpdateRunStrategy strategy); } - /** The stage of the UpdateRun definition allowing to specify managedClusterUpdate. */ + /** + * The stage of the UpdateRun definition allowing to specify managedClusterUpdate. + */ interface WithManagedClusterUpdate { /** * Specifies the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. * The managedClusterUpdate can be modified until the run is started.. - * + * * @param managedClusterUpdate The update to be applied to all clusters in the UpdateRun. The - * managedClusterUpdate can be modified until the run is started. + * managedClusterUpdate can be modified until the run is started. * @return the next definition stage. */ WithCreate withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate); } - /** The stage of the UpdateRun definition allowing to specify ifMatch. */ + /** + * The stage of the UpdateRun definition allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ WithCreate withIfMatch(String ifMatch); } - /** The stage of the UpdateRun definition allowing to specify ifNoneMatch. */ + /** + * The stage of the UpdateRun definition allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -248,115 +273,130 @@ interface WithIfNoneMatch { /** * Begins update for the UpdateRun resource. - * + * * @return the stage of resource update. */ UpdateRun.Update update(); - /** The template for UpdateRun update. */ - interface Update - extends UpdateStages.WithUpdateStrategyId, - UpdateStages.WithStrategy, - UpdateStages.WithManagedClusterUpdate, - UpdateStages.WithIfMatch, - UpdateStages.WithIfNoneMatch { + /** + * The template for UpdateRun update. + */ + interface Update extends UpdateStages.WithUpdateStrategyId, UpdateStages.WithStrategy, + UpdateStages.WithManagedClusterUpdate, UpdateStages.WithIfMatch, UpdateStages.WithIfNoneMatch { /** * Executes the update request. - * + * * @return the updated resource. */ UpdateRun apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ UpdateRun apply(Context context); } - /** The UpdateRun update stages. */ + /** + * The UpdateRun update stages. + */ interface UpdateStages { - /** The stage of the UpdateRun update allowing to specify updateStrategyId. */ + /** + * The stage of the UpdateRun update allowing to specify updateStrategyId. + */ interface WithUpdateStrategyId { /** * Specifies the updateStrategyId property: The resource id of the FleetUpdateStrategy resource to * reference. - * - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new - * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" - * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: Leave - * both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - * - *

Setting both "updateStrategyId" and "strategy" is invalid. - * - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of - * creation and store it in the "strategy" field. Subsequent changes to the referenced FleetUpdateStrategy - * resource do not propagate. UpdateRunStrategy changes can be made directly on the "strategy" field before - * launching the UpdateRun.. - * + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and + * "strategy" unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation + * and store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun.. + * * @param updateStrategyId The resource id of the FleetUpdateStrategy resource to reference. - *

When creating a new run, there are three ways to define a strategy for the run: 1. Define a new - * strategy in place: Set the "strategy" field. 2. Use an existing strategy: Set the "updateStrategyId" - * field. (since 2023-08-15-preview) 3. Use the default strategy to update all the members one by one: - * Leave both "updateStrategyId" and "strategy" unset. (since 2023-08-15-preview) - *

Setting both "updateStrategyId" and "strategy" is invalid. - *

UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of - * creation and store it in the "strategy" field. Subsequent changes to the referenced - * FleetUpdateStrategy resource do not propagate. UpdateRunStrategy changes can be made directly on the - * "strategy" field before launching the UpdateRun. + * + * When creating a new run, there are three ways to define a strategy for the run: + * 1. Define a new strategy in place: Set the "strategy" field. + * 2. Use an existing strategy: Set the "updateStrategyId" field. (since 2023-08-15-preview) + * 3. Use the default strategy to update all the members one by one: Leave both "updateStrategyId" and + * "strategy" unset. (since 2023-08-15-preview) + * + * Setting both "updateStrategyId" and "strategy" is invalid. + * + * UpdateRuns created by "updateStrategyId" snapshot the referenced UpdateStrategy at the time of creation + * and store it in the "strategy" field. + * Subsequent changes to the referenced FleetUpdateStrategy resource do not propagate. + * UpdateRunStrategy changes can be made directly on the "strategy" field before launching the UpdateRun. * @return the next definition stage. */ Update withUpdateStrategyId(String updateStrategyId); } - /** The stage of the UpdateRun update allowing to specify strategy. */ + /** + * The stage of the UpdateRun update allowing to specify strategy. + */ interface WithStrategy { /** - * Specifies the strategy property: The strategy defines the order in which the clusters will be updated. If - * not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage - * and a single UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the - * run is started.. - * - * @param strategy The strategy defines the order in which the clusters will be updated. If not set, all - * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a - * single UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run - * is started. + * Specifies the strategy property: The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage + * and a single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started.. + * + * @param strategy The strategy defines the order in which the clusters will be updated. + * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage + * and a single UpdateGroup targeting all members. + * The strategy of the UpdateRun can be modified until the run is started. * @return the next definition stage. */ Update withStrategy(UpdateRunStrategy strategy); } - /** The stage of the UpdateRun update allowing to specify managedClusterUpdate. */ + /** + * The stage of the UpdateRun update allowing to specify managedClusterUpdate. + */ interface WithManagedClusterUpdate { /** * Specifies the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. * The managedClusterUpdate can be modified until the run is started.. - * + * * @param managedClusterUpdate The update to be applied to all clusters in the UpdateRun. The - * managedClusterUpdate can be modified until the run is started. + * managedClusterUpdate can be modified until the run is started. * @return the next definition stage. */ Update withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate); } - /** The stage of the UpdateRun update allowing to specify ifMatch. */ + /** + * The stage of the UpdateRun update allowing to specify ifMatch. + */ interface WithIfMatch { /** * Specifies the ifMatch property: The request should only proceed if an entity matches this string.. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @return the next definition stage. */ Update withIfMatch(String ifMatch); } - /** The stage of the UpdateRun update allowing to specify ifNoneMatch. */ + /** + * The stage of the UpdateRun update allowing to specify ifNoneMatch. + */ interface WithIfNoneMatch { /** * Specifies the ifNoneMatch property: The request should only proceed if no entity matches this string.. - * + * * @param ifNoneMatch The request should only proceed if no entity matches this string. * @return the next definition stage. */ @@ -366,22 +406,46 @@ interface WithIfNoneMatch { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ UpdateRun refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ UpdateRun refresh(Context context); + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}. + */ + Response skipWithResponse(SkipProperties body, String ifMatch, Context context); + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet. + */ + UpdateRun skip(SkipProperties body); + /** * Starts an UpdateRun. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a multi-stage process to perform update operations across members of a Fleet. @@ -390,7 +454,7 @@ interface WithIfNoneMatch { /** * Starts an UpdateRun. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -402,7 +466,7 @@ interface WithIfNoneMatch { /** * Stops an UpdateRun. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a multi-stage process to perform update operations across members of a Fleet. @@ -411,7 +475,7 @@ interface WithIfNoneMatch { /** * Stops an UpdateRun. - * + * * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java index 2c61adaaf13d7..33ad27d838528 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a UpdateRun list operation. */ +/** + * The response of a UpdateRun list operation. + */ @Fluent public final class UpdateRunListResult { /* @@ -25,13 +27,15 @@ public final class UpdateRunListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of UpdateRunListResult class. */ + /** + * Creates an instance of UpdateRunListResult class. + */ public UpdateRunListResult() { } /** * Get the value property: The UpdateRun items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: The UpdateRun items on this page. - * + * * @param value the value value to set. * @return the UpdateRunListResult object itself. */ @@ -51,7 +55,7 @@ public UpdateRunListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the UpdateRunListResult object itself. */ @@ -71,14 +75,13 @@ public UpdateRunListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model UpdateRunListResult")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model UpdateRunListResult")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java index 5518f049226de..a0d85fa41d44d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunProvisioningState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state of the UpdateRun resource. */ +/** + * The provisioning state of the UpdateRun resource. + */ public final class UpdateRunProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for UpdateRunProvisioningState. */ + /** + * Static value Succeeded for UpdateRunProvisioningState. + */ public static final UpdateRunProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for UpdateRunProvisioningState. */ + /** + * Static value Failed for UpdateRunProvisioningState. + */ public static final UpdateRunProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for UpdateRunProvisioningState. */ + /** + * Static value Canceled for UpdateRunProvisioningState. + */ public static final UpdateRunProvisioningState CANCELED = fromString("Canceled"); /** * Creates a new instance of UpdateRunProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public UpdateRunProvisioningState() { /** * Creates or finds a UpdateRunProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpdateRunProvisioningState. */ @@ -41,7 +49,7 @@ public static UpdateRunProvisioningState fromString(String name) { /** * Gets known UpdateRunProvisioningState values. - * + * * @return known UpdateRunProvisioningState values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java index cee4a783e7b8d..9149fab8fa5ab 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The status of a UpdateRun. */ +/** + * The status of a UpdateRun. + */ @Immutable public final class UpdateRunStatus { /* @@ -30,13 +32,15 @@ public final class UpdateRunStatus { @JsonProperty(value = "nodeImageSelection", access = JsonProperty.Access.WRITE_ONLY) private NodeImageSelectionStatus nodeImageSelection; - /** Creates an instance of UpdateRunStatus class. */ + /** + * Creates an instance of UpdateRunStatus class. + */ public UpdateRunStatus() { } /** * Get the status property: The status of the UpdateRun. - * + * * @return the status value. */ public UpdateStatus status() { @@ -45,7 +49,7 @@ public UpdateStatus status() { /** * Get the stages property: The stages composing an update run. Stages are run sequentially withing an UpdateRun. - * + * * @return the stages value. */ public List stages() { @@ -55,7 +59,7 @@ public List stages() { /** * Get the nodeImageSelection property: The node image upgrade specs for the update run. It is only set in update * run when `NodeImageSelection.type` is `Consistent`. - * + * * @return the nodeImageSelection value. */ public NodeImageSelectionStatus nodeImageSelection() { @@ -64,7 +68,7 @@ public NodeImageSelectionStatus nodeImageSelection() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java index 1ef2c287bf34e..10803acf61fff 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java @@ -11,11 +11,12 @@ /** * Defines the update sequence of the clusters via stages and groups. - * - *

Stages within a run are executed sequentially one after another. Groups within a stage are executed in parallel. + * + * Stages within a run are executed sequentially one after another. + * Groups within a stage are executed in parallel. * Member clusters within a group are updated sequentially one after another. - * - *

A valid strategy contains no duplicate groups within or across stages. + * + * A valid strategy contains no duplicate groups within or across stages. */ @Fluent public final class UpdateRunStrategy { @@ -25,13 +26,15 @@ public final class UpdateRunStrategy { @JsonProperty(value = "stages", required = true) private List stages; - /** Creates an instance of UpdateRunStrategy class. */ + /** + * Creates an instance of UpdateRunStrategy class. + */ public UpdateRunStrategy() { } /** * Get the stages property: The list of stages that compose this update run. Min size: 1. - * + * * @return the stages value. */ public List stages() { @@ -40,7 +43,7 @@ public List stages() { /** * Set the stages property: The list of stages that compose this update run. Min size: 1. - * + * * @param stages the stages value to set. * @return the UpdateRunStrategy object itself. */ @@ -51,14 +54,13 @@ public UpdateRunStrategy withStages(List stages) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (stages() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property stages in model UpdateRunStrategy")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property stages in model UpdateRunStrategy")); } else { stages().forEach(e -> e.validate()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java index 5b2a8ce713158..48340c2b07731 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of UpdateRuns. */ +/** + * Resource collection API of UpdateRuns. + */ public interface UpdateRuns { /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface UpdateRuns { /** * List UpdateRun resources by Fleet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface UpdateRuns { /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -47,12 +49,12 @@ public interface UpdateRuns { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a UpdateRun along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String fleetName, String updateRunName, Context context); + Response getWithResponse(String resourceGroupName, String fleetName, String updateRunName, + Context context); /** * Get a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -89,9 +91,40 @@ Response getWithResponse( */ void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response}. + */ + Response skipWithResponse(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch, Context context); + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a multi-stage process to perform update operations across members of a Fleet. + */ + UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); + /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -104,7 +137,7 @@ Response getWithResponse( /** * Starts an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -119,7 +152,7 @@ Response getWithResponse( /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -132,7 +165,7 @@ Response getWithResponse( /** * Stops an UpdateRun. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. @@ -147,7 +180,7 @@ Response getWithResponse( /** * Get a UpdateRun. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,7 +191,7 @@ Response getWithResponse( /** * Get a UpdateRun. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,7 +203,7 @@ Response getWithResponse( /** * Delete a UpdateRun. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,7 +213,7 @@ Response getWithResponse( /** * Delete a UpdateRun. - * + * * @param id the resource ID. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. @@ -192,7 +225,7 @@ Response getWithResponse( /** * Begins definition for a new UpdateRun resource. - * + * * @param name resource name. * @return the first stage of the new UpdateRun definition. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java index 33c74cd982875..2cfaac486a749 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java @@ -34,13 +34,15 @@ public final class UpdateStage { @JsonProperty(value = "afterStageWaitInSeconds") private Integer afterStageWaitInSeconds; - /** Creates an instance of UpdateStage class. */ + /** + * Creates an instance of UpdateStage class. + */ public UpdateStage() { } /** * Get the name property: The name of the stage. Must be unique within the UpdateRun. - * + * * @return the name value. */ public String name() { @@ -49,7 +51,7 @@ public String name() { /** * Set the name property: The name of the stage. Must be unique within the UpdateRun. - * + * * @param name the name value to set. * @return the UpdateStage object itself. */ @@ -61,7 +63,7 @@ public UpdateStage withName(String name) { /** * Get the groups property: Defines the groups to be executed in parallel in this stage. Duplicate groups are not * allowed. Min size: 1. - * + * * @return the groups value. */ public List groups() { @@ -71,7 +73,7 @@ public List groups() { /** * Set the groups property: Defines the groups to be executed in parallel in this stage. Duplicate groups are not * allowed. Min size: 1. - * + * * @param groups the groups value to set. * @return the UpdateStage object itself. */ @@ -83,7 +85,7 @@ public UpdateStage withGroups(List groups) { /** * Get the afterStageWaitInSeconds property: The time in seconds to wait at the end of this stage before starting * the next one. Defaults to 0 seconds if unspecified. - * + * * @return the afterStageWaitInSeconds value. */ public Integer afterStageWaitInSeconds() { @@ -93,7 +95,7 @@ public Integer afterStageWaitInSeconds() { /** * Set the afterStageWaitInSeconds property: The time in seconds to wait at the end of this stage before starting * the next one. Defaults to 0 seconds if unspecified. - * + * * @param afterStageWaitInSeconds the afterStageWaitInSeconds value to set. * @return the UpdateStage object itself. */ @@ -104,14 +106,13 @@ public UpdateStage withAfterStageWaitInSeconds(Integer afterStageWaitInSeconds) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model UpdateStage")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model UpdateStage")); } if (groups() != null) { groups().forEach(e -> e.validate()); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java index 10c448abfb119..4cfa58dc5e6cf 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The status of a UpdateStage. */ +/** + * The status of a UpdateStage. + */ @Immutable public final class UpdateStageStatus { /* @@ -35,13 +37,15 @@ public final class UpdateStageStatus { @JsonProperty(value = "afterStageWaitStatus", access = JsonProperty.Access.WRITE_ONLY) private WaitStatus afterStageWaitStatus; - /** Creates an instance of UpdateStageStatus class. */ + /** + * Creates an instance of UpdateStageStatus class. + */ public UpdateStageStatus() { } /** * Get the status property: The status of the UpdateStage. - * + * * @return the status value. */ public UpdateStatus status() { @@ -50,7 +54,7 @@ public UpdateStatus status() { /** * Get the name property: The name of the UpdateStage. - * + * * @return the name value. */ public String name() { @@ -59,7 +63,7 @@ public String name() { /** * Get the groups property: The list of groups to be updated as part of this UpdateStage. - * + * * @return the groups value. */ public List groups() { @@ -68,7 +72,7 @@ public List groups() { /** * Get the afterStageWaitStatus property: The status of the wait period configured on the UpdateStage. - * + * * @return the afterStageWaitStatus value. */ public WaitStatus afterStageWaitStatus() { @@ -77,7 +81,7 @@ public WaitStatus afterStageWaitStatus() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java index b5ad2b4034221..d244c1863125e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateState.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. */ +/** + * The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate. + */ public final class UpdateState extends ExpandableStringEnum { - /** Static value NotStarted for UpdateState. */ + /** + * Static value NotStarted for UpdateState. + */ public static final UpdateState NOT_STARTED = fromString("NotStarted"); - /** Static value Running for UpdateState. */ + /** + * Static value Running for UpdateState. + */ public static final UpdateState RUNNING = fromString("Running"); - /** Static value Stopping for UpdateState. */ + /** + * Static value Stopping for UpdateState. + */ public static final UpdateState STOPPING = fromString("Stopping"); - /** Static value Stopped for UpdateState. */ + /** + * Static value Stopped for UpdateState. + */ public static final UpdateState STOPPED = fromString("Stopped"); - /** Static value Skipped for UpdateState. */ + /** + * Static value Skipped for UpdateState. + */ public static final UpdateState SKIPPED = fromString("Skipped"); - /** Static value Failed for UpdateState. */ + /** + * Static value Failed for UpdateState. + */ public static final UpdateState FAILED = fromString("Failed"); - /** Static value Completed for UpdateState. */ + /** + * Static value Completed for UpdateState. + */ public static final UpdateState COMPLETED = fromString("Completed"); /** * Creates a new instance of UpdateState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public UpdateState() { /** * Creates or finds a UpdateState from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpdateState. */ @@ -53,7 +69,7 @@ public static UpdateState fromString(String name) { /** * Gets known UpdateState values. - * + * * @return known UpdateState values. */ public static Collection values() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java index 235ca7c4e4bc3..3ff4b9dcaa21c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The status for an operation or group of operations. */ +/** + * The status for an operation or group of operations. + */ @Immutable public final class UpdateStatus { /* @@ -36,13 +38,15 @@ public final class UpdateStatus { @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) private ManagementError error; - /** Creates an instance of UpdateStatus class. */ + /** + * Creates an instance of UpdateStatus class. + */ public UpdateStatus() { } /** * Get the startTime property: The time the operation or group was started. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -51,7 +55,7 @@ public OffsetDateTime startTime() { /** * Get the completedTime property: The time the operation or group was completed. - * + * * @return the completedTime value. */ public OffsetDateTime completedTime() { @@ -60,7 +64,7 @@ public OffsetDateTime completedTime() { /** * Get the state property: The State of the operation or group. - * + * * @return the state value. */ public UpdateState state() { @@ -69,7 +73,7 @@ public UpdateState state() { /** * Get the error property: The error details when a failure is encountered. - * + * * @return the error value. */ public ManagementError error() { @@ -78,7 +82,7 @@ public ManagementError error() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java index a85b9c11535f3..012fad385d42c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable public final class UserAssignedIdentity { /* @@ -23,13 +25,15 @@ public final class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java index b14a87b90d271..7fbf851648dac 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The status of the wait duration. */ +/** + * The status of the wait duration. + */ @Immutable public final class WaitStatus { /* @@ -22,13 +24,15 @@ public final class WaitStatus { @JsonProperty(value = "waitDurationInSeconds", access = JsonProperty.Access.WRITE_ONLY) private Integer waitDurationInSeconds; - /** Creates an instance of WaitStatus class. */ + /** + * Creates an instance of WaitStatus class. + */ public WaitStatus() { } /** * Get the status property: The status of the wait duration. - * + * * @return the status value. */ public UpdateStatus status() { @@ -37,7 +41,7 @@ public UpdateStatus status() { /** * Get the waitDurationInSeconds property: The wait duration configured in seconds. - * + * * @return the waitDurationInSeconds value. */ public Integer waitDurationInSeconds() { @@ -46,7 +50,7 @@ public Integer waitDurationInSeconds() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java index 5f551bce99579..04475e3b5b059 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java @@ -3,6 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager Client. + * Package containing the data models for ContainerServiceFleetManagementClient. + * Azure Kubernetes Fleet Manager Client. */ package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java index ef5484560ec85..5c2636bd7855d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager Client. */ +/** + * Package containing the classes for ContainerServiceFleetManagementClient. + * Azure Kubernetes Fleet Manager Client. + */ package com.azure.resourcemanager.containerservicefleet; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java index c0353bab55441..dbf25d5d5514f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java @@ -10,10 +10,7 @@ exports com.azure.resourcemanager.containerservicefleet.fluent.models; exports com.azure.resourcemanager.containerservicefleet.models; - opens com.azure.resourcemanager.containerservicefleet.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.containerservicefleet.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.containerservicefleet.fluent.models + to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.containerservicefleet.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json index 5fc41cdad40b0..289344143d6eb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json @@ -163,6 +163,16 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicefleet.models.SkipProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicefleet.models.SkipRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyListResult", "allDeclaredConstructors" : true, @@ -223,6 +233,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.containerservicefleet.models.TargetType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyProvisioningState", "allDeclaredConstructors" : true, diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java index c5945c6a8d333..2c0b6ba9b6cb2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetMembers Create. */ +/** + * Samples for FleetMembers Create. + */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Create.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void createsAFleetMemberResourceWithALongRunningOperation( com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleetMembers() - .define("member-1") - .withExistingFleet("rg1", "fleet1") - .withClusterResourceId( - "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1") + manager.fleetMembers().define("member-1").withExistingFleet("rg1", "fleet1").withClusterResourceId( + "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1") .create(); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java index 9ae0ce3239f6d..93ae24f396174 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetMembers Delete. */ +/** + * Samples for FleetMembers Delete. + */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Delete.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void deletesAFleetMemberResourceAsynchronouslyWithALongRunningOperation( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java index 8ff12b84e2326..88a1990fa6d0e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetMembers Get. */ +/** + * Samples for FleetMembers Get. + */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAFleetMemberResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + getsAFleetMemberResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetMembers().getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java index 157c8d82dc5ae..bae695c82856e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetMembers ListByFleet. */ +/** + * Samples for FleetMembers ListByFleet. + */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void listsTheMembersOfAFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + listsTheMembersOfAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleetMembers().listByFleet("rg1", "fleet1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java index 7797f84ee5351..028797faa56de 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java @@ -6,23 +6,24 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -/** Samples for FleetMembers Update. */ +/** + * Samples for FleetMembers Update. + */ public final class FleetMembersUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Update.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void updatesAFleetMemberResourceSynchronously( com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - FleetMember resource = - manager - .fleetMembers() - .getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE) - .getValue(); + FleetMember resource = manager.fleetMembers() + .getWithResponse("rg1", "fleet1", "member-1", com.azure.core.util.Context.NONE).getValue(); resource.update().withGroup("staging").apply(); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java index 1466d7521a85c..c707c7fcfab55 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java @@ -9,31 +9,25 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; import java.util.Arrays; -/** Samples for FleetUpdateStrategies CreateOrUpdate. */ +/** + * Samples for FleetUpdateStrategies CreateOrUpdate. + */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void createAFleetUpdateStrategy( com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleetUpdateStrategies() - .define("strartegy1") - .withExistingFleet("rg1", "fleet1") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("stage1") - .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))) - .withAfterStageWaitInSeconds(3600)))) + manager.fleetUpdateStrategies().define("strartegy1").withExistingFleet("rg1", "fleet1") + .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList(new UpdateStage().withName("stage1") + .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))).withAfterStageWaitInSeconds(3600)))) .create(); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java index d6748211361b0..6aea92c7b8c30 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetUpdateStrategies Delete. */ +/** + * Samples for FleetUpdateStrategies Delete. + */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Delete.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void deleteAFleetUpdateStrategyResource( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java index 3c228f6a7e799..7ad4537b83b9d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetUpdateStrategies Get. */ +/** + * Samples for FleetUpdateStrategies Get. + */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void getAFleetUpdateStrategyResource( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java index bf1b1631bb680..214fc48b10a8f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for FleetUpdateStrategies ListByFleet. */ +/** + * Samples for FleetUpdateStrategies ListByFleet. + */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listTheFleetUpdateStrategyResourcesByFleet( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java index a77d285564c0d..89cea370d77db 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java @@ -7,25 +7,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Fleets CreateOrUpdate. */ +/** + * Samples for Fleets CreateOrUpdate. + */ public final class FleetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void createsAFleetResourceWithALongRunningOperation( com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .fleets() - .define("fleet1") - .withRegion("East US") - .withExistingResourceGroup("rg1") - .withTags(mapOf("archv2", "", "tier", "production")) - .create(); + manager.fleets().define("fleet1").withRegion("East US").withExistingResourceGroup("rg1") + .withTags(mapOf("archv2", "", "tier", "production")).create(); } // Use "Map.of" if available diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java index e3f16ffc7284f..81128fb9686d4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Fleets Delete. */ +/** + * Samples for Fleets Delete. + */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Delete.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void deletesAFleetResourceAsynchronouslyWithALongRunningOperation( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java index 33970a49f5982..ab1c386e1ba86 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Fleets GetByResourceGroup. */ +/** + * Samples for Fleets GetByResourceGroup. + */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAFleetResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + getsAFleetResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.fleets().getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java index 9a76ead88a688..073afa52fa22d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Fleets ListByResourceGroup. */ +/** + * Samples for Fleets ListByResourceGroup. + */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listsTheFleetResourcesInAResourceGroup( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java index 0448fed785eee..ec17cb5c2bf90 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Fleets ListCredentials. */ +/** + * Samples for Fleets ListCredentials. + */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listsTheUserCredentialsOfAFleet( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java index 517bd9a38d80b..de44abb5b6328 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Fleets List. */ +/** + * Samples for Fleets List. + */ public final class FleetsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListBySub.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listsTheFleetResourcesInASubscription( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java index 15a5eabd0ce2c..59d641926aa84 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java @@ -8,23 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Fleets Update. */ +/** + * Samples for Fleets Update. + */ public final class FleetsUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void updateAFleet( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - Fleet resource = - manager - .fleets() - .getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE) - .getValue(); + public static void + updateAFleet(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + Fleet resource = manager.fleets() + .getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java index 053a5400e4f69..876f52b4761bc 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Operations_List.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/Operations_List.json */ /** * Sample code: List the operations for the provider. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listTheOperationsForTheProvider( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java index 8b00c50b172b6..a033949aa01d6 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateSamples.java @@ -14,40 +14,30 @@ import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; import java.util.Arrays; -/** Samples for UpdateRuns CreateOrUpdate. */ +/** + * Samples for UpdateRuns CreateOrUpdate. + */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void createAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { - manager - .updateRuns() - .define("run1") - .withExistingFleet("rg1", "fleet1") - .withUpdateStrategyId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("stage1") - .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))) - .withAfterStageWaitInSeconds(3600)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("1.26.1")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))) + public static void + createAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.updateRuns().define("run1").withExistingFleet("rg1", "fleet1").withUpdateStrategyId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1") + .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList(new UpdateStage().withName("stage1") + .withGroups(Arrays.asList(new UpdateGroup().withName("group-a"))).withAfterStageWaitInSeconds(3600)))) + .withManagedClusterUpdate(new ManagedClusterUpdate() + .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.FULL) + .withKubernetesVersion("1.26.1")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))) .create(); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java index 310c1e34f22f4..112c15d3527ee 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for UpdateRuns Delete. */ +/** + * Samples for UpdateRuns Delete. + */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Delete.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void deleteAnUpdateRunResource( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java index a7edeb525d0b3..1bb8791419032 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for UpdateRuns Get. */ +/** + * Samples for UpdateRuns Get. + */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void getsAnUpdateRunResource( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + getsAnUpdateRunResource(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().getWithResponse("rg1", "fleet1", "run1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java index 59770fe65bf85..796d1658f8c09 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for UpdateRuns ListByFleet. */ +/** + * Samples for UpdateRuns ListByFleet. + */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ public static void listsTheUpdateRunResourcesByFleet( diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java new file mode 100644 index 0000000000000..316522fc25ae0 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; +import com.azure.resourcemanager.containerservicefleet.models.SkipRequest; +import com.azure.resourcemanager.containerservicefleet.models.TargetType; +import java.util.Arrays; + +/** + * Samples for UpdateRuns Skip. + */ +public final class UpdateRunsSkipSamples { + /* + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_Skip.json + */ + /** + * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. + * + * @param manager Entry point to ContainerServiceFleetManager. + */ + public static void skipsOneOrMoreMemberGroupStageAfterStageWaitSOfAnUpdateRun( + com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + manager.updateRuns().skipWithResponse("rg1", "fleet1", "run1", + new SkipProperties() + .withTargets(Arrays.asList(new SkipRequest().withType(TargetType.MEMBER).withTarget("member-one"), + new SkipRequest().withType(TargetType.AFTER_STAGE_WAIT).withTarget("stage1"))), + null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java index 803cc431b3f12..a393ab62ae75e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for UpdateRuns Start. */ +/** + * Samples for UpdateRuns Start. + */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Start.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void startsAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + startsAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().start("rg1", "fleet1", "run1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java index df5398a5ae7f2..5ec0bcc0394dc 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.containerservicefleet.generated; -/** Samples for UpdateRuns Stop. */ +/** + * Samples for UpdateRuns Stop. + */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Stop.json + * x-ms-original-file: + * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-02-02-preview/ + * examples/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. - * + * * @param manager Entry point to ContainerServiceFleetManager. */ - public static void stopsAnUpdateRun( - com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { + public static void + stopsAnUpdateRun(com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager) { manager.updateRuns().stop("rg1", "fleet1", "run1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java deleted file mode 100644 index 9de3c3cde5e79..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java +++ /dev/null @@ -1,22 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult; - -public final class FleetCredentialResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetCredentialResult model = - BinaryData.fromString("{\"name\":\"cwrwclxxwrljdous\"}").toObject(FleetCredentialResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetCredentialResult model = new FleetCredentialResult(); - model = BinaryData.fromObject(model).toObject(FleetCredentialResult.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java deleted file mode 100644 index 8fa9b6503e301..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner; - -public final class FleetCredentialResultsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetCredentialResultsInner model = - BinaryData - .fromString( - "{\"kubeconfigs\":[{\"name\":\"zrnf\"},{\"name\":\"gispemvtzfkufubl\"},{\"name\":\"xqeofjaeqjhqjba\"},{\"name\":\"smjqulngsntnbyb\"}]}") - .toObject(FleetCredentialResultsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetCredentialResultsInner model = new FleetCredentialResultsInner(); - model = BinaryData.fromObject(model).toObject(FleetCredentialResultsInner.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java deleted file mode 100644 index 46bbb4236881a..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java +++ /dev/null @@ -1,63 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FleetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"yahux\",\"identity\":{\"principalId\":\"48b93e9a-a60d-4374-866b-4d9a5408bfef\",\"tenantId\":\"52d5831d-c94d-46dc-a950-efe27aeeb1d3\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"wixjsprozvcp\":{\"principalId\":\"7d60ab33-b486-48d5-9f2a-075f2d3ac743\",\"clientId\":\"7c35ec88-39a0-4221-973f-944e75b5b4bd\"},\"gjvw\":{\"principalId\":\"96708ed9-eb09-4b1e-ac4d-65dff51a2b39\",\"clientId\":\"8c62aaca-9b6c-405e-98af-af6a1b2d1f79\"},\"atscmd\":{\"principalId\":\"9c7c5434-74c3-413f-841a-866171cb60b2\",\"clientId\":\"07ca933c-45df-4202-9c1a-a483df4433d4\"}}},\"location\":\"jhulsuuvmkjo\",\"tags\":{\"ej\":\"wfndiodjpsl\",\"azakl\":\"pvwryoqpsoacc\"},\"id\":\"lahbcryff\",\"name\":\"fdosyg\",\"type\":\"xpaojakhmsbz\"}") - .toObject(FleetInner.class); - Assertions.assertEquals("jhulsuuvmkjo", model.location()); - Assertions.assertEquals("wfndiodjpsl", model.tags().get("ej")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetInner model = - new FleetInner() - .withLocation("jhulsuuvmkjo") - .withTags(mapOf("ej", "wfndiodjpsl", "azakl", "pvwryoqpsoacc")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "wixjsprozvcp", - new UserAssignedIdentity(), - "gjvw", - new UserAssignedIdentity(), - "atscmd", - new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(FleetInner.class); - Assertions.assertEquals("jhulsuuvmkjo", model.location()); - Assertions.assertEquals("wfndiodjpsl", model.tags().get("ej")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java deleted file mode 100644 index 5cf12706e0184..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java +++ /dev/null @@ -1,79 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetListResult; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FleetListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"hxqh\",\"identity\":{\"principalId\":\"7905b22f-a7c4-4e41-9660-2ad3f230564e\",\"tenantId\":\"925d87e8-cde8-4258-8ce8-a634b3901859\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"czbysc\":{\"principalId\":\"6376a01f-d82a-464d-8431-e81d6681ad2f\",\"clientId\":\"123d6c8b-8d17-491c-9783-d0937774c6b7\"},\"x\":{\"principalId\":\"e0dd2041-595a-4832-9be5-c47a8650d228\",\"clientId\":\"f992b98c-e21e-4d13-8349-43cccea29005\"},\"vyq\":{\"principalId\":\"7e08b218-312c-4897-a7cf-7b415b75bbea\",\"clientId\":\"e0a907dd-0834-4b3d-bdae-1e1b59c1f49d\"},\"b\":{\"principalId\":\"624f9e07-dd29-4d16-bfa1-49c7a1dfd5f0\",\"clientId\":\"1d061d6f-6249-409f-aea5-0efaca251d9b\"}}},\"location\":\"rkxvdum\",\"tags\":{\"snhsjcnyejhkryh\":\"tfwvukxgaudc\"},\"id\":\"napczwlokjy\",\"name\":\"mkkvnip\",\"type\":\"oxzjnchgejspod\"}],\"nextLink\":\"ilzyd\"}") - .toObject(FleetListResult.class); - Assertions.assertEquals("rkxvdum", model.value().get(0).location()); - Assertions.assertEquals("tfwvukxgaudc", model.value().get(0).tags().get("snhsjcnyejhkryh")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ilzyd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetListResult model = - new FleetListResult() - .withValue( - Arrays - .asList( - new FleetInner() - .withLocation("rkxvdum") - .withTags(mapOf("snhsjcnyejhkryh", "tfwvukxgaudc")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "czbysc", - new UserAssignedIdentity(), - "x", - new UserAssignedIdentity(), - "vyq", - new UserAssignedIdentity(), - "b", - new UserAssignedIdentity()))))) - .withNextLink("ilzyd"); - model = BinaryData.fromObject(model).toObject(FleetListResult.class); - Assertions.assertEquals("rkxvdum", model.value().get(0).location()); - Assertions.assertEquals("tfwvukxgaudc", model.value().get(0).tags().get("snhsjcnyejhkryh")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ilzyd", model.nextLink()); - } - - // Use "Map.of" if available - @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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java deleted file mode 100644 index a308dfb17d9aa..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java +++ /dev/null @@ -1,30 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberInner model = - BinaryData - .fromString( - "{\"properties\":{\"clusterResourceId\":\"olniwpwcukjf\",\"group\":\"iawxklry\",\"provisioningState\":\"Joining\"},\"eTag\":\"kbasyypn\",\"id\":\"hsgcbacphejkot\",\"name\":\"nqgoulzndli\",\"type\":\"wyqkgfgibm\"}") - .toObject(FleetMemberInner.class); - Assertions.assertEquals("olniwpwcukjf", model.clusterResourceId()); - Assertions.assertEquals("iawxklry", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberInner model = new FleetMemberInner().withClusterResourceId("olniwpwcukjf").withGroup("iawxklry"); - model = BinaryData.fromObject(model).toObject(FleetMemberInner.class); - Assertions.assertEquals("olniwpwcukjf", model.clusterResourceId()); - Assertions.assertEquals("iawxklry", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java deleted file mode 100644 index dc34d44a88058..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java +++ /dev/null @@ -1,41 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetMemberListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"kocrcjdkwtnhx\",\"group\":\"jbiksqrglssai\",\"provisioningState\":\"Leaving\"},\"eTag\":\"wnzlljfmppeeb\",\"id\":\"gxsabkyq\",\"name\":\"uujitcjc\",\"type\":\"dzevndhkrw\"},{\"properties\":{\"clusterResourceId\":\"appd\",\"group\":\"dkvwrwjfe\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"utjeltmrldhugj\",\"id\":\"datqxhocdgeabl\",\"name\":\"phut\",\"type\":\"cndvkaozwyiftyhx\"}],\"nextLink\":\"rokft\"}") - .toObject(FleetMemberListResult.class); - Assertions.assertEquals("kocrcjdkwtnhx", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("jbiksqrglssai", model.value().get(0).group()); - Assertions.assertEquals("rokft", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberListResult model = - new FleetMemberListResult() - .withValue( - Arrays - .asList( - new FleetMemberInner().withClusterResourceId("kocrcjdkwtnhx").withGroup("jbiksqrglssai"), - new FleetMemberInner().withClusterResourceId("appd").withGroup("dkvwrwjfe"))) - .withNextLink("rokft"); - model = BinaryData.fromObject(model).toObject(FleetMemberListResult.class); - Assertions.assertEquals("kocrcjdkwtnhx", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("jbiksqrglssai", model.value().get(0).group()); - Assertions.assertEquals("rokft", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java deleted file mode 100644 index f7524ec0fc661..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java +++ /dev/null @@ -1,29 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberProperties model = - BinaryData - .fromString("{\"clusterResourceId\":\"dgak\",\"group\":\"s\",\"provisioningState\":\"Updating\"}") - .toObject(FleetMemberProperties.class); - Assertions.assertEquals("dgak", model.clusterResourceId()); - Assertions.assertEquals("s", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberProperties model = new FleetMemberProperties().withClusterResourceId("dgak").withGroup("s"); - model = BinaryData.fromObject(model).toObject(FleetMemberProperties.class); - Assertions.assertEquals("dgak", model.clusterResourceId()); - Assertions.assertEquals("s", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java deleted file mode 100644 index 67237f961b32f..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberUpdateProperties model = - BinaryData.fromString("{\"group\":\"mmnkzsmodmgl\"}").toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("mmnkzsmodmgl", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("mmnkzsmodmgl"); - model = BinaryData.fromObject(model).toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("mmnkzsmodmgl", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java deleted file mode 100644 index 711b4fa7a67d5..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberUpdate model = - BinaryData.fromString("{\"properties\":{\"group\":\"qqedqytbciqfou\"}}").toObject(FleetMemberUpdate.class); - Assertions.assertEquals("qqedqytbciqfou", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberUpdate model = new FleetMemberUpdate().withGroup("qqedqytbciqfou"); - model = BinaryData.fromObject(model).toObject(FleetMemberUpdate.class); - Assertions.assertEquals("qqedqytbciqfou", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java deleted file mode 100644 index 78ae8baf9c397..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java +++ /dev/null @@ -1,76 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"clusterResourceId\":\"rsc\",\"group\":\"t\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"iwjmygtdssls\",\"id\":\"mweriofzpy\",\"name\":\"semwabnet\",\"type\":\"hhszh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetMember response = - manager - .fleetMembers() - .define("lqlfm") - .withExistingFleet("bgycduiertgccym", "aolps") - .withClusterResourceId("n") - .withGroup("glzpswiydm") - .withIfMatch("cblylpstdbhhxsr") - .withIfNoneMatch("dzu") - .create(); - - Assertions.assertEquals("rsc", response.clusterResourceId()); - Assertions.assertEquals("t", response.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java deleted file mode 100644 index 4f0f22e4931b8..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java +++ /dev/null @@ -1,61 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.fleetMembers().delete("l", "nayqi", "ynduha", "hqlkthumaqo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java deleted file mode 100644 index 773c6e4532c86..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"clusterResourceId\":\"exilzznfqqnvwpmq\",\"group\":\"ruoujmk\",\"provisioningState\":\"Updating\"},\"eTag\":\"qytjrybnwjewgd\",\"id\":\"ervnaenqpehi\",\"name\":\"doy\",\"type\":\"mifthnzdnd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetMember response = - manager - .fleetMembers() - .getWithResponse("birx", "pybsrfbjfdtw", "sotftpvj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("exilzznfqqnvwpmq", response.clusterResourceId()); - Assertions.assertEquals("ruoujmk", response.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java deleted file mode 100644 index a32cd1de91aeb..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java +++ /dev/null @@ -1,69 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"hsfxoblytkb\",\"group\":\"pe\",\"provisioningState\":\"Canceled\"},\"eTag\":\"bkrvrnsvshqj\",\"id\":\"xc\",\"name\":\"sbfov\",\"type\":\"srruvwbhsqfsubcg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleetMembers().listByFleet("qtdo", "mcbxvwvxysl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hsfxoblytkb", response.iterator().next().clusterResourceId()); - Assertions.assertEquals("pe", response.iterator().next().group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java deleted file mode 100644 index d9be219c05db3..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java +++ /dev/null @@ -1,60 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FleetPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetPatch model = - BinaryData - .fromString( - "{\"tags\":{\"np\":\"xjtfelluwfzit\",\"lxofpdvhpfxxypin\":\"qfpjk\"},\"identity\":{\"principalId\":\"7c7b323d-6cc4-40f6-af72-a4c007ef749c\",\"tenantId\":\"8997fe17-381d-420f-9816-bf994fa2830f\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"bkpodepooginuv\":{\"principalId\":\"42219f64-5b58-4ce7-9e37-cf944b2955f5\",\"clientId\":\"e80cc306-287c-46f7-b0b8-207a4f05a4a4\"},\"heognarxzxtheo\":{\"principalId\":\"ed898b90-21b1-48ad-8072-be40d6a0298f\",\"clientId\":\"3564b3dc-d9a6-471d-a070-2bda3b6f14cb\"},\"ivyevcciqihnhun\":{\"principalId\":\"bd8b7337-8cd7-492d-8abf-fe0860e34e72\",\"clientId\":\"19ffc4f5-d2ca-4a82-b5b7-0b9781597552\"}}}}") - .toObject(FleetPatch.class); - Assertions.assertEquals("xjtfelluwfzit", model.tags().get("np")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetPatch model = - new FleetPatch() - .withTags(mapOf("np", "xjtfelluwfzit", "lxofpdvhpfxxypin", "qfpjk")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "bkpodepooginuv", - new UserAssignedIdentity(), - "heognarxzxtheo", - new UserAssignedIdentity(), - "ivyevcciqihnhun", - new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(FleetPatch.class); - Assertions.assertEquals("xjtfelluwfzit", model.tags().get("np")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java deleted file mode 100644 index a1653f8269379..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java +++ /dev/null @@ -1,22 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties; - -public final class FleetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetProperties model = - BinaryData.fromString("{\"provisioningState\":\"Deleting\"}").toObject(FleetProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetProperties model = new FleetProperties(); - model = BinaryData.fromObject(model).toObject(FleetProperties.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java deleted file mode 100644 index fa562e34375ff..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,93 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"mrv\",\"groups\":[{\"name\":\"tvb\"},{\"name\":\"qgsfraoyzkoow\"},{\"name\":\"lmnguxaw\"}],\"afterStageWaitInSeconds\":1823569828},{\"name\":\"dsyuuximerqfob\",\"groups\":[{\"name\":\"nkbykutwpfhp\"},{\"name\":\"gmhrskdsnfdsdoak\"},{\"name\":\"tdlmkkzevd\"},{\"name\":\"hewpusdsttwv\"}],\"afterStageWaitInSeconds\":221713689}]}},\"eTag\":\"bejdcn\",\"id\":\"qmoa\",\"name\":\"ufgmjzrwrdg\",\"type\":\"twaenuuzko\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetUpdateStrategy response = - manager - .fleetUpdateStrategies() - .define("jcntuj") - .withExistingFleet("tpuqujmq", "gkfbtndoaong") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("df") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("ae"), - new UpdateGroup().withName("kojvd"), - new UpdateGroup().withName("pzfoqoui"))) - .withAfterStageWaitInSeconds(1370358053)))) - .withIfMatch("khazxkhnzbonlwn") - .withIfNoneMatch("oegokdwbwh") - .create(); - - Assertions.assertEquals("mrv", response.strategy().stages().get(0).name()); - Assertions.assertEquals("tvb", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1823569828, response.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java deleted file mode 100644 index 2fc24085f7e32..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java +++ /dev/null @@ -1,63 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .fleetUpdateStrategies() - .delete("sgsahmkycgr", "uwjuetaeburuvdmo", "s", "zlxwabmqoefkifr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java deleted file mode 100644 index cfe874ac30541..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"uukzclewyhmlw\",\"groups\":[{\"name\":\"tzpofncckwyfzq\"}],\"afterStageWaitInSeconds\":1576078570},{\"name\":\"xbuy\",\"groups\":[{\"name\":\"zfeqztppri\"}],\"afterStageWaitInSeconds\":2094175875},{\"name\":\"or\",\"groups\":[{\"name\":\"tolmncwsobqw\"}],\"afterStageWaitInSeconds\":1051180868},{\"name\":\"bnwdcfh\",\"groups\":[{\"name\":\"dpfuvg\"},{\"name\":\"sbjjc\"},{\"name\":\"nvxbvt\"},{\"name\":\"udutnco\"}],\"afterStageWaitInSeconds\":175295404}]}},\"eTag\":\"xqtvcofu\",\"id\":\"lvkgju\",\"name\":\"gdknnqv\",\"type\":\"aznqntoru\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetUpdateStrategy response = - manager - .fleetUpdateStrategies() - .getWithResponse("jnsjervtiagxsd", "zuempsbzkf", "beyvpnqicvinvkjj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uukzclewyhmlw", response.strategy().stages().get(0).name()); - Assertions.assertEquals("tzpofncckwyfzq", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1576078570, response.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java deleted file mode 100644 index 4943d03896acc..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java +++ /dev/null @@ -1,72 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"xoruzfgsquyfxrx\",\"groups\":[{\"name\":\"ptramxj\"},{\"name\":\"zwl\"}],\"afterStageWaitInSeconds\":2125136939},{\"name\":\"xuqlcvydypat\",\"groups\":[{\"name\":\"aojkniodk\"}],\"afterStageWaitInSeconds\":2101936696},{\"name\":\"bw\",\"groups\":[{\"name\":\"hemms\"},{\"name\":\"vdkcrodtj\"}],\"afterStageWaitInSeconds\":321367930}]}},\"eTag\":\"jlfltkacjvefkdlf\",\"id\":\"kggkfpa\",\"name\":\"ao\",\"type\":\"pulpqblylsyxk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleetUpdateStrategies().listByFleet("pdtii", "q", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xoruzfgsquyfxrx", response.iterator().next().strategy().stages().get(0).name()); - Assertions - .assertEquals("ptramxj", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions - .assertEquals(2125136939, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java deleted file mode 100644 index 1ab30ced2d9af..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java +++ /dev/null @@ -1,55 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"bniwdj\",\"groups\":[{\"name\":\"tsdbpgn\"}],\"afterStageWaitInSeconds\":862771413},{\"name\":\"x\",\"groups\":[{\"name\":\"xbzpfzab\"},{\"name\":\"lcuhxwtctyqiklb\"},{\"name\":\"ovplw\"}],\"afterStageWaitInSeconds\":869574502}]}},\"eTag\":\"gy\",\"id\":\"uosvmkfssxqukk\",\"name\":\"plgmgsxnk\",\"type\":\"zkd\"}") - .toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("bniwdj", model.strategy().stages().get(0).name()); - Assertions.assertEquals("tsdbpgn", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(862771413, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyInner model = - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("bniwdj") - .withGroups(Arrays.asList(new UpdateGroup().withName("tsdbpgn"))) - .withAfterStageWaitInSeconds(862771413), - new UpdateStage() - .withName("x") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("xbzpfzab"), - new UpdateGroup().withName("lcuhxwtctyqiklb"), - new UpdateGroup().withName("ovplw"))) - .withAfterStageWaitInSeconds(869574502)))); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("bniwdj", model.strategy().stages().get(0).name()); - Assertions.assertEquals("tsdbpgn", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(862771413, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java deleted file mode 100644 index 6374866ac908e..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java +++ /dev/null @@ -1,71 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyListResult; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"idokgjlj\"},{\"name\":\"oxgvclt\"},{\"name\":\"gsncghkjeszz\"},{\"name\":\"bijhtxfvgxbf\"}]}},\"eTag\":\"xnehmpvec\",\"id\":\"odebfqkkrbmpu\",\"name\":\"gr\",\"type\":\"wflzlfbxzpuzy\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"qzahmgkbrp\"},{\"name\":\"y\"},{\"name\":\"hibnuqqkpika\"},{\"name\":\"rgvtqag\"}]}},\"eTag\":\"uynhijg\",\"id\":\"ebf\",\"name\":\"iarbutrcvpna\",\"type\":\"zmhjrunmp\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"hrbnlankxmyskpbh\"}]}},\"eTag\":\"btkcxywnytnrsyn\",\"id\":\"idybyxczf\",\"name\":\"lhaaxdbabp\",\"type\":\"lwrq\"},{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"thsu\"},{\"name\":\"ocmnyyazttbtwwrq\"}]}},\"eTag\":\"edckzywbiexzfey\",\"id\":\"axibxujw\",\"name\":\"hqwa\",\"type\":\"muzyoxaepdk\"}],\"nextLink\":\"ancuxrhd\"}") - .toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("idokgjlj", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("ancuxrhd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyListResult model = - new FleetUpdateStrategyListResult() - .withValue( - Arrays - .asList( - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("idokgjlj"), - new UpdateStage().withName("oxgvclt"), - new UpdateStage().withName("gsncghkjeszz"), - new UpdateStage().withName("bijhtxfvgxbf")))), - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("qzahmgkbrp"), - new UpdateStage().withName("y"), - new UpdateStage().withName("hibnuqqkpika"), - new UpdateStage().withName("rgvtqag")))), - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages(Arrays.asList(new UpdateStage().withName("hrbnlankxmyskpbh")))), - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("thsu"), - new UpdateStage().withName("ocmnyyazttbtwwrq")))))) - .withNextLink("ancuxrhd"); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("idokgjlj", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("ancuxrhd", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java deleted file mode 100644 index 269f71a6c81a9..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java +++ /dev/null @@ -1,76 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyProperties; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"vlopwiyighx\",\"groups\":[{\"name\":\"wzbaiue\"},{\"name\":\"baumnyqupedeoj\"}],\"afterStageWaitInSeconds\":746279797},{\"name\":\"ckhsmtxpsieb\",\"groups\":[{\"name\":\"vpesapskrdqmhjjd\"},{\"name\":\"tldwkyzxuutk\"},{\"name\":\"cwscwsvlx\"},{\"name\":\"togt\"}],\"afterStageWaitInSeconds\":1309356083},{\"name\":\"pqsxvnmicy\",\"groups\":[{\"name\":\"eoveilovnotyf\"},{\"name\":\"fcnj\"},{\"name\":\"k\"}],\"afterStageWaitInSeconds\":74427835},{\"name\":\"dhbt\",\"groups\":[{\"name\":\"h\"},{\"name\":\"wpn\"}],\"afterStageWaitInSeconds\":224051014}]}}") - .toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("vlopwiyighx", model.strategy().stages().get(0).name()); - Assertions.assertEquals("wzbaiue", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(746279797, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyProperties model = - new FleetUpdateStrategyProperties() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("vlopwiyighx") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("wzbaiue"), - new UpdateGroup().withName("baumnyqupedeoj"))) - .withAfterStageWaitInSeconds(746279797), - new UpdateStage() - .withName("ckhsmtxpsieb") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("vpesapskrdqmhjjd"), - new UpdateGroup().withName("tldwkyzxuutk"), - new UpdateGroup().withName("cwscwsvlx"), - new UpdateGroup().withName("togt"))) - .withAfterStageWaitInSeconds(1309356083), - new UpdateStage() - .withName("pqsxvnmicy") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("eoveilovnotyf"), - new UpdateGroup().withName("fcnj"), - new UpdateGroup().withName("k"))) - .withAfterStageWaitInSeconds(74427835), - new UpdateStage() - .withName("dhbt") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("h"), new UpdateGroup().withName("wpn"))) - .withAfterStageWaitInSeconds(224051014)))); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("vlopwiyighx", model.strategy().stages().get(0).name()); - Assertions.assertEquals("wzbaiue", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(746279797, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java deleted file mode 100644 index 1fa6684fa0839..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,105 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"pfqbuaceopzf\",\"identity\":{\"principalId\":\"6f8d4deb-091f-451f-b407-878050c84cbb\",\"tenantId\":\"b2b52fce-bfef-4e32-bbe0-b86ca40c27a9\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"pcqeqx\":{\"principalId\":\"ef0ae4f5-0316-44ab-9890-b6c8a7d67249\",\"clientId\":\"524f821f-a8bd-4386-ac62-e55bf5fa4c4a\"},\"dahzxctobg\":{\"principalId\":\"7bdba28c-f731-4206-8287-7929a6da43c9\",\"clientId\":\"767ffc43-0cf9-4dd6-898c-3fa9fe3c95a0\"}}},\"location\":\"dmoizpostmg\",\"tags\":{\"bpvjymjhx\":\"bunrmfqjhhk\",\"n\":\"j\",\"ivkrtsw\":\"u\"},\"id\":\"xqzvszjfa\",\"name\":\"vjfdx\",\"type\":\"ivetvtcq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Fleet response = - manager - .fleets() - .define("luu") - .withRegion("lyjpk") - .withExistingResourceGroup("ofd") - .withTags(mapOf("lixhnrztfol", "zyexzn", "dtpnapnyiropuhp", "bnxknalaulppg", "gqgitxmedjvcsl", "gvpgy")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "jsflhhcaalnjix", - new UserAssignedIdentity(), - "yaw", - new UserAssignedIdentity(), - "aq", - new UserAssignedIdentity()))) - .withIfMatch("t") - .withIfNoneMatch("oellwp") - .create(); - - Assertions.assertEquals("dmoizpostmg", response.location()); - Assertions.assertEquals("bunrmfqjhhk", response.tags().get("bpvjymjhx")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - } - - // Use "Map.of" if available - @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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java deleted file mode 100644 index f4937f634e6b6..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.fleets().delete("vawjvzunlu", "hnnpr", "xipeilpjzuaejx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 6f83738717869..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"rbpbewtghfgblcg\",\"identity\":{\"principalId\":\"f0f61d0f-c014-4564-89a6-7cff2137dcc6\",\"tenantId\":\"708ef820-279d-43de-b69b-94e9098ab075\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"kbegibt\":{\"principalId\":\"c9b19de9-9f16-4d40-be41-39ace52fb22e\",\"clientId\":\"8a366ebc-46dd-4883-9702-535eafc36190\"}}},\"location\":\"xiebwwaloayqcg\",\"tags\":{\"htxongmtsavjc\":\"zjuzgwyz\",\"rknftguvriuhprwm\":\"pwxqp\",\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\"},\"id\":\"qsgzvahapj\",\"name\":\"zhpvgqzcjrvxd\",\"type\":\"zlmwlxkvugfhz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Fleet response = - manager - .fleets() - .getByResourceGroupWithResponse("lupj", "khfxobbcswsrt", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xiebwwaloayqcg", response.location()); - Assertions.assertEquals("zjuzgwyz", response.tags().get("htxongmtsavjc")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java deleted file mode 100644 index f955659a3ef8f..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java +++ /dev/null @@ -1,74 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"eTag\":\"zlfmisgwbnbbeld\",\"identity\":{\"principalId\":\"83f502da-cc13-4c3c-a5f4-64dd46a21f4c\",\"tenantId\":\"383d5bb3-f707-4d72-b03b-c4aebce90071\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"urqhaka\":{\"principalId\":\"9a0d63cc-7bed-40d2-bbce-f570c0834930\",\"clientId\":\"ccd9d344-63dd-4c3c-b404-0bd25fb86597\"},\"shsfwxosowzxcu\":{\"principalId\":\"3e149389-ebec-4320-9c72-bf632ad8069c\",\"clientId\":\"0059c334-1340-4c1e-837f-0f54b9ea7748\"},\"jooxdjebw\":{\"principalId\":\"eae88e80-f635-48ee-926a-933f0d9c5fda\",\"clientId\":\"39262479-a2bd-4386-93af-590ba9c88c14\"}}},\"location\":\"cwwfvovbvme\",\"tags\":{\"iotwmcdytdxwit\":\"ivyhzceuojgjrwju\",\"hniskxfbkpyc\":\"nrjawgqwg\",\"l\":\"klwndnhjdauwhv\"},\"id\":\"zbtd\",\"name\":\"xujznbmpowu\",\"type\":\"przqlveu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleets().listByResourceGroup("rcrgvx", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cwwfvovbvme", response.iterator().next().location()); - Assertions.assertEquals("ivyhzceuojgjrwju", response.iterator().next().tags().get("iotwmcdytdxwit")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java deleted file mode 100644 index c8a52281d8784..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java +++ /dev/null @@ -1,66 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListCredentialsWithResponseMockTests { - @Test - public void testListCredentialsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"kubeconfigs\":[{\"name\":\"pwo\"},{\"name\":\"kfpbs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetCredentialResults response = - manager - .fleets() - .listCredentialsWithResponse("ultskzbbtdz", "mv", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java deleted file mode 100644 index 03fd9781f8b5a..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java +++ /dev/null @@ -1,73 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"ocqxtccmg\",\"identity\":{\"principalId\":\"6e86e448-f36b-44ad-9f84-29f581e02083\",\"tenantId\":\"bbbfe47a-5f2c-421c-b795-19f68e56e261\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"yrxvwfudwpznt\":{\"principalId\":\"db6eaaca-046e-4ecf-91ea-fd19f88bf68c\",\"clientId\":\"5f1af6a8-7d33-4033-beec-d0fa07f93f88\"},\"zhlrqjb\":{\"principalId\":\"c280dbb2-1086-4371-83bf-0c745c2544ff\",\"clientId\":\"8adafffd-ac26-4e43-acef-4a1d3a424d6e\"}}},\"location\":\"kfrlhrxsbky\",\"tags\":{\"uzbpzkafku\":\"ca\",\"rnwb\":\"b\",\"hspkdeemao\":\"ehhseyvjusrts\",\"gkvtmelmqkrhah\":\"mx\"},\"id\":\"ljuahaquhcdh\",\"name\":\"duala\",\"type\":\"xqpvfadmw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.fleets().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kfrlhrxsbky", response.iterator().next().location()); - Assertions.assertEquals("ca", response.iterator().next().tags().get("uzbpzkafku")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java deleted file mode 100644 index 8c86b8f4e4824..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java +++ /dev/null @@ -1,42 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedClusterUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedClusterUpdate model = - BinaryData - .fromString( - "{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"zvdudgwdslfhotwm\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}}") - .toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("zvdudgwdslfhotwm", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.CONSISTENT, model.nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedClusterUpdate model = - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("zvdudgwdslfhotwm")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT)); - model = BinaryData.fromObject(model).toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("zvdudgwdslfhotwm", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.CONSISTENT, model.nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java deleted file mode 100644 index 167d67ab42b2c..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java +++ /dev/null @@ -1,33 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedClusterUpgradeSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedClusterUpgradeSpec model = - BinaryData - .fromString("{\"type\":\"Full\",\"kubernetesVersion\":\"lbjnpgacftadehx\"}") - .toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.type()); - Assertions.assertEquals("lbjnpgacftadehx", model.kubernetesVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedClusterUpgradeSpec model = - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("lbjnpgacftadehx"); - model = BinaryData.fromObject(model).toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.type()); - Assertions.assertEquals("lbjnpgacftadehx", model.kubernetesVersion()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 96e361ae0cb81..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,54 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"46b00aa9-c8c5-48ff-a912-c81a7c245ceb\",\"tenantId\":\"2e179f43-481b-40b6-a595-882ec7a78df2\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lxaolthqtrgqjbp\":{\"principalId\":\"bab157b0-9d48-42ad-9546-94abf766df88\",\"clientId\":\"22ca2105-bc76-4f29-983b-1478cf7ee621\"},\"s\":{\"principalId\":\"39d569fd-83de-4f32-87ec-d1416e0b2b72\",\"clientId\":\"c1511ef2-1afc-456e-81bb-694f9f64e307\"},\"gvfcj\":{\"principalId\":\"c9a4fdd8-bb2a-4737-8def-7f0f2c89777f\",\"clientId\":\"435c6337-37a2-486a-aae0-bdb58d06a86c\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "lxaolthqtrgqjbp", - new UserAssignedIdentity(), - "s", - new UserAssignedIdentity(), - "gvfcj", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java deleted file mode 100644 index c4153566483dd..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.MemberUpdateStatus; - -public final class MemberUpdateStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MemberUpdateStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-09-15T09:48:55Z\",\"completedTime\":\"2021-10-30T19:28:33Z\",\"state\":\"Stopped\"},\"name\":\"rmjmwvvjektc\",\"clusterResourceId\":\"enhwlrs\",\"operationId\":\"rzpwvlqdqgbiq\",\"message\":\"ihkaetcktvfc\"}") - .toObject(MemberUpdateStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MemberUpdateStatus model = new MemberUpdateStatus(); - model = BinaryData.fromObject(model).toObject(MemberUpdateStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java deleted file mode 100644 index f586cbae8077d..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionStatus; - -public final class NodeImageSelectionStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageSelectionStatus model = - BinaryData - .fromString( - "{\"selectedNodeImageVersions\":[{\"version\":\"fbebrjcxer\"},{\"version\":\"wutttxfvjrbi\"},{\"version\":\"hxepcyvahfnlj\"}]}") - .toObject(NodeImageSelectionStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageSelectionStatus model = new NodeImageSelectionStatus(); - model = BinaryData.fromObject(model).toObject(NodeImageSelectionStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java deleted file mode 100644 index da7e9454c87d0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import org.junit.jupiter.api.Assertions; - -public final class NodeImageSelectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageSelection model = BinaryData.fromString("{\"type\":\"Latest\"}").toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageSelection model = new NodeImageSelection().withType(NodeImageSelectionType.LATEST); - model = BinaryData.fromObject(model).toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java deleted file mode 100644 index 817db6a1633d1..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java +++ /dev/null @@ -1,21 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageVersion; - -public final class NodeImageVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageVersion model = BinaryData.fromString("{\"version\":\"qxj\"}").toObject(NodeImageVersion.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageVersion model = new NodeImageVersion(); - model = BinaryData.fromObject(model).toObject(NodeImageVersion.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java deleted file mode 100644 index cc1ab10f373b8..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java deleted file mode 100644 index 2d40cb2bb10bd..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner; -import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java deleted file mode 100644 index 594e5268f00f9..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java deleted file mode 100644 index a8fb4b55cb9d5..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"qnermclfplphoxu\",\"isDataAction\":false,\"display\":{\"provider\":\"bgyepsbj\",\"resource\":\"zq\",\"operation\":\"xywpmueefjzwfqkq\",\"description\":\"ids\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java deleted file mode 100644 index 7da3ca7f3819d..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroupStatus; - -public final class UpdateGroupStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateGroupStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-07-28T01:41:30Z\",\"completedTime\":\"2021-02-08T16:35:38Z\",\"state\":\"NotStarted\"},\"name\":\"alpbuxwgipwhon\",\"members\":[{\"status\":{\"startTime\":\"2021-09-21T08:55:02Z\",\"completedTime\":\"2021-05-17T00:15:40Z\",\"state\":\"Completed\"},\"name\":\"zbinjeputtm\",\"clusterResourceId\":\"wnuzoqftiyqzrnkc\",\"operationId\":\"yx\",\"message\":\"hzls\"},{\"status\":{\"startTime\":\"2021-12-09T22:32:32Z\",\"completedTime\":\"2021-07-18T20:53:58Z\",\"state\":\"Completed\"},\"name\":\"lryav\",\"clusterResourceId\":\"heun\",\"operationId\":\"qhgyxzkonocukok\",\"message\":\"axuconuq\"}]}") - .toObject(UpdateGroupStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateGroupStatus model = new UpdateGroupStatus(); - model = BinaryData.fromObject(model).toObject(UpdateGroupStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java deleted file mode 100644 index 61f0a5139a796..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java +++ /dev/null @@ -1,24 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import org.junit.jupiter.api.Assertions; - -public final class UpdateGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateGroup model = BinaryData.fromString("{\"name\":\"e\"}").toObject(UpdateGroup.class); - Assertions.assertEquals("e", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateGroup model = new UpdateGroup().withName("e"); - model = BinaryData.fromObject(model).toObject(UpdateGroup.class); - Assertions.assertEquals("e", model.name()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java deleted file mode 100644 index a975a75dd3f25..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java +++ /dev/null @@ -1,88 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"jeiachboosfl\",\"strategy\":{\"stages\":[{\"name\":\"sfqpteehz\",\"groups\":[{\"name\":\"pyqr\"},{\"name\":\"mzinpvswjdk\"},{\"name\":\"rsoodqxhcrmnoh\"}],\"afterStageWaitInSeconds\":1543175438},{\"name\":\"kwh\",\"groups\":[{\"name\":\"ifiyipjxsqwpgrj\"},{\"name\":\"znorcj\"},{\"name\":\"vsnb\"},{\"name\":\"xqabnmocpcysh\"}],\"afterStageWaitInSeconds\":818060655},{\"name\":\"afbljjgpbtoqcjmk\",\"groups\":[{\"name\":\"vbqid\"}],\"afterStageWaitInSeconds\":1381464845}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"yulpkudjkr\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-09-13T05:12:15Z\",\"completedTime\":\"2021-02-23T09:32:58Z\",\"state\":\"Stopped\"},\"stages\":[{\"status\":{\"startTime\":\"2021-08-17T01:01:15Z\",\"completedTime\":\"2021-05-08T18:49:34Z\",\"state\":\"Failed\"},\"name\":\"aierhhb\",\"groups\":[{}],\"afterStageWaitStatus\":{\"status\":{},\"waitDurationInSeconds\":1936652093}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"aodxo\"},{\"version\":\"bdxkqpxokaj\"},{\"version\":\"npime\"}]}}},\"eTag\":\"stxgc\",\"id\":\"dg\",\"name\":\"aajrm\",\"type\":\"djwzrlov\"}") - .toObject(UpdateRunInner.class); - Assertions.assertEquals("jeiachboosfl", model.updateStrategyId()); - Assertions.assertEquals("sfqpteehz", model.strategy().stages().get(0).name()); - Assertions.assertEquals("pyqr", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1543175438, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("yulpkudjkr", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunInner model = - new UpdateRunInner() - .withUpdateStrategyId("jeiachboosfl") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("sfqpteehz") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("pyqr"), - new UpdateGroup().withName("mzinpvswjdk"), - new UpdateGroup().withName("rsoodqxhcrmnoh"))) - .withAfterStageWaitInSeconds(1543175438), - new UpdateStage() - .withName("kwh") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("ifiyipjxsqwpgrj"), - new UpdateGroup().withName("znorcj"), - new UpdateGroup().withName("vsnb"), - new UpdateGroup().withName("xqabnmocpcysh"))) - .withAfterStageWaitInSeconds(818060655), - new UpdateStage() - .withName("afbljjgpbtoqcjmk") - .withGroups(Arrays.asList(new UpdateGroup().withName("vbqid"))) - .withAfterStageWaitInSeconds(1381464845)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("yulpkudjkr")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))); - model = BinaryData.fromObject(model).toObject(UpdateRunInner.class); - Assertions.assertEquals("jeiachboosfl", model.updateStrategyId()); - Assertions.assertEquals("sfqpteehz", model.strategy().stages().get(0).name()); - Assertions.assertEquals("pyqr", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1543175438, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("yulpkudjkr", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java deleted file mode 100644 index f809fdd3104dc..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java +++ /dev/null @@ -1,90 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"wtmutduq\",\"strategy\":{\"stages\":[{\"name\":\"pspwgcuertu\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"o\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-10-25T23:23:25Z\",\"completedTime\":\"2021-11-07T14:56:07Z\",\"state\":\"Skipped\"},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"mbe\",\"id\":\"pbhtqqrolfpfpsa\",\"name\":\"gbquxigj\",\"type\":\"jgzjaoyfhrtx\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"kujysvlejuvfq\",\"strategy\":{\"stages\":[{\"name\":\"lyxwjkcprbnwbx\"},{\"name\":\"jvtbvpyss\"},{\"name\":\"dnrujqguhmuouqfp\"},{\"name\":\"wzwbnguitn\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"zga\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-07-01T16:43:11Z\",\"completedTime\":\"2021-03-02T10:41:40Z\",\"state\":\"Completed\"},\"stages\":[{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"vzwdzuhtymwis\",\"id\":\"fthwxmnteiwa\",\"name\":\"pvkmijcmmxdcuf\",\"type\":\"fsrpymzidnse\"}],\"nextLink\":\"xtbzsgfyccsne\"}") - .toObject(UpdateRunListResult.class); - Assertions.assertEquals("wtmutduq", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("pspwgcuertu", model.value().get(0).strategy().stages().get(0).name()); - Assertions - .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("o", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.LATEST, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("xtbzsgfyccsne", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunListResult model = - new UpdateRunListResult() - .withValue( - Arrays - .asList( - new UpdateRunInner() - .withUpdateStrategyId("wtmutduq") - .withStrategy( - new UpdateRunStrategy() - .withStages(Arrays.asList(new UpdateStage().withName("pspwgcuertu")))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("o")) - .withNodeImageSelection( - new NodeImageSelection().withType(NodeImageSelectionType.LATEST))), - new UpdateRunInner() - .withUpdateStrategyId("kujysvlejuvfq") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("lyxwjkcprbnwbx"), - new UpdateStage().withName("jvtbvpyss"), - new UpdateStage().withName("dnrujqguhmuouqfp"), - new UpdateStage().withName("wzwbnguitn")))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("zga")) - .withNodeImageSelection( - new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))))) - .withNextLink("xtbzsgfyccsne"); - model = BinaryData.fromObject(model).toObject(UpdateRunListResult.class); - Assertions.assertEquals("wtmutduq", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("pspwgcuertu", model.value().get(0).strategy().stages().get(0).name()); - Assertions - .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("o", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.LATEST, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("xtbzsgfyccsne", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java deleted file mode 100644 index 2957df9fe07f0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java +++ /dev/null @@ -1,85 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunProperties; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"hijco\",\"strategy\":{\"stages\":[{\"name\":\"tbzaqsqsycbkbfk\",\"groups\":[{\"name\":\"dkexxppofm\"},{\"name\":\"axcfjpgddtocjjx\"}],\"afterStageWaitInSeconds\":256483207},{\"name\":\"mouexhdzx\",\"groups\":[{\"name\":\"eojnxqbzvddn\"},{\"name\":\"wndeicbtwnp\"},{\"name\":\"aoqvuh\"},{\"name\":\"hcffcyddglmjthjq\"}],\"afterStageWaitInSeconds\":1616692109}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"icxm\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-16T07:23:11Z\",\"completedTime\":\"2021-01-23T19:42:32Z\",\"state\":\"Failed\"},\"stages\":[{\"status\":{\"startTime\":\"2021-10-15T18:56:51Z\",\"completedTime\":\"2021-07-11T21:12:55Z\",\"state\":\"Stopping\"},\"name\":\"ghmewuam\",\"groups\":[{\"status\":{},\"name\":\"ayvvtpgvdf\",\"members\":[{},{},{},{}]},{\"status\":{},\"name\":\"ftutqxlngxlefgu\",\"members\":[{},{}]},{\"status\":{},\"name\":\"xdqmidtthzrvqdra\",\"members\":[{},{}]},{\"status\":{},\"name\":\"igeho\",\"members\":[{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-05-06T05:02:34Z\",\"completedTime\":\"2021-06-06T10:47:48Z\",\"state\":\"NotStarted\"},\"waitDurationInSeconds\":1440760803}},{\"status\":{\"startTime\":\"2021-11-18T14:42:14Z\",\"completedTime\":\"2021-06-25T19:06:32Z\",\"state\":\"Completed\"},\"name\":\"gndrvynh\",\"groups\":[{\"status\":{},\"name\":\"rcgyn\",\"members\":[{},{},{},{}]},{\"status\":{},\"name\":\"cfvmmco\",\"members\":[{},{},{}]},{\"status\":{},\"name\":\"zevgb\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-06-25T22:17:23Z\",\"completedTime\":\"2021-02-17T22:01:44Z\",\"state\":\"Stopping\"},\"waitDurationInSeconds\":61418624}},{\"status\":{\"startTime\":\"2021-08-01T19:05:37Z\",\"completedTime\":\"2021-08-04T02:49:11Z\",\"state\":\"Completed\"},\"name\":\"fnba\",\"groups\":[{\"status\":{},\"name\":\"l\",\"members\":[{}]},{\"status\":{},\"name\":\"qgtz\",\"members\":[{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-09-22T23:33:27Z\",\"completedTime\":\"2021-03-31T09:09:52Z\",\"state\":\"Running\"},\"waitDurationInSeconds\":1251275830}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"wsubisnja\"},{\"version\":\"mngnzscxaqw\"},{\"version\":\"chcbonqvpkvlrxnj\"}]}}}") - .toObject(UpdateRunProperties.class); - Assertions.assertEquals("hijco", model.updateStrategyId()); - Assertions.assertEquals("tbzaqsqsycbkbfk", model.strategy().stages().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(256483207, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("icxm", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunProperties model = - new UpdateRunProperties() - .withUpdateStrategyId("hijco") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("tbzaqsqsycbkbfk") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("dkexxppofm"), - new UpdateGroup().withName("axcfjpgddtocjjx"))) - .withAfterStageWaitInSeconds(256483207), - new UpdateStage() - .withName("mouexhdzx") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("eojnxqbzvddn"), - new UpdateGroup().withName("wndeicbtwnp"), - new UpdateGroup().withName("aoqvuh"), - new UpdateGroup().withName("hcffcyddglmjthjq"))) - .withAfterStageWaitInSeconds(1616692109)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("icxm")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))); - model = BinaryData.fromObject(model).toObject(UpdateRunProperties.class); - Assertions.assertEquals("hijco", model.updateStrategyId()); - Assertions.assertEquals("tbzaqsqsycbkbfk", model.strategy().stages().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(256483207, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("icxm", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStatusTests.java deleted file mode 100644 index 1ce072b46015a..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus; - -public final class UpdateRunStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-09-23T10:25:08Z\",\"completedTime\":\"2021-11-02T18:56:54Z\",\"state\":\"Running\"},\"stages\":[{\"status\":{\"startTime\":\"2021-07-30T18:07:02Z\",\"completedTime\":\"2021-05-09T04:26:37Z\",\"state\":\"Running\"},\"name\":\"avo\",\"groups\":[{\"status\":{\"startTime\":\"2021-02-20T04:22:30Z\",\"completedTime\":\"2021-07-20T12:25:55Z\",\"state\":\"NotStarted\"},\"name\":\"udwxdndnvowguj\",\"members\":[{},{},{}]},{\"status\":{\"startTime\":\"2021-09-16T14:46:13Z\",\"completedTime\":\"2021-03-07T18:06:24Z\",\"state\":\"Running\"},\"name\":\"azjdyggd\",\"members\":[{},{},{},{}]},{\"status\":{\"startTime\":\"2021-08-21T20:33:35Z\",\"completedTime\":\"2021-11-28T10:21:02Z\",\"state\":\"Failed\"},\"name\":\"e\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-08-01T10:52:51Z\",\"completedTime\":\"2021-11-13T11:48:47Z\",\"state\":\"NotStarted\"},\"waitDurationInSeconds\":1642733206}},{\"status\":{\"startTime\":\"2021-04-10T19:11:58Z\",\"completedTime\":\"2021-05-17T05:51:50Z\",\"state\":\"NotStarted\"},\"name\":\"dcsi\",\"groups\":[{\"status\":{\"startTime\":\"2021-09-16T11:40:44Z\",\"completedTime\":\"2021-01-18T12:32:24Z\",\"state\":\"Stopped\"},\"name\":\"hfiqscjeypvhe\",\"members\":[{},{},{}]},{\"status\":{\"startTime\":\"2021-02-23T09:11:36Z\",\"completedTime\":\"2021-10-29T01:56:30Z\",\"state\":\"NotStarted\"},\"name\":\"vgmkqsleyyvxyqjp\",\"members\":[{},{},{},{}]},{\"status\":{\"startTime\":\"2020-12-22T00:41:57Z\",\"completedTime\":\"2021-06-23T11:42:04Z\",\"state\":\"Skipped\"},\"name\":\"zsqpjhvmdajvny\",\"members\":[{},{},{}]},{\"status\":{\"startTime\":\"2021-08-25T21:25:46Z\",\"completedTime\":\"2021-07-16T12:10:28Z\",\"state\":\"Stopping\"},\"name\":\"upfh\",\"members\":[{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-09-24T18:03:45Z\",\"completedTime\":\"2021-02-02T14:05:53Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":557848148}},{\"status\":{\"startTime\":\"2021-01-26T22:18Z\",\"completedTime\":\"2021-09-23T02:42:43Z\",\"state\":\"NotStarted\"},\"name\":\"aodsfcpkv\",\"groups\":[{\"status\":{\"startTime\":\"2021-06-07T12:26:40Z\",\"completedTime\":\"2021-05-26T02:59:13Z\",\"state\":\"NotStarted\"},\"name\":\"agfuaxbezyiu\",\"members\":[{}]},{\"status\":{\"startTime\":\"2021-06-08T13:35Z\",\"completedTime\":\"2021-07-25T13:50:11Z\",\"state\":\"Skipped\"},\"name\":\"wqsmbsur\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-03-09T16:39:27Z\",\"completedTime\":\"2021-08-24T09:58:36Z\",\"state\":\"Completed\"},\"waitDurationInSeconds\":57544677}},{\"status\":{\"startTime\":\"2021-06-13T04:15:30Z\",\"completedTime\":\"2021-01-31T18:49:05Z\",\"state\":\"Completed\"},\"name\":\"iuxhqyudxorr\",\"groups\":[{\"status\":{\"startTime\":\"2021-05-11T11:35:52Z\",\"completedTime\":\"2021-07-04T22:05:57Z\",\"state\":\"Stopped\"},\"name\":\"rvkdvjsllrm\",\"members\":[{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-12-05T03:26:34Z\",\"completedTime\":\"2021-07-14T20:07:14Z\",\"state\":\"Failed\"},\"waitDurationInSeconds\":63177450}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"zwtruwiqzbqjvsov\"}]}}") - .toObject(UpdateRunStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunStatus model = new UpdateRunStatus(); - model = BinaryData.fromObject(model).toObject(UpdateRunStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java deleted file mode 100644 index 772f90f60b5b4..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java +++ /dev/null @@ -1,47 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunStrategyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunStrategy model = - BinaryData - .fromString( - "{\"stages\":[{\"name\":\"seiphe\",\"groups\":[{\"name\":\"okeyyienj\"},{\"name\":\"dlwtgrhpdj\"}],\"afterStageWaitInSeconds\":523400535}]}") - .toObject(UpdateRunStrategy.class); - Assertions.assertEquals("seiphe", model.stages().get(0).name()); - Assertions.assertEquals("okeyyienj", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(523400535, model.stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunStrategy model = - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("seiphe") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("okeyyienj"), - new UpdateGroup().withName("dlwtgrhpdj"))) - .withAfterStageWaitInSeconds(523400535))); - model = BinaryData.fromObject(model).toObject(UpdateRunStrategy.class); - Assertions.assertEquals("seiphe", model.stages().get(0).name()); - Assertions.assertEquals("okeyyienj", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(523400535, model.stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java deleted file mode 100644 index e47d88451831a..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,115 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"qumiek\",\"strategy\":{\"stages\":[{\"name\":\"zikhl\",\"groups\":[{\"name\":\"hdgqggeb\"},{\"name\":\"unygaeqid\"},{\"name\":\"qfatpxllrxcyjm\"},{\"name\":\"a\"}],\"afterStageWaitInSeconds\":1120671201},{\"name\":\"varmywdmj\",\"groups\":[{\"name\":\"bjhhyx\"}],\"afterStageWaitInSeconds\":1337445939},{\"name\":\"lyc\",\"groups\":[{\"name\":\"hp\"},{\"name\":\"xkgymareqnajxqu\"},{\"name\":\"jhkycub\"}],\"afterStageWaitInSeconds\":1237082530}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"sofwqmzqalkrmnji\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-03-03T15:53:26Z\",\"completedTime\":\"2021-05-14T23:31:40Z\",\"state\":\"Skipped\"},\"stages\":[{\"status\":{},\"name\":\"aabjyvayffimrz\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"gsexne\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"wmewzsyy\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"judpfrxt\",\"id\":\"hzv\",\"name\":\"ytdw\",\"type\":\"qbrqubpaxhexiili\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .define("ivgvvcna") - .withExistingFleet("kallatmel", "uipiccjzk") - .withUpdateStrategyId("nxxmueedndrdv") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("wq") - .withGroups(Arrays.asList(new UpdateGroup().withName("healmfmtda"))) - .withAfterStageWaitInSeconds(687186912), - new UpdateStage() - .withName("dvwvgpio") - .withGroups(Arrays.asList(new UpdateGroup().withName("xrtfudxep"))) - .withAfterStageWaitInSeconds(1902888428), - new UpdateStage() - .withName("qagvrvm") - .withGroups(Arrays.asList(new UpdateGroup().withName("ukghimdblxgw"))) - .withAfterStageWaitInSeconds(1772217773)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("hfjx")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))) - .withIfMatch("mjwosytx") - .withIfNoneMatch("tcs") - .create(); - - Assertions.assertEquals("qumiek", response.updateStrategyId()); - Assertions.assertEquals("zikhl", response.strategy().stages().get(0).name()); - Assertions.assertEquals("hdgqggeb", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1120671201, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("sofwqmzqalkrmnji", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java deleted file mode 100644 index 06589e06016c4..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java +++ /dev/null @@ -1,63 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .updateRuns() - .delete("mquxvypo", "gkopkwhojvpajqgx", "smocmbq", "qvmkcxo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java deleted file mode 100644 index 06476aa17b353..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java +++ /dev/null @@ -1,79 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"hqcrailvpnpp\",\"strategy\":{\"stages\":[{\"name\":\"lrwdmhdlxyj\",\"groups\":[{\"name\":\"agafcnihgwqap\"}],\"afterStageWaitInSeconds\":1545768261},{\"name\":\"gfbcvkcv\",\"groups\":[{\"name\":\"keqdcvdrhvoods\"},{\"name\":\"tbobz\"},{\"name\":\"opcjwvnhd\"},{\"name\":\"d\"}],\"afterStageWaitInSeconds\":481946424}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"xrslpm\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-07-28T00:53:44Z\",\"completedTime\":\"2021-09-01T04:33:23Z\",\"state\":\"Skipped\"},\"stages\":[{\"status\":{},\"name\":\"qsluicp\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"lvmbmpaxmodfvuef\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"wyhrfouyftaakc\",\"id\":\"iyzvqtmnub\",\"name\":\"xkp\",\"type\":\"ksmond\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .getWithResponse("hcohfwdsjnk", "ljuti", "swacffgdkzz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hqcrailvpnpp", response.updateStrategyId()); - Assertions.assertEquals("lrwdmhdlxyj", response.strategy().stages().get(0).name()); - Assertions.assertEquals("agafcnihgwqap", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1545768261, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("xrslpm", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java deleted file mode 100644 index 1a5fd26ad7fd7..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java +++ /dev/null @@ -1,86 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"tppjflcx\",\"strategy\":{\"stages\":[{\"name\":\"okonzmnsikvmkqz\",\"groups\":[{\"name\":\"kdltfzxmhhvhg\"},{\"name\":\"r\"}],\"afterStageWaitInSeconds\":191107441},{\"name\":\"kwobdagxtibq\",\"groups\":[{\"name\":\"xwak\"},{\"name\":\"ogqxndlkzgxhuri\"}],\"afterStageWaitInSeconds\":1090180987},{\"name\":\"podxunkb\",\"groups\":[{\"name\":\"mubyynt\"},{\"name\":\"lrb\"},{\"name\":\"tkoievseotgq\"},{\"name\":\"l\"}],\"afterStageWaitInSeconds\":1147743130}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"lauwzizxbmpgcjef\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-06-02T10:08:07Z\",\"completedTime\":\"2021-05-23T17:52:43Z\",\"state\":\"Completed\"},\"stages\":[{\"status\":{},\"name\":\"xe\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}}},\"eTag\":\"jpglkfgohdne\",\"id\":\"lfphsdyhtozfikd\",\"name\":\"wwquuvxzxclvithh\",\"type\":\"zonosgg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.updateRuns().listByFleet("d", "lvwiwubmwmbesl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tppjflcx", response.iterator().next().updateStrategyId()); - Assertions.assertEquals("okonzmnsikvmkqz", response.iterator().next().strategy().stages().get(0).name()); - Assertions - .assertEquals( - "kdltfzxmhhvhg", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions - .assertEquals(191107441, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals( - ManagedClusterUpgradeType.FULL, response.iterator().next().managedClusterUpdate().upgrade().type()); - Assertions - .assertEquals( - "lauwzizxbmpgcjef", response.iterator().next().managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.LATEST, - response.iterator().next().managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java deleted file mode 100644 index 995da4f4e9b70..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java +++ /dev/null @@ -1,80 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"qyib\",\"strategy\":{\"stages\":[{\"name\":\"fluszdtm\",\"groups\":[{\"name\":\"wofyyvoqacpiexp\"},{\"name\":\"tg\"},{\"name\":\"wbwo\"}],\"afterStageWaitInSeconds\":1119495390},{\"name\":\"ashrt\",\"groups\":[{\"name\":\"cnqxwbpokulpi\"},{\"name\":\"jwaa\"},{\"name\":\"ipqiiobyuqerpq\"}],\"afterStageWaitInSeconds\":2131221175}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"ciuqgbdb\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-03-08T12:51:31Z\",\"completedTime\":\"2021-09-10T07:31:19Z\",\"state\":\"Running\"},\"stages\":[{\"status\":{},\"name\":\"k\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"nn\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"koymkcd\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"pwdreqnovvqf\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"uwsyrsndsytgadg\",\"id\":\"aeaeneqnzarrw\",\"name\":\"q\",\"type\":\"uijfqk\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .start("apvhelxprgly", "tddckcb", "uejrjxgc", "qibrhosxsdqrhzoy", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qyib", response.updateStrategyId()); - Assertions.assertEquals("fluszdtm", response.strategy().stages().get(0).name()); - Assertions.assertEquals("wofyyvoqacpiexp", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1119495390, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("ciuqgbdb", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopMockTests.java deleted file mode 100644 index fb693e78f2d03..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopMockTests.java +++ /dev/null @@ -1,80 +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.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsStopMockTests { - @Test - public void testStop() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"orzihle\",\"strategy\":{\"stages\":[{\"name\":\"swsrms\",\"groups\":[{\"name\":\"rpzbchckqqzqi\"},{\"name\":\"xiy\"}],\"afterStageWaitInSeconds\":1721034864},{\"name\":\"i\",\"groups\":[{\"name\":\"ked\"},{\"name\":\"atrwyhqmibzyh\"},{\"name\":\"itsmypyyn\"},{\"name\":\"cdpu\"}],\"afterStageWaitInSeconds\":1107344942},{\"name\":\"g\",\"groups\":[{\"name\":\"nmabik\"}],\"afterStageWaitInSeconds\":438726197}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"jhxbld\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-03-07T19:07:21Z\",\"completedTime\":\"2021-10-05T04:10:25Z\",\"state\":\"Failed\"},\"stages\":[{\"status\":{},\"name\":\"tllxdyhgsyocogj\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"adoocrkvc\",\"id\":\"hnvpamqgxq\",\"name\":\"u\",\"type\":\"zikywgg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .stop( - "cewiipfpub", "ibwwiftohqkv", "uvksgplsaknynfsy", "ljphuopxodl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("orzihle", response.updateStrategyId()); - Assertions.assertEquals("swsrms", response.strategy().stages().get(0).name()); - Assertions.assertEquals("rpzbchckqqzqi", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1721034864, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("jhxbld", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageStatusTests.java deleted file mode 100644 index 42e8e19b7e582..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStageStatus; - -public final class UpdateStageStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStageStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-12-06T02:10:02Z\",\"completedTime\":\"2021-04-27T23:18:31Z\",\"state\":\"Stopping\"},\"name\":\"jmflbvvnch\",\"groups\":[{\"status\":{\"startTime\":\"2021-03-23T06:31:54Z\",\"completedTime\":\"2021-08-31T10:27:58Z\",\"state\":\"Skipped\"},\"name\":\"hrsajiwkuofo\",\"members\":[{\"status\":{\"startTime\":\"2021-12-07T04:50:56Z\",\"completedTime\":\"2021-09-16T14:28:14Z\",\"state\":\"Running\"},\"name\":\"vxieduugidyj\",\"clusterResourceId\":\"f\",\"operationId\":\"aos\",\"message\":\"xc\"},{\"status\":{\"startTime\":\"2021-05-30T16:01:09Z\",\"completedTime\":\"2021-03-31T13:41Z\",\"state\":\"Failed\"},\"name\":\"hslkevleggzf\",\"clusterResourceId\":\"hfmvfaxkffe\",\"operationId\":\"th\",\"message\":\"m\"},{\"status\":{\"startTime\":\"2021-02-22T20:01:28Z\",\"completedTime\":\"2021-08-05T17:04:54Z\",\"state\":\"NotStarted\"},\"name\":\"bbzoggig\",\"clusterResourceId\":\"wburvjxxjnspydpt\",\"operationId\":\"enkouknvudw\",\"message\":\"ukbldngkpo\"},{\"status\":{\"startTime\":\"2021-05-19T00:57:25Z\",\"completedTime\":\"2021-09-03T22:41:55Z\",\"state\":\"Completed\"},\"name\":\"ukgjnpiucgygevq\",\"clusterResourceId\":\"typmrbpizcdrqjsd\",\"operationId\":\"dnfyhxdeoejzicwi\",\"message\":\"jttgzf\"}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-09-13T12:21:33Z\",\"completedTime\":\"2021-02-13T09:06:07Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":1192393079}}") - .toObject(UpdateStageStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStageStatus model = new UpdateStageStatus(); - model = BinaryData.fromObject(model).toObject(UpdateStageStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java deleted file mode 100644 index 19fab749f33c6..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java +++ /dev/null @@ -1,38 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateStageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStage model = - BinaryData - .fromString( - "{\"name\":\"masxazjpqyegu\",\"groups\":[{\"name\":\"b\"}],\"afterStageWaitInSeconds\":1163750271}") - .toObject(UpdateStage.class); - Assertions.assertEquals("masxazjpqyegu", model.name()); - Assertions.assertEquals("b", model.groups().get(0).name()); - Assertions.assertEquals(1163750271, model.afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStage model = - new UpdateStage() - .withName("masxazjpqyegu") - .withGroups(Arrays.asList(new UpdateGroup().withName("b"))) - .withAfterStageWaitInSeconds(1163750271); - model = BinaryData.fromObject(model).toObject(UpdateStage.class); - Assertions.assertEquals("masxazjpqyegu", model.name()); - Assertions.assertEquals("b", model.groups().get(0).name()); - Assertions.assertEquals(1163750271, model.afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java deleted file mode 100644 index d77a36de99a85..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStatus; - -public final class UpdateStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStatus model = - BinaryData - .fromString( - "{\"startTime\":\"2020-12-29T19:47:48Z\",\"completedTime\":\"2021-11-07T20:31:54Z\",\"state\":\"Failed\"}") - .toObject(UpdateStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStatus model = new UpdateStatus(); - model = BinaryData.fromObject(model).toObject(UpdateStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java deleted file mode 100644 index c37e1b9470b1d..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"3c1b31e1-5b3b-441c-837f-14537d856fde\",\"clientId\":\"22fd0fb7-adee-4188-ba5f-41fec8c111f4\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java deleted file mode 100644 index 8b63368f09dc1..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java +++ /dev/null @@ -1,25 +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.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.WaitStatus; - -public final class WaitStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WaitStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-07-17T22:38:11Z\",\"completedTime\":\"2021-04-10T23:16:29Z\",\"state\":\"NotStarted\"},\"waitDurationInSeconds\":1059821653}") - .toObject(WaitStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WaitStatus model = new WaitStatus(); - model = BinaryData.fromObject(model).toObject(WaitStatus.class); - } -}