From af86547f624f177c7ae374498e3613c45ac70c74 Mon Sep 17 00:00:00 2001 From: hongli750210 Date: Thu, 14 Sep 2023 16:39:52 +0800 Subject: [PATCH] mgmt, update Azure Kubernetes Fleet Manager to 2023-06-15-preview --- .../CHANGELOG.md | 65 +++++- .../README.md | 6 +- .../SAMPLE.md | 45 ++-- .../pom.xml | 3 +- .../ContainerServiceFleetManager.java | 8 +- .../fluent/FleetMembersClient.java | 45 +++- .../fluent/FleetsClient.java | 38 +++- .../fluent/models/FleetInner.java | 30 +++ .../fluent/models/UpdateRunInner.java | 16 -- ...erServiceFleetManagementClientBuilder.java | 2 +- ...ainerServiceFleetManagementClientImpl.java | 2 +- .../implementation/FleetImpl.java | 21 +- .../implementation/FleetMemberImpl.java | 8 +- .../FleetMembersClientImpl.java | 214 +++++++++++++++++- .../implementation/FleetsClientImpl.java | 170 +++++++++++++- .../implementation/UpdateRunImpl.java | 5 - .../models/AgentProfile.java | 53 +++++ .../models/ApiServerAccessProfile.java | 105 +++++++++ .../containerservicefleet/models/Fleet.java | 44 +++- .../models/FleetHubProfile.java | 58 +++++ .../models/FleetMember.java | 11 + .../models/FleetPatch.java | 29 +++ .../models/ManagedClusterUpdate.java | 29 +++ .../models/ManagedServiceIdentity.java | 143 ++++++++++++ .../models/ManagedServiceIdentityType.java | 54 +++++ .../models/MemberUpdateStatus.java | 15 ++ .../models/NodeImageSelection.java | 58 +++++ .../models/NodeImageSelectionStatus.java | 43 ++++ .../models/NodeImageSelectionType.java | 47 ++++ .../models/NodeImageVersion.java | 40 ++++ .../models/UpdateRun.java | 21 +- .../models/UpdateRunStatus.java | 20 ++ .../models/UpdateState.java | 3 + .../models/UserAssignedIdentity.java | 55 +++++ .../generated/FleetMembersCreateSamples.java | 2 +- .../generated/FleetMembersDeleteSamples.java | 2 +- .../generated/FleetMembersGetSamples.java | 2 +- .../FleetMembersListByFleetSamples.java | 2 +- .../generated/FleetMembersUpdateSamples.java | 2 +- .../FleetsCreateOrUpdateSamples.java | 3 +- .../generated/FleetsDeleteSamples.java | 2 +- .../FleetsGetByResourceGroupSamples.java | 2 +- .../FleetsListByResourceGroupSamples.java | 2 +- .../FleetsListCredentialsSamples.java | 2 +- .../generated/FleetsListSamples.java | 2 +- .../generated/FleetsUpdateSamples.java | 3 +- .../generated/OperationsListSamples.java | 2 +- .../UpdateRunsCreateOrUpdateSamples.java | 7 +- .../generated/UpdateRunsDeleteSamples.java | 2 +- .../generated/UpdateRunsGetSamples.java | 2 +- .../UpdateRunsListByFleetSamples.java | 2 +- .../generated/UpdateRunsStartSamples.java | 2 +- .../generated/UpdateRunsStopSamples.java | 2 +- .../generated/AgentProfileTests.java | 24 ++ .../ApiServerAccessProfileTests.java | 36 +++ .../generated/FleetCredentialResultTests.java | 2 +- .../FleetCredentialResultsInnerTests.java | 2 +- .../generated/FleetHubProfileTests.java | 26 ++- .../generated/FleetInnerTests.java | 50 +++- .../generated/FleetListResultTests.java | 56 ++++- .../generated/FleetMemberInnerTests.java | 12 +- .../generated/FleetMemberListResultTests.java | 21 +- .../generated/FleetMemberPropertiesTests.java | 12 +- .../FleetMemberUpdatePropertiesTests.java | 8 +- .../generated/FleetMemberUpdateTests.java | 8 +- .../FleetMembersCreateMockTests.java | 18 +- .../FleetMembersDeleteMockTests.java | 4 +- .../FleetMembersGetWithResponseMockTests.java | 8 +- .../FleetMembersListByFleetMockTests.java | 8 +- .../generated/FleetPatchTests.java | 25 +- .../generated/FleetPropertiesTests.java | 27 ++- .../FleetsCreateOrUpdateMockTests.java | 56 ++++- .../generated/FleetsDeleteMockTests.java | 2 +- ...tByResourceGroupWithResponseMockTests.java | 16 +- .../FleetsListByResourceGroupMockTests.java | 22 +- ...sListCredentialsWithResponseMockTests.java | 5 +- .../generated/FleetsListMockTests.java | 19 +- .../generated/ManagedClusterUpdateTests.java | 20 +- .../ManagedClusterUpgradeSpecTests.java | 8 +- .../ManagedServiceIdentityTests.java | 47 ++++ .../generated/MemberUpdateStatusTests.java | 2 +- .../NodeImageSelectionStatusTests.java | 24 ++ .../generated/NodeImageSelectionTests.java | 25 ++ .../generated/NodeImageVersionTests.java | 21 ++ .../generated/OperationsListMockTests.java | 2 +- .../generated/UpdateGroupStatusTests.java | 2 +- .../generated/UpdateGroupTests.java | 8 +- .../generated/UpdateRunInnerTests.java | 66 +++++- .../generated/UpdateRunListResultTests.java | 100 +++++++- .../generated/UpdateRunPropertiesTests.java | 69 ++++-- .../generated/UpdateRunStatusTests.java | 2 +- .../generated/UpdateRunStrategyTests.java | 19 +- .../UpdateRunsCreateOrUpdateMockTests.java | 125 ++++++++++ .../generated/UpdateRunsDeleteMockTests.java | 4 +- .../UpdateRunsGetWithResponseMockTests.java | 17 +- .../UpdateRunsListByFleetMockTests.java | 21 +- .../generated/UpdateRunsStartMockTests.java | 16 +- .../generated/UpdateRunsStopMockTests.java | 24 +- .../generated/UpdateStageStatusTests.java | 2 +- .../generated/UpdateStageTests.java | 24 +- .../generated/UpdateStatusTests.java | 2 +- .../generated/UserAssignedIdentityTests.java | 25 ++ .../generated/WaitStatusTests.java | 2 +- 103 files changed, 2371 insertions(+), 324 deletions(-) create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AgentProfileTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ApiServerAccessProfileTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java create mode 100644 sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md index 066adad9504a1..6951f49658e3c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md @@ -1,14 +1,71 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2023-09-14) -### Features Added +- 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-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.UpdateRun` was modified + +* `systemData()` was removed + +### Features Added + +* `models.ApiServerAccessProfile` was added + +* `models.UserAssignedIdentity` was added + +* `models.AgentProfile` was added + +* `models.ManagedServiceIdentity` was added + +* `models.NodeImageSelection` was added + +* `models.NodeImageSelectionStatus` was added + +* `models.NodeImageVersion` was added + +* `models.ManagedServiceIdentityType` was added + +* `models.NodeImageSelectionType` was added + +#### `models.FleetPatch` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added +* `identity()` was added + +#### `models.Fleet` was modified + +* `identity()` was added + +#### `models.Fleet$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.FleetHubProfile` was modified + +* `agentProfile()` was added +* `apiServerAccessProfile()` was added +* `withAgentProfile(models.AgentProfile)` was added +* `withApiServerAccessProfile(models.ApiServerAccessProfile)` was added + +#### `models.MemberUpdateStatus` was modified + +* `message()` was added + +#### `models.ManagedClusterUpdate` was modified + +* `withNodeImageSelection(models.NodeImageSelection)` was added +* `nodeImageSelection()` was added + +#### `models.Fleet$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.UpdateRunStatus` was modified -### Other Changes +* `nodeImageSelection()` was added ## 1.0.0-beta.1 (2023-06-21) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md index dec1589e1ecbd..4b48641ff5f6d 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-03-preview. 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-2023-06-preview. 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-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fcontainerservicefleet%2Fazure-resourcemanager-containerservicefleet%2FREADME.png) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md index eb8bbe4c012bb..a27d7dc8d35c9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md @@ -37,7 +37,7 @@ /** Samples for FleetMembers Create. */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -63,7 +63,7 @@ public final class FleetMembersCreateSamples { /** Samples for FleetMembers Delete. */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. @@ -83,7 +83,7 @@ public final class FleetMembersDeleteSamples { /** Samples for FleetMembers Get. */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. @@ -103,7 +103,7 @@ public final class FleetMembersGetSamples { /** Samples for FleetMembers ListByFleet. */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. @@ -125,7 +125,7 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetMember; /** Samples for FleetMembers Update. */ public final class FleetMembersUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. @@ -154,7 +154,7 @@ import java.util.Map; /** Samples for Fleets CreateOrUpdate. */ public final class FleetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -173,6 +173,7 @@ public final class FleetsCreateOrUpdateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -192,7 +193,7 @@ public final class FleetsCreateOrUpdateSamples { /** Samples for Fleets Delete. */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. @@ -212,7 +213,7 @@ public final class FleetsDeleteSamples { /** Samples for Fleets GetByResourceGroup. */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. @@ -232,7 +233,7 @@ public final class FleetsGetByResourceGroupSamples { /** Samples for Fleets List. */ public final class FleetsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. @@ -252,7 +253,7 @@ public final class FleetsListSamples { /** Samples for Fleets ListByResourceGroup. */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. @@ -272,7 +273,7 @@ public final class FleetsListByResourceGroupSamples { /** Samples for Fleets ListCredentials. */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. @@ -296,7 +297,7 @@ import java.util.Map; /** Samples for Fleets Update. */ public final class FleetsUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -313,6 +314,7 @@ public final class FleetsUpdateSamples { resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -332,7 +334,7 @@ public final class FleetsUpdateSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Operations_List.json */ /** * Sample code: List the operations for the provider. @@ -352,6 +354,8 @@ public final class OperationsListSamples { 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; @@ -360,7 +364,7 @@ import java.util.Arrays; /** Samples for UpdateRuns CreateOrUpdate. */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. @@ -387,7 +391,8 @@ public final class UpdateRunsCreateOrUpdateSamples { .withUpgrade( new ManagedClusterUpgradeSpec() .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("1.26.1"))) + .withKubernetesVersion("1.26.1")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))) .create(); } } @@ -399,7 +404,7 @@ public final class UpdateRunsCreateOrUpdateSamples { /** Samples for UpdateRuns Delete. */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. @@ -419,7 +424,7 @@ public final class UpdateRunsDeleteSamples { /** Samples for UpdateRuns Get. */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. @@ -439,7 +444,7 @@ public final class UpdateRunsGetSamples { /** Samples for UpdateRuns ListByFleet. */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. @@ -459,7 +464,7 @@ public final class UpdateRunsListByFleetSamples { /** Samples for UpdateRuns Start. */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. @@ -479,7 +484,7 @@ public final class UpdateRunsStartSamples { /** Samples for UpdateRuns Stop. */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml index 994dfacdaee0d..feb6363bb6e44 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-03-preview. + 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-06-preview. 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 c830f572a53bd..f2e53c17c4f6e 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 @@ -216,7 +216,7 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu .append("-") .append("com.azure.resourcemanager.containerservicefleet") .append("/") - .append("1.0.0-beta.1"); + .append("1.0.0-beta.2"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -322,8 +322,10 @@ public UpdateRuns updateRuns() { } /** - * @return Wrapped service client ContainerServiceFleetManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * 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() { return this.clientObject; 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 0471f5c8a45b5..f63d744b178d3 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 @@ -155,6 +155,22 @@ FleetMemberInner create( 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. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@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); + /** * Update a FleetMember. * @@ -167,10 +183,10 @@ FleetMemberInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a member of the Fleet along with {@link Response}. + * @return the {@link SyncPoller} for polling of a member of the Fleet. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FleetMemberInner> beginUpdate( String resourceGroupName, String fleetName, String fleetMemberName, @@ -194,6 +210,29 @@ Response updateWithResponse( 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. + * @param properties The resource properties to be updated. + * @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 member of the Fleet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetMemberInner update( + String resourceGroupName, + String fleetName, + String fleetMemberName, + FleetMemberUpdate properties, + String ifMatch, + Context context); + /** * Delete a FleetMember. * 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 8e13481a37f9e..1a8a5cc3e72b0 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 @@ -166,6 +166,21 @@ FleetInner createOrUpdate( 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Fleet resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FleetInner> beginUpdate( + String resourceGroupName, String fleetName, FleetPatch properties); + /** * Update a Fleet. * @@ -177,10 +192,10 @@ FleetInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Fleet resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of the Fleet resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FleetInner> beginUpdate( String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); /** @@ -197,6 +212,23 @@ Response updateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) FleetInner update(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. + * @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 the Fleet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FleetInner update( + String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); + /** * Delete a Fleet. * 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 eb33abb3b6545..9ae7c731c5340 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 @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -30,6 +31,12 @@ public final class FleetInner extends Resource { @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY) private String etag; + /* + * Managed identity. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -61,6 +68,26 @@ public String etag() { return this.etag; } + /** + * Get the identity property: Managed identity. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identity. + * + * @param identity the identity value to set. + * @return the FleetInner object itself. + */ + public FleetInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -125,5 +152,8 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().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 d38284fb3d316..13ad07a5daeba 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 @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState; import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus; @@ -31,12 +30,6 @@ public final class UpdateRunInner extends ProxyResource { @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY) private String etag; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /** Creates an instance of UpdateRunInner class. */ public UpdateRunInner() { } @@ -62,15 +55,6 @@ public String etag() { return this.etag; } - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** * Get the provisioningState property: The provisioning state of the UpdateRun resource. * 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 acfe1c1ad16f5..c6c133263ee1c 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 @@ -137,7 +137,7 @@ public ContainerServiceFleetManagementClientImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + 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 c935723c33796..b825b86c289f4 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 @@ -181,7 +181,7 @@ public UpdateRunsClient getUpdateRuns() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-03-15-preview"; + this.apiVersion = "2023-06-15-preview"; this.operations = new OperationsClientImpl(this); this.fleets = new FleetsClientImpl(this); this.fleetMembers = new FleetMembersClientImpl(this); 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 faec43979470a..ec42ed7e9ad02 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; import java.util.Collections; import java.util.Map; @@ -51,6 +52,10 @@ public String etag() { return this.innerModel().etag(); } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -140,8 +145,7 @@ public Fleet apply() { serviceManager .serviceClient() .getFleets() - .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE) - .getValue(); + .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE); return this; } @@ -150,8 +154,7 @@ public Fleet apply(Context context) { serviceManager .serviceClient() .getFleets() - .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, context) - .getValue(); + .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, context); return this; } @@ -212,6 +215,16 @@ public FleetImpl withTags(Map tags) { } } + public FleetImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + public FleetImpl withHubProfile(FleetHubProfile hubProfile) { this.innerModel().withHubProfile(hubProfile); 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 56c962e867b9e..e0af292a07ba3 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 @@ -132,9 +132,7 @@ public FleetMember apply() { serviceManager .serviceClient() .getFleetMembers() - .updateWithResponse( - resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE) - .getValue(); + .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE); return this; } @@ -143,9 +141,7 @@ public FleetMember apply(Context context) { serviceManager .serviceClient() .getFleetMembers() - .updateWithResponse( - resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context) - .getValue(); + .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context); 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 90c28879b8441..6761e079572ce 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 @@ -116,9 +116,9 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono>> update( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -921,7 +921,7 @@ 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( + private Mono>> updateWithResponseAsync( String resourceGroupName, String fleetName, String fleetMemberName, @@ -989,7 +989,7 @@ 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( + private Mono>> updateWithResponseAsync( String resourceGroupName, String fleetName, String fleetMemberName, @@ -1040,6 +1040,170 @@ private Mono> updateWithResponseAsync( 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. + * @param properties The resource properties to be updated. + * @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 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()); + } + + /** + * 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. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 member of the Fleet. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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()); + } + + /** + * 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. + * @param properties The resource properties to be updated. + * @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 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) { + 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); + } + + /** + * 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. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 member of the Fleet. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FleetMemberInner> beginUpdate( + String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { + final String ifMatch = null; + 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. + * @param properties The resource properties to be updated. + * @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 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) + .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. + * @param properties The resource properties to be updated. + * @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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Update a FleetMember. * @@ -1056,8 +1220,9 @@ private Mono> updateWithResponseAsync( private Mono updateAsync( String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1072,18 +1237,19 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a member of the Fleet along with {@link Response}. + * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + private Mono updateAsync( String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { - return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) - .block(); + return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1102,8 +1268,32 @@ public Response updateWithResponse( public FleetMemberInner update( String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return updateWithResponse(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, Context.NONE) - .getValue(); + 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. + * @param properties The resource properties to be updated. + * @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 member of the Fleet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetMemberInner update( + String resourceGroupName, + String fleetName, + String fleetMemberName, + FleetMemberUpdate properties, + String ifMatch, + Context context) { + return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).block(); } /** 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 4f4b74c66b7f7..f2cf5e21992c1 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 @@ -125,9 +125,9 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono>> update( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -1009,7 +1009,7 @@ public FleetInner createOrUpdate( * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono @@ -1067,7 +1067,7 @@ private Mono> updateWithResponseAsync( * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1108,6 +1108,134 @@ private Mono> updateWithResponseAsync( 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. + * @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 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()); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Fleet resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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()); + } + + /** + * 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. + * @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 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) { + 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); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Fleet resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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. + * @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 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) { + 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. + * @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 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() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Update a Fleet. * @@ -1122,8 +1250,9 @@ private Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1137,12 +1266,14 @@ private Mono updateAsync(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 the Fleet resource along with {@link Response}. + * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + private Mono updateAsync( String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { - return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context).block(); + return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1159,7 +1290,26 @@ public Response updateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return updateWithResponse(resourceGroupName, fleetName, properties, ifMatch, Context.NONE).getValue(); + return updateAsync(resourceGroupName, fleetName, properties, ifMatch).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. + * @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 the Fleet resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FleetInner update( + String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { + return updateAsync(resourceGroupName, fleetName, properties, ifMatch, context).block(); } /** 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 881a14875ab3b..200f8a64f00b4 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,7 +4,6 @@ package com.azure.resourcemanager.containerservicefleet.implementation; -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; @@ -34,10 +33,6 @@ public String etag() { return this.innerModel().etag(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public UpdateRunProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java new file mode 100644 index 0000000000000..43397ae41c43d --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java @@ -0,0 +1,53 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** Agent profile for the Fleet hub. */ +@Fluent +public final class AgentProfile { + /* + * The ID of the subnet which the Fleet hub node will join on startup. If this is not specified, a vnet and subnet + * will be generated and used. + */ + @JsonProperty(value = "subnetId") + private String subnetId; + + /** Creates an instance of AgentProfile class. */ + public AgentProfile() { + } + + /** + * Get the subnetId property: The ID of the subnet which the Fleet hub node will join on startup. If this is not + * specified, a vnet and subnet will be generated and used. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: The ID of the subnet which the Fleet hub node will join on startup. If this is not + * specified, a vnet and subnet will be generated and used. + * + * @param subnetId the subnetId value to set. + * @return the AgentProfile object itself. + */ + public AgentProfile withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * 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/ApiServerAccessProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java new file mode 100644 index 0000000000000..3f2b6771dd07e --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java @@ -0,0 +1,105 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** Access profile for the Fleet hub API server. */ +@Fluent +public final class ApiServerAccessProfile { + /* + * Whether to create the Fleet hub as a private cluster or not. + */ + @JsonProperty(value = "enablePrivateCluster") + private Boolean enablePrivateCluster; + + /* + * Whether to enable apiserver vnet integration for the Fleet hub or not. + */ + @JsonProperty(value = "enableVnetIntegration") + private Boolean enableVnetIntegration; + + /* + * The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new Fleet with + * BYO vnet. + */ + @JsonProperty(value = "subnetId") + private String subnetId; + + /** Creates an instance of ApiServerAccessProfile class. */ + public ApiServerAccessProfile() { + } + + /** + * Get the enablePrivateCluster property: Whether to create the Fleet hub as a private cluster or not. + * + * @return the enablePrivateCluster value. + */ + public Boolean enablePrivateCluster() { + return this.enablePrivateCluster; + } + + /** + * Set the enablePrivateCluster property: Whether to create the Fleet hub as a private cluster or not. + * + * @param enablePrivateCluster the enablePrivateCluster value to set. + * @return the ApiServerAccessProfile object itself. + */ + public ApiServerAccessProfile withEnablePrivateCluster(Boolean enablePrivateCluster) { + this.enablePrivateCluster = enablePrivateCluster; + return this; + } + + /** + * Get the enableVnetIntegration property: Whether to enable apiserver vnet integration for the Fleet hub or not. + * + * @return the enableVnetIntegration value. + */ + public Boolean enableVnetIntegration() { + return this.enableVnetIntegration; + } + + /** + * Set the enableVnetIntegration property: Whether to enable apiserver vnet integration for the Fleet hub or not. + * + * @param enableVnetIntegration the enableVnetIntegration value to set. + * @return the ApiServerAccessProfile object itself. + */ + public ApiServerAccessProfile withEnableVnetIntegration(Boolean enableVnetIntegration) { + this.enableVnetIntegration = enableVnetIntegration; + return this; + } + + /** + * Get the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new Fleet with BYO vnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: The subnet to be used when apiserver vnet integration is enabled. It is required when + * creating a new Fleet with BYO vnet. + * + * @param subnetId the subnetId value to set. + * @return the ApiServerAccessProfile object itself. + */ + public ApiServerAccessProfile withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * 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/Fleet.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleet.java index 5992bbf9d6c41..063c111645649 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 @@ -58,6 +58,13 @@ public interface Fleet { */ 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. * @@ -114,11 +121,13 @@ interface Definition DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } + /** The Fleet definition stages. */ interface DefinitionStages { /** The first stage of the Fleet definition. */ interface Blank extends WithLocation { } + /** The stage of the Fleet definition allowing to specify location. */ interface WithLocation { /** @@ -137,6 +146,7 @@ interface WithLocation { */ WithResourceGroup withRegion(String location); } + /** The stage of the Fleet definition allowing to specify parent resource. */ interface WithResourceGroup { /** @@ -147,12 +157,14 @@ interface WithResourceGroup { */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * 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.WithHubProfile, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { @@ -171,6 +183,7 @@ interface WithCreate */ Fleet create(Context context); } + /** The stage of the Fleet definition allowing to specify tags. */ interface WithTags { /** @@ -181,6 +194,18 @@ interface WithTags { */ WithCreate withTags(Map tags); } + + /** 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 hubProfile. */ interface WithHubProfile { /** @@ -191,6 +216,7 @@ interface WithHubProfile { */ WithCreate withHubProfile(FleetHubProfile hubProfile); } + /** The stage of the Fleet definition allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -201,6 +227,7 @@ interface WithIfMatch { */ WithCreate withIfMatch(String ifMatch); } + /** The stage of the Fleet definition allowing to specify ifNoneMatch. */ interface WithIfNoneMatch { /** @@ -212,6 +239,7 @@ interface WithIfNoneMatch { WithCreate withIfNoneMatch(String ifNoneMatch); } } + /** * Begins update for the Fleet resource. * @@ -220,7 +248,7 @@ interface WithIfNoneMatch { Fleet.Update update(); /** The template for Fleet update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithIfMatch { /** * Executes the update request. * @@ -236,6 +264,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIfMatch { */ Fleet apply(Context context); } + /** The Fleet update stages. */ interface UpdateStages { /** The stage of the Fleet update allowing to specify tags. */ @@ -248,6 +277,18 @@ interface WithTags { */ Update withTags(Map tags); } + + /** 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. */ interface WithIfMatch { /** @@ -259,6 +300,7 @@ interface WithIfMatch { Update withIfMatch(String ifMatch); } } + /** * Refreshes the resource to sync with Azure. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java index 9c9d80bdfba51..ad871aca8ba8c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java @@ -16,6 +16,18 @@ public final class FleetHubProfile { @JsonProperty(value = "dnsPrefix") private String dnsPrefix; + /* + * The access profile for the Fleet hub API server. + */ + @JsonProperty(value = "apiServerAccessProfile") + private ApiServerAccessProfile apiServerAccessProfile; + + /* + * The agent profile for the Fleet hub. + */ + @JsonProperty(value = "agentProfile") + private AgentProfile agentProfile; + /* * The FQDN of the Fleet hub. */ @@ -52,6 +64,46 @@ public FleetHubProfile withDnsPrefix(String dnsPrefix) { return this; } + /** + * Get the apiServerAccessProfile property: The access profile for the Fleet hub API server. + * + * @return the apiServerAccessProfile value. + */ + public ApiServerAccessProfile apiServerAccessProfile() { + return this.apiServerAccessProfile; + } + + /** + * Set the apiServerAccessProfile property: The access profile for the Fleet hub API server. + * + * @param apiServerAccessProfile the apiServerAccessProfile value to set. + * @return the FleetHubProfile object itself. + */ + public FleetHubProfile withApiServerAccessProfile(ApiServerAccessProfile apiServerAccessProfile) { + this.apiServerAccessProfile = apiServerAccessProfile; + return this; + } + + /** + * Get the agentProfile property: The agent profile for the Fleet hub. + * + * @return the agentProfile value. + */ + public AgentProfile agentProfile() { + return this.agentProfile; + } + + /** + * Set the agentProfile property: The agent profile for the Fleet hub. + * + * @param agentProfile the agentProfile value to set. + * @return the FleetHubProfile object itself. + */ + public FleetHubProfile withAgentProfile(AgentProfile agentProfile) { + this.agentProfile = agentProfile; + return this; + } + /** * Get the fqdn property: The FQDN of the Fleet hub. * @@ -76,5 +128,11 @@ public String kubernetesVersion() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (apiServerAccessProfile() != null) { + apiServerAccessProfile().validate(); + } + if (agentProfile() != null) { + agentProfile().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 c8c2be0c107c3..fcd78346cce8f 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 @@ -89,11 +89,13 @@ public interface FleetMember { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The FleetMember definition stages. */ interface DefinitionStages { /** The first stage of the FleetMember definition. */ interface Blank extends WithParentResource { } + /** The stage of the FleetMember definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -105,6 +107,7 @@ interface WithParentResource { */ WithCreate withExistingFleet(String resourceGroupName, String fleetName); } + /** * 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. @@ -129,6 +132,7 @@ interface WithCreate */ FleetMember create(Context context); } + /** The stage of the FleetMember definition allowing to specify clusterResourceId. */ interface WithClusterResourceId { /** @@ -143,6 +147,7 @@ interface WithClusterResourceId { */ WithCreate withClusterResourceId(String clusterResourceId); } + /** The stage of the FleetMember definition allowing to specify group. */ interface WithGroup { /** @@ -153,6 +158,7 @@ interface WithGroup { */ WithCreate withGroup(String group); } + /** The stage of the FleetMember definition allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -163,6 +169,7 @@ interface WithIfMatch { */ WithCreate withIfMatch(String ifMatch); } + /** The stage of the FleetMember definition allowing to specify ifNoneMatch. */ interface WithIfNoneMatch { /** @@ -174,6 +181,7 @@ interface WithIfNoneMatch { WithCreate withIfNoneMatch(String ifNoneMatch); } } + /** * Begins update for the FleetMember resource. * @@ -198,6 +206,7 @@ interface Update extends UpdateStages.WithGroup, UpdateStages.WithIfMatch { */ FleetMember apply(Context context); } + /** The FleetMember update stages. */ interface UpdateStages { /** The stage of the FleetMember update allowing to specify group. */ @@ -210,6 +219,7 @@ interface WithGroup { */ Update withGroup(String group); } + /** The stage of the FleetMember update allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -221,6 +231,7 @@ interface WithIfMatch { Update withIfMatch(String ifMatch); } } + /** * Refreshes the resource to sync with Azure. * 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 b30127962ba65..f91f23d305942 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 @@ -19,6 +19,12 @@ public final class FleetPatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /* + * Managed identity. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + /** Creates an instance of FleetPatch class. */ public FleetPatch() { } @@ -43,11 +49,34 @@ public FleetPatch withTags(Map tags) { return this; } + /** + * Get the identity property: Managed identity. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identity. + * + * @param identity the identity value to set. + * @return the FleetPatch object itself. + */ + public FleetPatch withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } } } 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 50aeaa31f228b..c720623b9d7a0 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 @@ -17,6 +17,12 @@ public final class ManagedClusterUpdate { @JsonProperty(value = "upgrade", required = true) private ManagedClusterUpgradeSpec upgrade; + /* + * The node image upgrade to be applied to the target nodes in update run. + */ + @JsonProperty(value = "nodeImageSelection") + private NodeImageSelection nodeImageSelection; + /** Creates an instance of ManagedClusterUpdate class. */ public ManagedClusterUpdate() { } @@ -41,6 +47,26 @@ public ManagedClusterUpdate withUpgrade(ManagedClusterUpgradeSpec upgrade) { return this; } + /** + * 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() { + return this.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. + */ + public ManagedClusterUpdate withNodeImageSelection(NodeImageSelection nodeImageSelection) { + this.nodeImageSelection = nodeImageSelection; + return this; + } + /** * Validates the instance. * @@ -54,6 +80,9 @@ public void validate() { } else { upgrade().validate(); } + if (nodeImageSelection() != null) { + nodeImageSelection().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterUpdate.class); 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 new file mode 100644 index 0000000000000..ea8e5411345b4 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java @@ -0,0 +1,143 @@ +// 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** Managed service identity (system assigned and/or user assigned identities). */ +@Fluent +public final class ManagedServiceIdentity { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /* + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ + @JsonProperty(value = "type", required = true) + private ManagedServiceIdentityType type; + + /* + * 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}. + * 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. */ + 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() { + return this.principalId; + } + + /** + * 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() { + return this.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() { + return this.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. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: 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}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: 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}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + 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 ManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); +} 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 new file mode 100644 index 0000000000000..6c8b5c0ececfa --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java @@ -0,0 +1,54 @@ +// 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; + +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** Static value None for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** Static value SystemAssigned for ManagedServiceIdentityType. */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** 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"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} 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 ac39d69590390..14dcfc32be3cc 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 @@ -34,6 +34,12 @@ public final class MemberUpdateStatus { @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) private String operationId; + /* + * The status message after processing the member update operation. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + /** Creates an instance of MemberUpdateStatus class. */ public MemberUpdateStatus() { } @@ -74,6 +80,15 @@ public String operationId() { return this.operationId; } + /** + * Get the message property: The status message after processing the member update operation. + * + * @return the message value. + */ + public String message() { + return this.message; + } + /** * Validates the instance. * 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 new file mode 100644 index 0000000000000..1bd5f5b435210 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelection.java @@ -0,0 +1,58 @@ +// 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 node image upgrade to be applied to the target nodes in update run. */ +@Fluent +public final class NodeImageSelection { + /* + * The node image upgrade type. + */ + @JsonProperty(value = "type", required = true) + private NodeImageSelectionType type; + + /** Creates an instance of NodeImageSelection class. */ + public NodeImageSelection() { + } + + /** + * Get the type property: The node image upgrade type. + * + * @return the type value. + */ + public NodeImageSelectionType type() { + return this.type; + } + + /** + * Set the type property: The node image upgrade type. + * + * @param type the type value to set. + * @return the NodeImageSelection object itself. + */ + public NodeImageSelection withType(NodeImageSelectionType type) { + this.type = type; + 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 NodeImageSelection")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NodeImageSelection.class); +} 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 new file mode 100644 index 0000000000000..99be24967dffa --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionStatus.java @@ -0,0 +1,43 @@ +// 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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The node image upgrade specs for the update run. */ +@Immutable +public final class NodeImageSelectionStatus { + /* + * The image versions to upgrade the nodes to. + */ + @JsonProperty(value = "selectedNodeImageVersions", access = JsonProperty.Access.WRITE_ONLY) + private List selectedNodeImageVersions; + + /** 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() { + return this.selectedNodeImageVersions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (selectedNodeImageVersions() != null) { + selectedNodeImageVersions().forEach(e -> e.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 new file mode 100644 index 0000000000000..36b051843e7d9 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageSelectionType.java @@ -0,0 +1,47 @@ +// 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 node image upgrade type. */ +public final class NodeImageSelectionType extends ExpandableStringEnum { + /** Static value Latest for NodeImageSelectionType. */ + public static final NodeImageSelectionType LATEST = fromString("Latest"); + + /** 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 + public NodeImageSelectionType() { + } + + /** + * Creates or finds a NodeImageSelectionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeImageSelectionType. + */ + @JsonCreator + public static NodeImageSelectionType fromString(String name) { + return fromString(name, NodeImageSelectionType.class); + } + + /** + * Gets known NodeImageSelectionType values. + * + * @return known NodeImageSelectionType values. + */ + public static Collection values() { + return values(NodeImageSelectionType.class); + } +} 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 new file mode 100644 index 0000000000000..ba7d55c932b3f --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java @@ -0,0 +1,40 @@ +// 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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The node upgrade image version. */ +@Immutable +public final class NodeImageVersion { + /* + * The image version to upgrade the nodes to (e.g., 'AKSUbuntu-1804gen2containerd-2022.12.13'). + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** 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() { + return this.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/UpdateRun.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRun.java index 98b10bf2d2124..37cad878cb4ef 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,7 +4,6 @@ package com.azure.resourcemanager.containerservicefleet.models; -import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; @@ -41,13 +40,6 @@ public interface UpdateRun { */ 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. * @@ -97,11 +89,13 @@ public interface UpdateRun { interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } + /** The UpdateRun definition stages. */ interface DefinitionStages { /** The first stage of the UpdateRun definition. */ interface Blank extends WithParentResource { } + /** The stage of the UpdateRun definition allowing to specify parent resource. */ interface WithParentResource { /** @@ -113,6 +107,7 @@ interface WithParentResource { */ WithCreate withExistingFleet(String resourceGroupName, String fleetName); } + /** * 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. @@ -137,6 +132,7 @@ interface WithCreate */ UpdateRun create(Context context); } + /** The stage of the UpdateRun definition allowing to specify strategy. */ interface WithStrategy { /** @@ -153,6 +149,7 @@ interface WithStrategy { */ WithCreate withStrategy(UpdateRunStrategy strategy); } + /** The stage of the UpdateRun definition allowing to specify managedClusterUpdate. */ interface WithManagedClusterUpdate { /** @@ -165,6 +162,7 @@ interface WithManagedClusterUpdate { */ WithCreate withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate); } + /** The stage of the UpdateRun definition allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -175,6 +173,7 @@ interface WithIfMatch { */ WithCreate withIfMatch(String ifMatch); } + /** The stage of the UpdateRun definition allowing to specify ifNoneMatch. */ interface WithIfNoneMatch { /** @@ -186,6 +185,7 @@ interface WithIfNoneMatch { WithCreate withIfNoneMatch(String ifNoneMatch); } } + /** * Begins update for the UpdateRun resource. * @@ -214,6 +214,7 @@ interface Update */ UpdateRun apply(Context context); } + /** The UpdateRun update stages. */ interface UpdateStages { /** The stage of the UpdateRun update allowing to specify strategy. */ @@ -232,6 +233,7 @@ interface WithStrategy { */ Update withStrategy(UpdateRunStrategy strategy); } + /** The stage of the UpdateRun update allowing to specify managedClusterUpdate. */ interface WithManagedClusterUpdate { /** @@ -244,6 +246,7 @@ interface WithManagedClusterUpdate { */ Update withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate); } + /** The stage of the UpdateRun update allowing to specify ifMatch. */ interface WithIfMatch { /** @@ -254,6 +257,7 @@ interface WithIfMatch { */ Update withIfMatch(String ifMatch); } + /** The stage of the UpdateRun update allowing to specify ifNoneMatch. */ interface WithIfNoneMatch { /** @@ -265,6 +269,7 @@ interface WithIfNoneMatch { Update withIfNoneMatch(String ifNoneMatch); } } + /** * Refreshes the resource to sync with Azure. * 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 4a27c8860ebb8..cee4a783e7b8d 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 @@ -23,6 +23,13 @@ public final class UpdateRunStatus { @JsonProperty(value = "stages", access = JsonProperty.Access.WRITE_ONLY) private List stages; + /* + * The node image upgrade specs for the update run. It is only set in update run when `NodeImageSelection.type` is + * `Consistent`. + */ + @JsonProperty(value = "nodeImageSelection", access = JsonProperty.Access.WRITE_ONLY) + private NodeImageSelectionStatus nodeImageSelection; + /** Creates an instance of UpdateRunStatus class. */ public UpdateRunStatus() { } @@ -45,6 +52,16 @@ public List stages() { return this.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() { + return this.nodeImageSelection; + } + /** * Validates the instance. * @@ -57,5 +74,8 @@ public void validate() { if (stages() != null) { stages().forEach(e -> e.validate()); } + if (nodeImageSelection() != null) { + nodeImageSelection().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 36e514a8a3c58..b5ad2b4034221 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 @@ -22,6 +22,9 @@ public final class UpdateState extends ExpandableStringEnum { /** Static value Stopped for UpdateState. */ public static final UpdateState STOPPED = fromString("Stopped"); + /** Static value Skipped for UpdateState. */ + public static final UpdateState SKIPPED = fromString("Skipped"); + /** Static value Failed for UpdateState. */ public static final UpdateState FAILED = fromString("Failed"); 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 new file mode 100644 index 0000000000000..a85b9c11535f3 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java @@ -0,0 +1,55 @@ +// 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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** User assigned identity properties. */ +@Immutable +public final class UserAssignedIdentity { + /* + * The principal ID of the assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The client ID of the assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private UUID clientId; + + /** 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() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.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/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 4cd1dd9dd1773..376fedf90885b 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 @@ -7,7 +7,7 @@ /** Samples for FleetMembers Create. */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Create.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. 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 06b3c7d148d15..e0f520c77e4c1 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 @@ -7,7 +7,7 @@ /** Samples for FleetMembers Delete. */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. 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 78368062b879b..a20e05a95fc1e 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 @@ -7,7 +7,7 @@ /** Samples for FleetMembers Get. */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. 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 31e8867aa21c6..f74160deefbf2 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 @@ -7,7 +7,7 @@ /** Samples for FleetMembers ListByFleet. */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. 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 f5aacfc5fa00e..ef1ddd2c5eb48 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 @@ -9,7 +9,7 @@ /** Samples for FleetMembers Update. */ public final class FleetMembersUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/FleetMembers_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. 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 e7c6cf562b6b9..36e10809ac422 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 @@ -11,7 +11,7 @@ /** Samples for Fleets CreateOrUpdate. */ public final class FleetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -30,6 +30,7 @@ public static void createsAFleetResourceWithALongRunningOperation( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 f239aa84d5892..d615c510eade0 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 @@ -7,7 +7,7 @@ /** Samples for Fleets Delete. */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. 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 b5c13a06033a2..e82b9f6e96d35 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 @@ -7,7 +7,7 @@ /** Samples for Fleets GetByResourceGroup. */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. 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 a189cc22b9f0e..61853d429177c 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 @@ -7,7 +7,7 @@ /** Samples for Fleets ListByResourceGroup. */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. 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 451da254b6502..e468219319da0 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 @@ -7,7 +7,7 @@ /** Samples for Fleets ListCredentials. */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. 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 f823b805c0396..bd097e4974f9c 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 @@ -7,7 +7,7 @@ /** Samples for Fleets List. */ public final class FleetsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_ListBySub.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. 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 34e247053b167..445cec38be2dd 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 @@ -11,7 +11,7 @@ /** Samples for Fleets Update. */ public final class FleetsUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Fleets_PatchTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -28,6 +28,7 @@ public static void updateAFleet( resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 5548ab35f8807..e9d8089bdc6dd 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 @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/Operations_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/Operations_List.json */ /** * Sample code: List the operations for the provider. 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 50e504a4b1f7f..193567ab72971 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 @@ -7,6 +7,8 @@ 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; @@ -15,7 +17,7 @@ /** Samples for UpdateRuns CreateOrUpdate. */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. @@ -42,7 +44,8 @@ public static void createAnUpdateRun( .withUpgrade( new ManagedClusterUpgradeSpec() .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("1.26.1"))) + .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 a5d1abe6dc128..981b08b0a5adb 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 @@ -7,7 +7,7 @@ /** Samples for UpdateRuns Delete. */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. 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 fbe61893e0d9c..a75cac82694be 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 @@ -7,7 +7,7 @@ /** Samples for UpdateRuns Get. */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. 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 d57a4f7e89abc..249e1af757d3b 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 @@ -7,7 +7,7 @@ /** Samples for UpdateRuns ListByFleet. */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. 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 77cc2c2653754..c9f3bab25b772 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 @@ -7,7 +7,7 @@ /** Samples for UpdateRuns Start. */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. 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 4667b8585207f..5822fd255e1ad 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 @@ -7,7 +7,7 @@ /** Samples for UpdateRuns Stop. */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/examples/UpdateRuns_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-06-15-preview/examples/UpdateRuns_Stop.json */ /** * Sample code: Stops an UpdateRun. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AgentProfileTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AgentProfileTests.java new file mode 100644 index 0000000000000..ab892fd9523c4 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AgentProfileTests.java @@ -0,0 +1,24 @@ +// 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.AgentProfile; +import org.junit.jupiter.api.Assertions; + +public final class AgentProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AgentProfile model = BinaryData.fromString("{\"subnetId\":\"jbiksqrglssai\"}").toObject(AgentProfile.class); + Assertions.assertEquals("jbiksqrglssai", model.subnetId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AgentProfile model = new AgentProfile().withSubnetId("jbiksqrglssai"); + model = BinaryData.fromObject(model).toObject(AgentProfile.class); + Assertions.assertEquals("jbiksqrglssai", model.subnetId()); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ApiServerAccessProfileTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ApiServerAccessProfileTests.java new file mode 100644 index 0000000000000..47fe3c58eaef9 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ApiServerAccessProfileTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.containerservicefleet.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; +import org.junit.jupiter.api.Assertions; + +public final class ApiServerAccessProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ApiServerAccessProfile model = + BinaryData + .fromString( + "{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"kocrcjdkwtnhx\"}") + .toObject(ApiServerAccessProfile.class); + Assertions.assertEquals(true, model.enablePrivateCluster()); + Assertions.assertEquals(false, model.enableVnetIntegration()); + Assertions.assertEquals("kocrcjdkwtnhx", model.subnetId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ApiServerAccessProfile model = + new ApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnableVnetIntegration(false) + .withSubnetId("kocrcjdkwtnhx"); + model = BinaryData.fromObject(model).toObject(ApiServerAccessProfile.class); + Assertions.assertEquals(true, model.enablePrivateCluster()); + Assertions.assertEquals(false, model.enableVnetIntegration()); + Assertions.assertEquals("kocrcjdkwtnhx", model.subnetId()); + } +} 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 index d3ae5016cf91f..362c811d7f3a0 100644 --- 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 @@ -11,7 +11,7 @@ public final class FleetCredentialResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetCredentialResult model = - BinaryData.fromString("{\"name\":\"bbkpodep\"}").toObject(FleetCredentialResult.class); + BinaryData.fromString("{\"name\":\"nddhsgcbacph\"}").toObject(FleetCredentialResult.class); } @org.junit.jupiter.api.Test 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 index b8c7c4e994f2c..8fe9fc5903116 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { FleetCredentialResultsInner model = BinaryData .fromString( - "{\"kubeconfigs\":[{\"name\":\"zoxxjtf\"},{\"name\":\"uwfzitonpe\"},{\"name\":\"jkjlxofpdvhpfx\"},{\"name\":\"ininmay\"}]}") + "{\"kubeconfigs\":[{\"name\":\"wyiftyhxhur\"},{\"name\":\"tyxolniwpwc\"},{\"name\":\"fkgiawxk\"},{\"name\":\"plwckbas\"}]}") .toObject(FleetCredentialResultsInner.class); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java index 789ecc3499973..1154480aaa460 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import org.junit.jupiter.api.Assertions; @@ -14,15 +16,31 @@ public void testDeserialize() throws Exception { FleetHubProfile model = BinaryData .fromString( - "{\"dnsPrefix\":\"fdfdosygexpa\",\"fqdn\":\"akhmsbzjhcrz\",\"kubernetesVersion\":\"dphlxaolt\"}") + "{\"dnsPrefix\":\"jaeq\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"v\"},\"agentProfile\":{\"subnetId\":\"jqul\"},\"fqdn\":\"sntnbybkzgcw\",\"kubernetesVersion\":\"clxxwrljdo\"}") .toObject(FleetHubProfile.class); - Assertions.assertEquals("fdfdosygexpa", model.dnsPrefix()); + Assertions.assertEquals("jaeq", model.dnsPrefix()); + Assertions.assertEquals(true, model.apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, model.apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("v", model.apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jqul", model.agentProfile().subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetHubProfile model = new FleetHubProfile().withDnsPrefix("fdfdosygexpa"); + FleetHubProfile model = + new FleetHubProfile() + .withDnsPrefix("jaeq") + .withApiServerAccessProfile( + new ApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnableVnetIntegration(false) + .withSubnetId("v")) + .withAgentProfile(new AgentProfile().withSubnetId("jqul")); model = BinaryData.fromObject(model).toObject(FleetHubProfile.class); - Assertions.assertEquals("fdfdosygexpa", model.dnsPrefix()); + Assertions.assertEquals("jaeq", model.dnsPrefix()); + Assertions.assertEquals(true, model.apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, model.apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("v", model.apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jqul", model.agentProfile().subnetId()); } } 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 index 7087a900cce83..9b416feefc214 100644 --- 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 @@ -6,7 +6,12 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; +import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; +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; @@ -17,26 +22,51 @@ public void testDeserialize() throws Exception { FleetInner model = BinaryData .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"emkkvnipjox\",\"fqdn\":\"nchgej\",\"kubernetesVersion\":\"odmailzyd\"}},\"eTag\":\"o\",\"location\":\"yahux\",\"tags\":{\"xj\":\"mqnjaqw\",\"atscmd\":\"prozvcputegjvwmf\"},\"id\":\"pjhulsuuvmkj\",\"name\":\"zkrwfn\",\"type\":\"iodjp\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"hubProfile\":{\"dnsPrefix\":\"atscmd\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"uuvmkjozkrwfnd\"},\"agentProfile\":{\"subnetId\":\"jpslwejd\"},\"fqdn\":\"wryoqpsoacc\",\"kubernetesVersion\":\"zakljlahbc\"}},\"eTag\":\"ffdfdosygexpa\",\"identity\":{\"principalId\":\"25876924-d820-4fad-9d0b-c3795e337e66\",\"tenantId\":\"701760d5-e1a2-47f7-8d9c-b9c33cdd6397\",\"type\":\"SystemAssigned," + + " UserAssigned\",\"userAssignedIdentities\":{\"jhcrz\":{\"principalId\":\"071ccdec-200b-45b6-9c80-affac57e48af\",\"clientId\":\"e79513bd-f885-4332-8d43-19ac8edc336d\"},\"phlxa\":{\"principalId\":\"3c2124ef-6560-4dcc-b003-ebc91bc1c2b9\",\"clientId\":\"ba0c38bb-4b5e-4a5f-bf7d-34de4c6ee185\"}}},\"location\":\"thqt\",\"tags\":{\"zfsinzgvf\":\"jbp\",\"j\":\"jrwzox\",\"fpjkjlxofp\":\"felluwfzitonpe\"},\"id\":\"vhpfxxypininmay\",\"name\":\"uybbkpodep\",\"type\":\"oginuvamiheognar\"}") .toObject(FleetInner.class); - Assertions.assertEquals("yahux", model.location()); - Assertions.assertEquals("mqnjaqw", model.tags().get("xj")); - Assertions.assertEquals("emkkvnipjox", model.hubProfile().dnsPrefix()); + Assertions.assertEquals("thqt", model.location()); + Assertions.assertEquals("jbp", model.tags().get("zfsinzgvf")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("atscmd", model.hubProfile().dnsPrefix()); + Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("uuvmkjozkrwfnd", model.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jpslwejd", model.hubProfile().agentProfile().subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FleetInner model = new FleetInner() - .withLocation("yahux") - .withTags(mapOf("xj", "mqnjaqw", "atscmd", "prozvcputegjvwmf")) - .withHubProfile(new FleetHubProfile().withDnsPrefix("emkkvnipjox")); + .withLocation("thqt") + .withTags(mapOf("zfsinzgvf", "jbp", "j", "jrwzox", "fpjkjlxofp", "felluwfzitonpe")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("jhcrz", new UserAssignedIdentity(), "phlxa", new UserAssignedIdentity()))) + .withHubProfile( + new FleetHubProfile() + .withDnsPrefix("atscmd") + .withApiServerAccessProfile( + new ApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnableVnetIntegration(true) + .withSubnetId("uuvmkjozkrwfnd")) + .withAgentProfile(new AgentProfile().withSubnetId("jpslwejd"))); model = BinaryData.fromObject(model).toObject(FleetInner.class); - Assertions.assertEquals("yahux", model.location()); - Assertions.assertEquals("mqnjaqw", model.tags().get("xj")); - Assertions.assertEquals("emkkvnipjox", model.hubProfile().dnsPrefix()); + Assertions.assertEquals("thqt", model.location()); + Assertions.assertEquals("jbp", model.tags().get("zfsinzgvf")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("atscmd", model.hubProfile().dnsPrefix()); + Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("uuvmkjozkrwfnd", model.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jpslwejd", model.hubProfile().agentProfile().subnetId()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 index 1f2fa25d6a177..96df994c35308 100644 --- 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 @@ -6,7 +6,13 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; +import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; +import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; 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; @@ -18,11 +24,19 @@ public void testDeserialize() throws Exception { FleetListResult model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"xqhabi\",\"location\":\"ikxwc\",\"tags\":{\"n\":\"scnpqxuhivy\",\"rkxvdum\":\"wby\"},\"id\":\"grtfwvu\",\"name\":\"xgaudccs\",\"type\":\"h\"}],\"nextLink\":\"cnyejhkryhtnapcz\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"xqhabi\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"zb\"},\"agentProfile\":{\"subnetId\":\"npqxuh\"},\"fqdn\":\"y\",\"kubernetesVersion\":\"iwbybrkxvdumjg\"}},\"eTag\":\"fwvuk\",\"identity\":{\"principalId\":\"471847e0-2afe-45af-aa02-e1021d2bbaae\",\"tenantId\":\"1d8e2610-6dbb-47db-a3f8-88ccfe000d8d\",\"type\":\"None\",\"userAssignedIdentities\":{\"h\":{\"principalId\":\"586f0898-b491-44c0-83ca-871c104bbe31\",\"clientId\":\"1e10f5d7-b503-4d5b-b0cd-8953571b34ff\"}}},\"location\":\"cnyejhkryhtnapcz\",\"tags\":{\"ni\":\"kjyemkk\",\"ilzyd\":\"joxzjnchgejspodm\"},\"id\":\"h\",\"name\":\"jwyahuxinpmqnja\",\"type\":\"wixjsprozvcp\"}],\"nextLink\":\"eg\"}") .toObject(FleetListResult.class); - Assertions.assertEquals("ikxwc", model.value().get(0).location()); - Assertions.assertEquals("scnpqxuhivy", model.value().get(0).tags().get("n")); - Assertions.assertEquals("cnyejhkryhtnapcz", model.nextLink()); + Assertions.assertEquals("cnyejhkryhtnapcz", model.value().get(0).location()); + Assertions.assertEquals("kjyemkk", model.value().get(0).tags().get("ni")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("xqhabi", model.value().get(0).hubProfile().dnsPrefix()); + Assertions + .assertEquals(true, model.value().get(0).hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions + .assertEquals(false, model.value().get(0).hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("zb", model.value().get(0).hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("npqxuh", model.value().get(0).hubProfile().agentProfile().subnetId()); + Assertions.assertEquals("eg", model.nextLink()); } @org.junit.jupiter.api.Test @@ -33,15 +47,37 @@ public void testSerialize() throws Exception { Arrays .asList( new FleetInner() - .withLocation("ikxwc") - .withTags(mapOf("n", "scnpqxuhivy", "rkxvdum", "wby")))) - .withNextLink("cnyejhkryhtnapcz"); + .withLocation("cnyejhkryhtnapcz") + .withTags(mapOf("ni", "kjyemkk", "ilzyd", "joxzjnchgejspodm")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("h", new UserAssignedIdentity()))) + .withHubProfile( + new FleetHubProfile() + .withDnsPrefix("xqhabi") + .withApiServerAccessProfile( + new ApiServerAccessProfile() + .withEnablePrivateCluster(true) + .withEnableVnetIntegration(false) + .withSubnetId("zb")) + .withAgentProfile(new AgentProfile().withSubnetId("npqxuh"))))) + .withNextLink("eg"); model = BinaryData.fromObject(model).toObject(FleetListResult.class); - Assertions.assertEquals("ikxwc", model.value().get(0).location()); - Assertions.assertEquals("scnpqxuhivy", model.value().get(0).tags().get("n")); - Assertions.assertEquals("cnyejhkryhtnapcz", model.nextLink()); + Assertions.assertEquals("cnyejhkryhtnapcz", model.value().get(0).location()); + Assertions.assertEquals("kjyemkk", model.value().get(0).tags().get("ni")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("xqhabi", model.value().get(0).hubProfile().dnsPrefix()); + Assertions + .assertEquals(true, model.value().get(0).hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions + .assertEquals(false, model.value().get(0).hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("zb", model.value().get(0).hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("npqxuh", model.value().get(0).hubProfile().agentProfile().subnetId()); + Assertions.assertEquals("eg", model.nextLink()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 index 59efcbca0c359..452ec828d2e3b 100644 --- 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 @@ -14,17 +14,17 @@ public void testDeserialize() throws Exception { FleetMemberInner model = BinaryData .fromString( - "{\"properties\":{\"clusterResourceId\":\"wjfeusnhutjel\",\"group\":\"rl\",\"provisioningState\":\"Failed\"},\"eTag\":\"jzzd\",\"id\":\"qxhocdgeablgphut\",\"name\":\"cndvkaozwyiftyhx\",\"type\":\"urokft\"}") + "{\"properties\":{\"clusterResourceId\":\"wgcu\",\"group\":\"tumkdosvqwhbm\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"jfddgmbmbe\",\"id\":\"pbhtqqrolfpfpsa\",\"name\":\"gbquxigj\",\"type\":\"jgzjaoyfhrtx\"}") .toObject(FleetMemberInner.class); - Assertions.assertEquals("wjfeusnhutjel", model.clusterResourceId()); - Assertions.assertEquals("rl", model.group()); + Assertions.assertEquals("wgcu", model.clusterResourceId()); + Assertions.assertEquals("tumkdosvqwhbm", model.group()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetMemberInner model = new FleetMemberInner().withClusterResourceId("wjfeusnhutjel").withGroup("rl"); + FleetMemberInner model = new FleetMemberInner().withClusterResourceId("wgcu").withGroup("tumkdosvqwhbm"); model = BinaryData.fromObject(model).toObject(FleetMemberInner.class); - Assertions.assertEquals("wjfeusnhutjel", model.clusterResourceId()); - Assertions.assertEquals("rl", model.group()); + Assertions.assertEquals("wgcu", model.clusterResourceId()); + Assertions.assertEquals("tumkdosvqwhbm", 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 index 048ba3ca007d6..aee9596d199ef 100644 --- 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 @@ -16,11 +16,11 @@ public void testDeserialize() throws Exception { FleetMemberListResult model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"nuvamiheogna\",\"group\":\"zxtheotusivyevcc\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"nhungbw\",\"id\":\"rnfygxgispem\",\"name\":\"tzfkufubl\",\"type\":\"ofx\"},{\"properties\":{\"clusterResourceId\":\"ofjaeqjhqjb\",\"group\":\"v\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"qulngsntnbybkzgc\",\"id\":\"wclxxwrl\",\"name\":\"douskcqvkocrcjdk\",\"type\":\"tnhxbn\"},{\"properties\":{\"clusterResourceId\":\"iksqr\",\"group\":\"ssainqpjwnzll\",\"provisioningState\":\"Failed\"},\"eTag\":\"pee\",\"id\":\"mgxsab\",\"name\":\"yqduujit\",\"type\":\"jczdzevndh\"}],\"nextLink\":\"wpdappdsbdkv\"}") + "{\"value\":[{\"properties\":{\"clusterResourceId\":\"tynqgoul\",\"group\":\"dlikwyqkgfgibma\",\"provisioningState\":\"Leaving\"},\"eTag\":\"eqsrxybzqqedqyt\",\"id\":\"iqfouflmmnkz\",\"name\":\"modmglougpb\",\"type\":\"wtmutduq\"}],\"nextLink\":\"ap\"}") .toObject(FleetMemberListResult.class); - Assertions.assertEquals("nuvamiheogna", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("zxtheotusivyevcc", model.value().get(0).group()); - Assertions.assertEquals("wpdappdsbdkv", model.nextLink()); + Assertions.assertEquals("tynqgoul", model.value().get(0).clusterResourceId()); + Assertions.assertEquals("dlikwyqkgfgibma", model.value().get(0).group()); + Assertions.assertEquals("ap", model.nextLink()); } @org.junit.jupiter.api.Test @@ -29,14 +29,11 @@ public void testSerialize() throws Exception { new FleetMemberListResult() .withValue( Arrays - .asList( - new FleetMemberInner().withClusterResourceId("nuvamiheogna").withGroup("zxtheotusivyevcc"), - new FleetMemberInner().withClusterResourceId("ofjaeqjhqjb").withGroup("v"), - new FleetMemberInner().withClusterResourceId("iksqr").withGroup("ssainqpjwnzll"))) - .withNextLink("wpdappdsbdkv"); + .asList(new FleetMemberInner().withClusterResourceId("tynqgoul").withGroup("dlikwyqkgfgibma"))) + .withNextLink("ap"); model = BinaryData.fromObject(model).toObject(FleetMemberListResult.class); - Assertions.assertEquals("nuvamiheogna", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("zxtheotusivyevcc", model.value().get(0).group()); - Assertions.assertEquals("wpdappdsbdkv", model.nextLink()); + Assertions.assertEquals("tynqgoul", model.value().get(0).clusterResourceId()); + Assertions.assertEquals("dlikwyqkgfgibma", model.value().get(0).group()); + Assertions.assertEquals("ap", 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 index 0cd7cf97d5e4b..22a32b6e4599f 100644 --- 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 @@ -14,18 +14,18 @@ public void testDeserialize() throws Exception { FleetMemberProperties model = BinaryData .fromString( - "{\"clusterResourceId\":\"xolniwpwcukjfk\",\"group\":\"awxklr\",\"provisioningState\":\"Failed\"}") + "{\"clusterResourceId\":\"lnerkujysvleju\",\"group\":\"qawrlyxwj\",\"provisioningState\":\"Canceled\"}") .toObject(FleetMemberProperties.class); - Assertions.assertEquals("xolniwpwcukjfk", model.clusterResourceId()); - Assertions.assertEquals("awxklr", model.group()); + Assertions.assertEquals("lnerkujysvleju", model.clusterResourceId()); + Assertions.assertEquals("qawrlyxwj", model.group()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FleetMemberProperties model = - new FleetMemberProperties().withClusterResourceId("xolniwpwcukjfk").withGroup("awxklr"); + new FleetMemberProperties().withClusterResourceId("lnerkujysvleju").withGroup("qawrlyxwj"); model = BinaryData.fromObject(model).toObject(FleetMemberProperties.class); - Assertions.assertEquals("xolniwpwcukjfk", model.clusterResourceId()); - Assertions.assertEquals("awxklr", model.group()); + Assertions.assertEquals("lnerkujysvleju", model.clusterResourceId()); + Assertions.assertEquals("qawrlyxwj", 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 index 3015d501c82c4..f1ffdb2f42290 100644 --- 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 @@ -12,14 +12,14 @@ public final class FleetMemberUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetMemberUpdateProperties model = - BinaryData.fromString("{\"group\":\"hsgcbacphejkot\"}").toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("hsgcbacphejkot", model.group()); + BinaryData.fromString("{\"group\":\"rujqg\"}").toObject(FleetMemberUpdateProperties.class); + Assertions.assertEquals("rujqg", model.group()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("hsgcbacphejkot"); + FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("rujqg"); model = BinaryData.fromObject(model).toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("hsgcbacphejkot", model.group()); + Assertions.assertEquals("rujqg", 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 index 8d02145b39924..f26f5903f4fec 100644 --- 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 @@ -12,14 +12,14 @@ public final class FleetMemberUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetMemberUpdate model = - BinaryData.fromString("{\"properties\":{\"group\":\"kbasyypn\"}}").toObject(FleetMemberUpdate.class); - Assertions.assertEquals("kbasyypn", model.group()); + BinaryData.fromString("{\"properties\":{\"group\":\"nwbxgjvtbvpyssz\"}}").toObject(FleetMemberUpdate.class); + Assertions.assertEquals("nwbxgjvtbvpyssz", model.group()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetMemberUpdate model = new FleetMemberUpdate().withGroup("kbasyypn"); + FleetMemberUpdate model = new FleetMemberUpdate().withGroup("nwbxgjvtbvpyssz"); model = BinaryData.fromObject(model).toObject(FleetMemberUpdate.class); - Assertions.assertEquals("kbasyypn", model.group()); + Assertions.assertEquals("nwbxgjvtbvpyssz", 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 index e76d6e01e0a8a..f077a0f0029a5 100644 --- 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 @@ -31,7 +31,7 @@ public void testCreate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"clusterResourceId\":\"hagalpbuxwgipwh\",\"group\":\"ow\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"wankixzbi\",\"id\":\"eputtmrywnuzoqf\",\"name\":\"iyqzrnk\",\"type\":\"qvyxlwhzlsicoho\"}"; + "{\"properties\":{\"clusterResourceId\":\"kbogqxndlkzgx\",\"group\":\"ripl\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"xunkbebxmubyynt\",\"id\":\"rbqtkoie\",\"name\":\"seotgqrllt\",\"type\":\"u\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,15 +62,15 @@ public void testCreate() throws Exception { FleetMember response = manager .fleetMembers() - .define("azyxoegukg") - .withExistingFleet("enkouknvudw", "iukbldngkpoci") - .withClusterResourceId("piu") - .withGroup("ygevqzntypmrbpiz") - .withIfMatch("zfbishcbkhaj") - .withIfNoneMatch("eyeam") + .define("d") + .withExistingFleet("emwabnet", "hhszh") + .withClusterResourceId("vwiwubmwmbesld") + .withGroup("wwtppj") + .withIfMatch("bdagxt") + .withIfNoneMatch("bqdxbx") .create(); - Assertions.assertEquals("hagalpbuxwgipwh", response.clusterResourceId()); - Assertions.assertEquals("ow", response.group()); + Assertions.assertEquals("kbogqxndlkzgx", response.clusterResourceId()); + Assertions.assertEquals("ripl", 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 index f8f6407bf60b8..e15c976cb3055 100644 --- 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 @@ -56,8 +56,6 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager - .fleetMembers() - .delete("lvmezyvshxmzsbbz", "ggi", "rxwburv", "xxjnspydptk", com.azure.core.util.Context.NONE); + manager.fleetMembers().delete("rsc", "ntnev", "iwjmygtdssls", "tmweriofzpyq", 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 index 936a23fd42e01..42f10892b1e13 100644 --- 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 @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"clusterResourceId\":\"skghsauuimj\",\"group\":\"xieduugidyjrr\",\"provisioningState\":\"Joining\"},\"eTag\":\"osvexcsonpclhoc\",\"id\":\"slkevle\",\"name\":\"gz\",\"type\":\"buhfmvfaxkffeiit\"}"; + "{\"properties\":{\"clusterResourceId\":\"olpsslqlf\",\"group\":\"dnbbglzps\",\"provisioningState\":\"Canceled\"},\"eTag\":\"mcwyhzdxssadb\",\"id\":\"nvdfznuda\",\"name\":\"dvxzbncblylpst\",\"type\":\"bhhxsrzdzuc\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,10 +62,10 @@ public void testGetWithResponse() throws Exception { FleetMember response = manager .fleetMembers() - .getWithResponse("zdobpxjmflbvvnch", "kcciwwzjuqkhr", "ajiwkuo", com.azure.core.util.Context.NONE) + .getWithResponse("ynduha", "hqlkthumaqo", "bgycduiertgccym", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("skghsauuimj", response.clusterResourceId()); - Assertions.assertEquals("xieduugidyjrr", response.group()); + Assertions.assertEquals("olpsslqlf", response.clusterResourceId()); + Assertions.assertEquals("dnbbglzps", 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 index 6c189e52ed405..e600897bab76e 100644 --- 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 @@ -32,7 +32,7 @@ public void testListByFleet() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"zvyifqrvkdvj\",\"group\":\"lrmv\",\"provisioningState\":\"Updating\"},\"eTag\":\"atkpnp\",\"id\":\"exxbczwtr\",\"name\":\"wiqzbqjvsovmyo\",\"type\":\"acspkwl\"}]}"; + "{\"value\":[{\"properties\":{\"clusterResourceId\":\"mqtaruoujmkcjh\",\"group\":\"ytjrybnwjewgdr\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"naenqpehindo\",\"id\":\"mifthnzdnd\",\"name\":\"l\",\"type\":\"nayqi\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,9 +61,9 @@ public void testListByFleet() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = - manager.fleetMembers().listByFleet("uxh", "yudxorrqnbp", com.azure.core.util.Context.NONE); + manager.fleetMembers().listByFleet("sotftpvj", "bexilzznfqqnv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zvyifqrvkdvj", response.iterator().next().clusterResourceId()); - Assertions.assertEquals("lrmv", response.iterator().next().group()); + Assertions.assertEquals("mqtaruoujmkcjh", response.iterator().next().clusterResourceId()); + Assertions.assertEquals("ytjrybnwjewgdr", 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 index 6cb17dee757cc..cdac280f65ac3 100644 --- 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 @@ -6,6 +6,9 @@ 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; @@ -13,17 +16,31 @@ public final class FleetPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FleetPatch model = BinaryData.fromString("{\"tags\":{\"f\":\"rgqjbpfzfsinzg\"}}").toObject(FleetPatch.class); - Assertions.assertEquals("rgqjbpfzfsinzg", model.tags().get("f")); + FleetPatch model = + BinaryData + .fromString( + "{\"tags\":{\"zevndhkrwpdappds\":\"sabkyqduujitcjcz\",\"snhu\":\"dkvwrwjfe\",\"tmrldhugjzzdatq\":\"je\"},\"identity\":{\"principalId\":\"6e2b927a-720e-424c-8e89-4e012ec3a802\",\"tenantId\":\"d906c806-8d0a-41a7-af5d-3d59b4b8b0d9\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lgphu\":{\"principalId\":\"d46ae37b-b0cf-4afa-9413-59109bcb98ff\",\"clientId\":\"9af4399c-4a57-457f-bc30-07616cfa8057\"},\"ndv\":{\"principalId\":\"067e7edd-cc1c-4dd4-bd74-0ab3bfd1eaf5\",\"clientId\":\"ad9ed536-0a75-4789-800a-92a5d8796a92\"}}}}") + .toObject(FleetPatch.class); + Assertions.assertEquals("sabkyqduujitcjcz", model.tags().get("zevndhkrwpdappds")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetPatch model = new FleetPatch().withTags(mapOf("f", "rgqjbpfzfsinzg")); + FleetPatch model = + new FleetPatch() + .withTags(mapOf("zevndhkrwpdappds", "sabkyqduujitcjcz", "snhu", "dkvwrwjfe", "tmrldhugjzzdatq", "je")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("lgphu", new UserAssignedIdentity(), "ndv", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(FleetPatch.class); - Assertions.assertEquals("rgqjbpfzfsinzg", model.tags().get("f")); + Assertions.assertEquals("sabkyqduujitcjcz", model.tags().get("zevndhkrwpdappds")); + 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<>(); 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 index afa3139b2ea30..a604504727020 100644 --- 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 @@ -6,6 +6,8 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties; +import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import org.junit.jupiter.api.Assertions; @@ -15,16 +17,33 @@ public void testDeserialize() throws Exception { FleetProperties model = BinaryData .fromString( - "{\"provisioningState\":\"Creating\",\"hubProfile\":{\"dnsPrefix\":\"dpvwryoqpsoaccta\",\"fqdn\":\"kljla\",\"kubernetesVersion\":\"cr\"}}") + "{\"provisioningState\":\"Deleting\",\"hubProfile\":{\"dnsPrefix\":\"eotusivyevc\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"un\"},\"agentProfile\":{\"subnetId\":\"jzrnf\"},\"fqdn\":\"xgispemvtzfkufu\",\"kubernetesVersion\":\"jofxqe\"}}") .toObject(FleetProperties.class); - Assertions.assertEquals("dpvwryoqpsoaccta", model.hubProfile().dnsPrefix()); + Assertions.assertEquals("eotusivyevc", model.hubProfile().dnsPrefix()); + Assertions.assertEquals(false, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("un", model.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jzrnf", model.hubProfile().agentProfile().subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FleetProperties model = - new FleetProperties().withHubProfile(new FleetHubProfile().withDnsPrefix("dpvwryoqpsoaccta")); + new FleetProperties() + .withHubProfile( + new FleetHubProfile() + .withDnsPrefix("eotusivyevc") + .withApiServerAccessProfile( + new ApiServerAccessProfile() + .withEnablePrivateCluster(false) + .withEnableVnetIntegration(false) + .withSubnetId("un")) + .withAgentProfile(new AgentProfile().withSubnetId("jzrnf"))); model = BinaryData.fromObject(model).toObject(FleetProperties.class); - Assertions.assertEquals("dpvwryoqpsoaccta", model.hubProfile().dnsPrefix()); + Assertions.assertEquals("eotusivyevc", model.hubProfile().dnsPrefix()); + Assertions.assertEquals(false, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("un", model.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("jzrnf", model.hubProfile().agentProfile().subnetId()); } } 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 index d63544a7f0b16..abeec0bbd8c22 100644 --- 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 @@ -12,8 +12,13 @@ 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.AgentProfile; +import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; import com.azure.resourcemanager.containerservicefleet.models.Fleet; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; +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; @@ -34,7 +39,7 @@ public void testCreateOrUpdate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"q\",\"fqdn\":\"a\",\"kubernetesVersion\":\"ae\"}},\"eTag\":\"fhyhltrpmopjmcma\",\"location\":\"okth\",\"tags\":{\"xodpuozmyzydagfu\":\"uaodsfcpk\",\"dxwzywqsmbsurexi\":\"xbezyiuokktwh\"},\"id\":\"o\",\"name\":\"yocf\",\"type\":\"fksymddystki\"}"; + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"xbpvjymjhx\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"ivkrtsw\"},\"agentProfile\":{\"subnetId\":\"zvszj\"},\"fqdn\":\"uvjfdxxive\",\"kubernetesVersion\":\"t\"}},\"eTag\":\"aqtdoqmcbx\",\"identity\":{\"principalId\":\"79e8ddd7-dee7-4b2f-8926-28098439eb5b\",\"tenantId\":\"49e36df4-2ab7-4d11-8f9b-61f1cf91f5a3\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"hsfxoblytkb\":{\"principalId\":\"4d22572d-7e5e-4ec6-8ef0-dcc2911cfb75\",\"clientId\":\"7236ecf0-dc0f-4f56-9131-b5aaec55b683\"},\"ewwwfbkrvrnsv\":{\"principalId\":\"e56b9824-c885-4db5-bc97-92c042e7197d\",\"clientId\":\"230c9584-8b33-4874-a863-4978419464ce\"}}},\"location\":\"q\",\"tags\":{\"sbfov\":\"xc\"},\"id\":\"srruvwbhsqfsubcg\",\"name\":\"birx\",\"type\":\"pybsrfbjfdtw\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -65,20 +70,49 @@ public void testCreateOrUpdate() throws Exception { Fleet response = manager .fleets() - .define("ndnvo") - .withRegion("whybcib") - .withExistingResourceGroup("vudwx") - .withTags(mapOf("ynnaam", "dcsi", "qsc", "ectehf", "hcjrefovgmk", "eypvhezrkg")) - .withHubProfile(new FleetHubProfile().withDnsPrefix("gwdkcglhsl")) - .withIfMatch("jh") - .withIfNoneMatch("mdajv") + .define("dzumveekg") + .withRegion("tpnapnyiropuhpig") + .withExistingResourceGroup("skzbb") + .withTags( + mapOf( + "n", "ylgqgitxmedjvcsl", "rmgucnap", "wwncwzzhxgk", "oellwp", "t", "qrhhu", "fdygpfqbuaceopz")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf( + "eli", + new UserAssignedIdentity(), + "rzt", + new UserAssignedIdentity(), + "hb", + new UserAssignedIdentity(), + "nalaulppg", + new UserAssignedIdentity()))) + .withHubProfile( + new FleetHubProfile() + .withDnsPrefix("kfpbs") + .withApiServerAccessProfile( + new ApiServerAccessProfile() + .withEnablePrivateCluster(false) + .withEnableVnetIntegration(false) + .withSubnetId("uusdttouwa")) + .withAgentProfile(new AgentProfile().withSubnetId("kqvkelnsmvbxwyjs"))) + .withIfMatch("kdmoi") + .withIfNoneMatch("postmgrcfbunrm") .create(); - Assertions.assertEquals("okth", response.location()); - Assertions.assertEquals("uaodsfcpk", response.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals("q", response.hubProfile().dnsPrefix()); + Assertions.assertEquals("q", response.location()); + Assertions.assertEquals("xc", response.tags().get("sbfov")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("xbpvjymjhx", response.hubProfile().dnsPrefix()); + Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("ivkrtsw", response.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("zvszj", response.hubProfile().agentProfile().subnetId()); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 index 7ae131e1e9056..d2479388d0d21 100644 --- 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 @@ -56,6 +56,6 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.fleets().delete("ualhbxxhejj", "zvdudgwdslfhotwm", "ynpwlbj", com.azure.core.util.Context.NONE); + manager.fleets().delete("wroyqbexrmcq", "bycnojvkn", "e", 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 index 20dc569b1cafd..df69bc0fe7f01 100644 --- 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 @@ -13,6 +13,7 @@ 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; @@ -31,7 +32,7 @@ public void testGetByResourceGroupWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\",\"hubProfile\":{\"dnsPrefix\":\"fnba\",\"fqdn\":\"ionle\",\"kubernetesVersion\":\"etqgtzxdpnq\"}},\"eTag\":\"qwxrjfeallnw\",\"location\":\"bisnja\",\"tags\":{\"onq\":\"ngnzscxaqwoochc\",\"ea\":\"pkvlrxn\",\"enjbdlwtgrhp\":\"eipheoflokeyy\"},\"id\":\"jp\",\"name\":\"umasxazjpq\",\"type\":\"e\"}"; + "{\"properties\":{\"provisioningState\":\"Failed\",\"hubProfile\":{\"dnsPrefix\":\"x\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"klwndnhjdauwhv\"},\"agentProfile\":{\"subnetId\":\"zbtd\"},\"fqdn\":\"ujznb\",\"kubernetesVersion\":\"ow\"}},\"eTag\":\"przqlveu\",\"identity\":{\"principalId\":\"33dd153b-be78-4c2c-a8cf-9543907cf01e\",\"tenantId\":\"37865511-d094-4af8-b869-06e99bf6f194\",\"type\":\"None\",\"userAssignedIdentities\":{\"xobbcswsrt\":{\"principalId\":\"9c2d6db5-5d68-4246-bb03-477847387366\",\"clientId\":\"3907f163-e04d-4b86-8911-34f2120724ba\"},\"plrbpbewtghf\":{\"principalId\":\"8ce6bac2-58a7-4ec5-a074-3acedf49b199\",\"clientId\":\"12ead0fb-a5b1-4edf-97fe-79a10f7d4586\"},\"c\":{\"principalId\":\"f14a2cbd-c1f9-4382-9364-022965ade64b\",\"clientId\":\"0f76d48a-6c44-49b6-ad50-a518a8313476\"},\"zvlvqhjkbegib\":{\"principalId\":\"2cdc486d-99d5-4771-b22c-fb2980815399\",\"clientId\":\"05ccb437-d0be-4ead-9e4e-fdfcc189e794\"}}},\"location\":\"mxiebw\",\"tags\":{\"wrtz\":\"oayqc\",\"ngmtsavjcb\":\"uzgwyzmhtx\"},\"id\":\"wxqpsrknftguvri\",\"name\":\"hprwmdyv\",\"type\":\"qtayri\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,11 +63,16 @@ public void testGetByResourceGroupWithResponse() throws Exception { Fleet response = manager .fleets() - .getByResourceGroupWithResponse("c", "pmivkwlzu", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("it", "nrjawgqwg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bisnja", response.location()); - Assertions.assertEquals("ngnzscxaqwoochc", response.tags().get("onq")); - Assertions.assertEquals("fnba", response.hubProfile().dnsPrefix()); + Assertions.assertEquals("mxiebw", response.location()); + Assertions.assertEquals("oayqc", response.tags().get("wrtz")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("x", response.hubProfile().dnsPrefix()); + Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("klwndnhjdauwhv", response.hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("zbtd", response.hubProfile().agentProfile().subnetId()); } } 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 index 08eb251c71d38..e3a93b4de8cdf 100644 --- 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 @@ -14,6 +14,7 @@ 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; @@ -32,7 +33,7 @@ public void testListByResourceGroup() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"hubProfile\":{\"dnsPrefix\":\"gug\",\"fqdn\":\"krxd\",\"kubernetesVersion\":\"i\"}},\"eTag\":\"thz\",\"location\":\"qdrabhjybigehoqf\",\"tags\":{\"zlcuiywgqywgndrv\":\"skanyk\"},\"id\":\"nhzgpphrcgyn\",\"name\":\"ocpecfvmmco\",\"type\":\"fsxlzevgbmqjqa\"}]}"; + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"hubProfile\":{\"dnsPrefix\":\"eemaofmxagkvtme\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":true,\"subnetId\":\"hvljuahaquh\"},\"agentProfile\":{\"subnetId\":\"mdua\"},\"fqdn\":\"exq\",\"kubernetesVersion\":\"fadmws\"}},\"eTag\":\"r\",\"identity\":{\"principalId\":\"6b6e40fa-1dfa-40bc-996a-e8354b51bc1b\",\"tenantId\":\"13ee81cb-77d7-4de4-bc91-73d574fe8e39\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"lf\":{\"principalId\":\"b1469c38-7ce9-4144-aab3-cd142fae5fa0\",\"clientId\":\"248004cf-9841-4ec8-95c9-c33abb3d2b92\"},\"gwb\":{\"principalId\":\"f7f21e04-302f-4085-933d-777e2a1ecace\",\"clientId\":\"edafd5ea-9faf-444c-b32d-6923de1eebd7\"}}},\"location\":\"beldawkzbaliourq\",\"tags\":{\"sowzxcugi\":\"auhashsfwx\",\"ucww\":\"jooxdjebw\",\"bvmeuecivy\":\"vo\"},\"id\":\"zceuojgjrw\",\"name\":\"ueiotwmcdyt\",\"type\":\"x\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,10 +62,21 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = - manager.fleets().listByResourceGroup("iotkftutqxl", com.azure.core.util.Context.NONE); + manager.fleets().listByResourceGroup("ehhseyvjusrts", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qdrabhjybigehoqf", response.iterator().next().location()); - Assertions.assertEquals("skanyk", response.iterator().next().tags().get("zlcuiywgqywgndrv")); - Assertions.assertEquals("gug", response.iterator().next().hubProfile().dnsPrefix()); + Assertions.assertEquals("beldawkzbaliourq", response.iterator().next().location()); + Assertions.assertEquals("auhashsfwx", response.iterator().next().tags().get("sowzxcugi")); + Assertions + .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("eemaofmxagkvtme", response.iterator().next().hubProfile().dnsPrefix()); + Assertions + .assertEquals( + false, response.iterator().next().hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions + .assertEquals( + true, response.iterator().next().hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions + .assertEquals("hvljuahaquh", response.iterator().next().hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("mdua", response.iterator().next().hubProfile().agentProfile().subnetId()); } } 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 index 6c608ad59158e..37d4396972182 100644 --- 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 @@ -29,7 +29,8 @@ public void testListCredentialsWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"kubeconfigs\":[{\"name\":\"esnzwde\"},{\"name\":\"vorxzdmohct\"}]}"; + String responseStr = + "{\"kubeconfigs\":[{\"name\":\"wlxkvugfhzovaw\"},{\"name\":\"u\"},{\"name\":\"thnnpr\"},{\"name\":\"peilpjzuaejxdu\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -60,7 +61,7 @@ public void testListCredentialsWithResponse() throws Exception { FleetCredentialResults response = manager .fleets() - .listCredentialsWithResponse("pgacftadehxnlty", "sop", com.azure.core.util.Context.NONE) + .listCredentialsWithResponse("qsgzvahapj", "zhpvgqzcjrvxd", 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 index f3e916a3d7134..3e80a9a86f51c 100644 --- 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 @@ -14,6 +14,7 @@ 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; @@ -32,7 +33,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"hubProfile\":{\"dnsPrefix\":\"pzaoqvuhr\",\"fqdn\":\"f\",\"kubernetesVersion\":\"yd\"}},\"eTag\":\"lmjthjq\",\"location\":\"pyeicxm\",\"tags\":{\"pbobjo\":\"wqvhkhixuigdt\",\"w\":\"hm\"},\"id\":\"a\",\"name\":\"a\",\"type\":\"hrzayvvtpgvdf\"}]}"; + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"hubProfile\":{\"dnsPrefix\":\"kphywpnvjto\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"fpl\"},\"agentProfile\":{\"subnetId\":\"xus\"},\"fqdn\":\"pabgyeps\",\"kubernetesVersion\":\"tazqugxywpmueefj\"}},\"eTag\":\"fqkquj\",\"identity\":{\"principalId\":\"13293e28-2fa6-4836-9dfe-01d82e560dd4\",\"tenantId\":\"620d8108-3be7-4d2f-9d3e-4a670e991cd6\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"glaocq\":{\"principalId\":\"ab38fafc-5867-4cbb-828a-f49295ed22d5\",\"clientId\":\"89f76313-affc-47be-a8bb-849ab09aebce\"},\"cmgyud\":{\"principalId\":\"f9f07d02-d2cf-4d95-891f-eabd28476099\",\"clientId\":\"8fd44560-a253-4855-b9ed-76312fb1f395\"},\"lmoyrx\":{\"principalId\":\"fc44cf97-52e1-43be-93e1-9e7f297e0b06\",\"clientId\":\"76de2a1e-7bdc-4dca-b3c9-2f0c9c74ee87\"}}},\"location\":\"fudwpznt\",\"tags\":{\"ck\":\"zhlrqjb\",\"kyv\":\"rlhrxs\"},\"id\":\"ycanuzbpzkafku\",\"name\":\"b\",\"type\":\"rnwb\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -62,8 +63,18 @@ public void testList() throws Exception { PagedIterable response = manager.fleets().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("pyeicxm", response.iterator().next().location()); - Assertions.assertEquals("wqvhkhixuigdt", response.iterator().next().tags().get("pbobjo")); - Assertions.assertEquals("pzaoqvuhr", response.iterator().next().hubProfile().dnsPrefix()); + Assertions.assertEquals("fudwpznt", response.iterator().next().location()); + Assertions.assertEquals("zhlrqjb", response.iterator().next().tags().get("ck")); + Assertions + .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("kphywpnvjto", response.iterator().next().hubProfile().dnsPrefix()); + Assertions + .assertEquals( + true, response.iterator().next().hubProfile().apiServerAccessProfile().enablePrivateCluster()); + Assertions + .assertEquals( + false, response.iterator().next().hubProfile().apiServerAccessProfile().enableVnetIntegration()); + Assertions.assertEquals("fpl", response.iterator().next().hubProfile().apiServerAccessProfile().subnetId()); + Assertions.assertEquals("xus", response.iterator().next().hubProfile().agentProfile().subnetId()); } } 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 index 9c0b796a75ce0..f661489af9875 100644 --- 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 @@ -8,6 +8,8 @@ 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 { @@ -15,10 +17,12 @@ public final class ManagedClusterUpdateTests { public void testDeserialize() throws Exception { ManagedClusterUpdate model = BinaryData - .fromString("{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"mdwzjeiachboo\"}}") + .fromString( + "{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"dagfuaxbezyiuok\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}}") .toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("mdwzjeiachboo", model.upgrade().kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("dagfuaxbezyiuok", model.upgrade().kubernetesVersion()); + Assertions.assertEquals(NodeImageSelectionType.CONSISTENT, model.nodeImageSelection().type()); } @org.junit.jupiter.api.Test @@ -27,10 +31,12 @@ public void testSerialize() throws Exception { new ManagedClusterUpdate() .withUpgrade( new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("mdwzjeiachboo")); + .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("dagfuaxbezyiuok")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT)); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("mdwzjeiachboo", model.upgrade().kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("dagfuaxbezyiuok", 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 index 2a2c39902ae55..b0ec02c796a29 100644 --- 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 @@ -14,10 +14,10 @@ public final class ManagedClusterUpgradeSpecTests { public void testDeserialize() throws Exception { ManagedClusterUpgradeSpec model = BinaryData - .fromString("{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"nrosfqpte\"}") + .fromString("{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"dxwzywqsmbsurexi\"}") .toObject(ManagedClusterUpgradeSpec.class); Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("nrosfqpte", model.kubernetesVersion()); + Assertions.assertEquals("dxwzywqsmbsurexi", model.kubernetesVersion()); } @org.junit.jupiter.api.Test @@ -25,9 +25,9 @@ public void testSerialize() throws Exception { ManagedClusterUpgradeSpec model = new ManagedClusterUpgradeSpec() .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("nrosfqpte"); + .withKubernetesVersion("dxwzywqsmbsurexi"); model = BinaryData.fromObject(model).toObject(ManagedClusterUpgradeSpec.class); Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("nrosfqpte", model.kubernetesVersion()); + Assertions.assertEquals("dxwzywqsmbsurexi", 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 new file mode 100644 index 0000000000000..47a42504d5e41 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java @@ -0,0 +1,47 @@ +// 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\":\"77952b03-894a-457e-8988-ea8b57558a2e\",\"tenantId\":\"01c5134b-5509-4ba1-9f87-aab331c141a1\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ljfmppee\":{\"principalId\":\"13a83be7-b7f6-4a9d-9a6b-3ea1af3f1239\",\"clientId\":\"2b5de2d9-54b5-4d93-8556-67733c79e168\"}}}") + .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("ljfmppee", 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 index c964ef05c07a1..318046ee3cf88 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { MemberUpdateStatus model = BinaryData .fromString( - "{\"status\":{\"startTime\":\"2021-09-06T05:45:20Z\",\"completedTime\":\"2021-02-14T15:50:10Z\",\"state\":\"Completed\"},\"name\":\"djwzrlov\",\"clusterResourceId\":\"lwhijcoejctbzaq\",\"operationId\":\"sycbkbfk\"}") + "{\"status\":{\"startTime\":\"2021-09-14T21:04:43Z\",\"completedTime\":\"2021-01-07T21:55:14Z\",\"state\":\"Stopping\"},\"name\":\"jzkdeslpvlopwi\",\"clusterResourceId\":\"ghxpkdw\",\"operationId\":\"aiuebbaumnyqu\",\"message\":\"deoj\"}") .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 new file mode 100644 index 0000000000000..bc78444d8d14c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java @@ -0,0 +1,24 @@ +// 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\":\"btfhvpesaps\"}]}") + .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 new file mode 100644 index 0000000000000..da7e9454c87d0 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java @@ -0,0 +1,25 @@ +// 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 new file mode 100644 index 0000000000000..4b2f713fb7b1c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java @@ -0,0 +1,21 @@ +// 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\":\"dqmh\"}").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/OperationsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java index 7dccbf3fb6247..227c594eb9b67 100644 --- 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 @@ -31,7 +31,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"name\":\"mxaxc\",\"isDataAction\":false,\"display\":{\"provider\":\"dtocj\",\"resource\":\"hvpmoue\",\"operation\":\"dzxibqeojnxqbzvd\",\"description\":\"t\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + "{\"value\":[{\"name\":\"dhtldwkyz\",\"isDataAction\":false,\"display\":{\"provider\":\"ncwscwsvlxoto\",\"resource\":\"wrupqsxvnmicykvc\",\"operation\":\"vei\",\"description\":\"vnotyfjfcnj\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); 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 index 969d9bc63c9cb..fe11c7fb351d6 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { UpdateGroupStatus model = BinaryData .fromString( - "{\"status\":{\"startTime\":\"2021-08-17T01:01:15Z\",\"completedTime\":\"2021-05-08T18:49:34Z\",\"state\":\"Completed\"},\"name\":\"aierhhb\",\"members\":[{\"status\":{\"startTime\":\"2021-07-20T05:11Z\",\"completedTime\":\"2021-01-08T14:04:30Z\",\"state\":\"Stopped\"},\"name\":\"odxobnbdxkqpxok\",\"clusterResourceId\":\"ionpimexg\",\"operationId\":\"xgcp\"}]}") + "{\"status\":{\"startTime\":\"2021-08-16T11:07:09Z\",\"completedTime\":\"2021-03-08T14:48:20Z\",\"state\":\"Skipped\"},\"name\":\"bavxbniwdjswzt\",\"members\":[{\"status\":{\"startTime\":\"2021-10-19T12:26:50Z\",\"completedTime\":\"2021-04-13T23:02:25Z\",\"state\":\"Completed\"},\"name\":\"zxbzpfzabglc\",\"clusterResourceId\":\"xwtctyqiklbbovpl\",\"operationId\":\"bhvgy\",\"message\":\"uosvmkfssxqukk\"}]}") .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 index 85ca4ff55aeef..01805b1d16597 100644 --- 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 @@ -11,14 +11,14 @@ public final class UpdateGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateGroup model = BinaryData.fromString("{\"name\":\"cs\"}").toObject(UpdateGroup.class); - Assertions.assertEquals("cs", model.name()); + UpdateGroup model = BinaryData.fromString("{\"name\":\"sfcpkvxodpuozm\"}").toObject(UpdateGroup.class); + Assertions.assertEquals("sfcpkvxodpuozm", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateGroup model = new UpdateGroup().withName("cs"); + UpdateGroup model = new UpdateGroup().withName("sfcpkvxodpuozm"); model = BinaryData.fromObject(model).toObject(UpdateGroup.class); - Assertions.assertEquals("cs", model.name()); + Assertions.assertEquals("sfcpkvxodpuozm", 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 index 947e609ce9a93..8dd852923e981 100644 --- 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 @@ -7,8 +7,15 @@ 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 @@ -16,16 +23,69 @@ public void testDeserialize() throws Exception { UpdateRunInner model = BinaryData .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[]},\"managedClusterUpdate\":{},\"status\":{\"stages\":[]}},\"eTag\":\"uxig\",\"id\":\"jgzjaoyfhrtx\",\"name\":\"lnerkujysvleju\",\"type\":\"fqawrlyxw\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"mouexhdzx\",\"groups\":[{\"name\":\"eojnxqbzvddn\"},{\"name\":\"wndeicbtwnp\"},{\"name\":\"aoqvuh\"},{\"name\":\"hcffcyddglmjthjq\"}],\"afterStageWaitInSeconds\":1616692109},{\"name\":\"yeicxmqciwqvhk\",\"groups\":[{\"name\":\"uigdtopbobjog\"},{\"name\":\"m\"},{\"name\":\"w\"}],\"afterStageWaitInSeconds\":54099605},{\"name\":\"a\",\"groups\":[{\"name\":\"z\"},{\"name\":\"yvvtpgvdfgio\"}],\"afterStageWaitInSeconds\":1858576873}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"tqxln\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-07-23T20:25:28Z\",\"completedTime\":\"2021-01-24T10:40:18Z\",\"state\":\"Failed\"},\"stages\":[{\"status\":{\"startTime\":\"2021-08-28T06:39:58Z\",\"completedTime\":\"2021-02-10T03:59:13Z\",\"state\":\"Completed\"},\"name\":\"vqdra\",\"groups\":[{},{}],\"afterStageWaitStatus\":{\"status\":{},\"waitDurationInSeconds\":1370032032}},{\"status\":{\"startTime\":\"2021-04-03T11:00:19Z\",\"completedTime\":\"2021-02-13T15:34:58Z\",\"state\":\"Skipped\"},\"name\":\"kanyktzlcuiywg\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{\"status\":{},\"waitDurationInSeconds\":508841198}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"zgpphrcgyncocpe\"},{\"version\":\"vmmcoofs\"},{\"version\":\"zevgb\"}]}}},\"eTag\":\"jqabcypmivkwlzuv\",\"id\":\"c\",\"name\":\"wnfnbacf\",\"type\":\"onlebxetqgtzxdpn\"}") .toObject(UpdateRunInner.class); + Assertions.assertEquals("mouexhdzx", model.strategy().stages().get(0).name()); + Assertions.assertEquals("eojnxqbzvddn", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1616692109, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("tqxln", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals(NodeImageSelectionType.CONSISTENT, model.managedClusterUpdate().nodeImageSelection().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateRunInner model = new UpdateRunInner() - .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList())) - .withManagedClusterUpdate(new ManagedClusterUpdate()); + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + 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), + new UpdateStage() + .withName("yeicxmqciwqvhk") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("uigdtopbobjog"), + new UpdateGroup().withName("m"), + new UpdateGroup().withName("w"))) + .withAfterStageWaitInSeconds(54099605), + new UpdateStage() + .withName("a") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("z"), + new UpdateGroup().withName("yvvtpgvdfgio"))) + .withAfterStageWaitInSeconds(1858576873)))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("tqxln")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))); model = BinaryData.fromObject(model).toObject(UpdateRunInner.class); + Assertions.assertEquals("mouexhdzx", model.strategy().stages().get(0).name()); + Assertions.assertEquals("eojnxqbzvddn", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1616692109, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("tqxln", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals(NodeImageSelectionType.CONSISTENT, 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 index 52a6f6d2bf06e..4f99c6ddd6a0c 100644 --- 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 @@ -6,7 +6,14 @@ 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; @@ -16,18 +23,101 @@ public void testDeserialize() throws Exception { UpdateRunListResult model = BinaryData .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"ndlik\",\"id\":\"qkgfgibma\",\"name\":\"gakeqsr\",\"type\":\"yb\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"tbciqfouflmm\",\"id\":\"zsm\",\"name\":\"dmgloug\",\"type\":\"b\"},{\"properties\":{\"provisioningState\":\"Failed\"},\"eTag\":\"uqktap\",\"id\":\"wgcu\",\"name\":\"rtumkdosvq\",\"type\":\"hbmdgbbjfdd\"}],\"nextLink\":\"bmbexppbhtqqro\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"f\"},{\"name\":\"rwzwbng\"},{\"name\":\"itnwuizgazxufi\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"kyfi\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-05-20T07:32:25Z\",\"completedTime\":\"2021-05-02T03:10:17Z\",\"state\":\"Skipped\"},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"sdkf\",\"id\":\"hwxmnteiwa\",\"name\":\"pvkmijcmmxdcuf\",\"type\":\"fsrpymzidnse\"},{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"sgfyccsnew\"},{\"name\":\"dwzjeiach\"},{\"name\":\"oosflnr\"},{\"name\":\"sfqpteehz\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"pyqr\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-12T13:01:17Z\",\"completedTime\":\"2021-01-25T11:13:44Z\",\"state\":\"Failed\"},\"stages\":[{},{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"qxhcrmn\",\"id\":\"hjtckwhd\",\"name\":\"oifiyipjxsqwpgr\",\"type\":\"bznorcjxvsnby\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"ocpcy\"},{\"name\":\"hurzafblj\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"btoqcjmkljavbqid\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-10-17T08:13:54Z\",\"completedTime\":\"2021-01-22T00:34:47Z\",\"state\":\"Completed\"},\"stages\":[{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"bzhfepgzgqexz\",\"id\":\"ocxscpaierhhbcs\",\"name\":\"l\",\"type\":\"mmajtjaodx\"},{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"k\"},{\"name\":\"pxokajionp\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"xg\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-02-01T21:21:11Z\",\"completedTime\":\"2021-04-23T14:47:55Z\",\"state\":\"Stopped\"},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"wzrlovmclwhij\",\"id\":\"oejctbzaqsqsy\",\"name\":\"bkbfkgukdkex\",\"type\":\"ppofmxaxcfjpgdd\"}],\"nextLink\":\"c\"}") .toObject(UpdateRunListResult.class); - Assertions.assertEquals("bmbexppbhtqqro", model.nextLink()); + Assertions.assertEquals("f", model.value().get(0).strategy().stages().get(0).name()); + Assertions + .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("kyfi", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals( + NodeImageSelectionType.LATEST, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); + Assertions.assertEquals("c", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateRunListResult model = new UpdateRunListResult() - .withValue(Arrays.asList(new UpdateRunInner(), new UpdateRunInner(), new UpdateRunInner())) - .withNextLink("bmbexppbhtqqro"); + .withValue( + Arrays + .asList( + new UpdateRunInner() + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + new UpdateStage().withName("f"), + new UpdateStage().withName("rwzwbng"), + new UpdateStage().withName("itnwuizgazxufi")))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.FULL) + .withKubernetesVersion("kyfi")) + .withNodeImageSelection( + new NodeImageSelection().withType(NodeImageSelectionType.LATEST))), + new UpdateRunInner() + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + new UpdateStage().withName("sgfyccsnew"), + new UpdateStage().withName("dwzjeiach"), + new UpdateStage().withName("oosflnr"), + new UpdateStage().withName("sfqpteehz")))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("pyqr")) + .withNodeImageSelection( + new NodeImageSelection().withType(NodeImageSelectionType.LATEST))), + new UpdateRunInner() + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + new UpdateStage().withName("ocpcy"), + new UpdateStage().withName("hurzafblj")))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("btoqcjmkljavbqid")) + .withNodeImageSelection( + new NodeImageSelection().withType(NodeImageSelectionType.LATEST))), + new UpdateRunInner() + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + new UpdateStage().withName("k"), + new UpdateStage().withName("pxokajionp")))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("xg")) + .withNodeImageSelection( + new NodeImageSelection().withType(NodeImageSelectionType.LATEST))))) + .withNextLink("c"); model = BinaryData.fromObject(model).toObject(UpdateRunListResult.class); - Assertions.assertEquals("bmbexppbhtqqro", model.nextLink()); + Assertions.assertEquals("f", model.value().get(0).strategy().stages().get(0).name()); + Assertions + .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("kyfi", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals( + NodeImageSelectionType.LATEST, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); + Assertions.assertEquals("c", 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 index fa8afb1009459..3146096ef2527 100644 --- 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 @@ -9,6 +9,9 @@ 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; @@ -20,13 +23,16 @@ public void testDeserialize() throws Exception { UpdateRunProperties model = BinaryData .fromString( - "{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"bnwbxgjvtbvpyssz\",\"groups\":[],\"afterStageWaitInSeconds\":315783866},{\"name\":\"jq\",\"groups\":[],\"afterStageWaitInSeconds\":1745806154},{\"name\":\"uouq\",\"groups\":[],\"afterStageWaitInSeconds\":326786210},{\"name\":\"zw\",\"groups\":[],\"afterStageWaitInSeconds\":2100303933}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"nwui\"}},\"status\":{\"status\":{\"startTime\":\"2021-08-08T04:29:53Z\",\"completedTime\":\"2021-11-07T16:18:10Z\",\"state\":\"Failed\"},\"stages\":[{\"name\":\"i\",\"groups\":[]}]}}") + "{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"xrjfeallnwsub\",\"groups\":[{\"name\":\"jampmngnzscxaqw\"},{\"name\":\"ochcbonqvpkvl\"}],\"afterStageWaitInSeconds\":1945684802},{\"name\":\"jease\",\"groups\":[{\"name\":\"eo\"},{\"name\":\"lokeyy\"},{\"name\":\"enjbdlwtgrhp\"},{\"name\":\"jp\"}],\"afterStageWaitInSeconds\":1270874920},{\"name\":\"asxazjpqyegualhb\",\"groups\":[{\"name\":\"e\"},{\"name\":\"jzzvdud\"}],\"afterStageWaitInSeconds\":621270176},{\"name\":\"slfhotwm\",\"groups\":[{\"name\":\"pwlbjnpg\"},{\"name\":\"cftadeh\"},{\"name\":\"nltyfsoppusuesnz\"}],\"afterStageWaitInSeconds\":332314223}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"avo\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-18T23:17:52Z\",\"completedTime\":\"2021-05-10T16:03:24Z\",\"state\":\"Completed\"},\"stages\":[{\"status\":{\"startTime\":\"2021-07-18T13:03:27Z\",\"completedTime\":\"2021-03-23T22:55:01Z\",\"state\":\"Stopped\"},\"name\":\"gujjugwdkcglh\",\"groups\":[{\"status\":{},\"name\":\"dyggdtjixhbku\",\"members\":[{},{},{}]},{\"status\":{},\"name\":\"yk\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-11-13T11:48:47Z\",\"completedTime\":\"2021-06-20T14:57:34Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":1089614022}},{\"status\":{\"startTime\":\"2021-05-17T05:51:50Z\",\"completedTime\":\"2021-02-12T00:37:49Z\",\"state\":\"Stopped\"},\"name\":\"sit\",\"groups\":[{\"status\":{},\"name\":\"mdectehfiqscjey\",\"members\":[{},{}]},{\"status\":{},\"name\":\"rkgqhcjrefo\",\"members\":[{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-02-03T09:21:46Z\",\"completedTime\":\"2021-09-03T21:11:18Z\",\"state\":\"Failed\"},\"waitDurationInSeconds\":1769493620}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"attpngjcrcczsq\"}]}}}") .toObject(UpdateRunProperties.class); - Assertions.assertEquals("bnwbxgjvtbvpyssz", model.strategy().stages().get(0).name()); - Assertions.assertEquals(315783866, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("xrjfeallnwsub", model.strategy().stages().get(0).name()); + Assertions.assertEquals("jampmngnzscxaqw", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1945684802, model.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("nwui", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions.assertEquals("avo", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals(NodeImageSelectionType.CONSISTENT, model.managedClusterUpdate().nodeImageSelection().type()); } @org.junit.jupiter.api.Test @@ -39,32 +45,55 @@ public void testSerialize() throws Exception { Arrays .asList( new UpdateStage() - .withName("bnwbxgjvtbvpyssz") - .withGroups(Arrays.asList()) - .withAfterStageWaitInSeconds(315783866), + .withName("xrjfeallnwsub") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("jampmngnzscxaqw"), + new UpdateGroup().withName("ochcbonqvpkvl"))) + .withAfterStageWaitInSeconds(1945684802), new UpdateStage() - .withName("jq") - .withGroups(Arrays.asList()) - .withAfterStageWaitInSeconds(1745806154), + .withName("jease") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("eo"), + new UpdateGroup().withName("lokeyy"), + new UpdateGroup().withName("enjbdlwtgrhp"), + new UpdateGroup().withName("jp"))) + .withAfterStageWaitInSeconds(1270874920), new UpdateStage() - .withName("uouq") - .withGroups(Arrays.asList()) - .withAfterStageWaitInSeconds(326786210), + .withName("asxazjpqyegualhb") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("e"), + new UpdateGroup().withName("jzzvdud"))) + .withAfterStageWaitInSeconds(621270176), new UpdateStage() - .withName("zw") - .withGroups(Arrays.asList()) - .withAfterStageWaitInSeconds(2100303933)))) + .withName("slfhotwm") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("pwlbjnpg"), + new UpdateGroup().withName("cftadeh"), + new UpdateGroup().withName("nltyfsoppusuesnz"))) + .withAfterStageWaitInSeconds(332314223)))) .withManagedClusterUpdate( new ManagedClusterUpdate() .withUpgrade( new ManagedClusterUpgradeSpec() .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("nwui"))); + .withKubernetesVersion("avo")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))); model = BinaryData.fromObject(model).toObject(UpdateRunProperties.class); - Assertions.assertEquals("bnwbxgjvtbvpyssz", model.strategy().stages().get(0).name()); - Assertions.assertEquals(315783866, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("xrjfeallnwsub", model.strategy().stages().get(0).name()); + Assertions.assertEquals("jampmngnzscxaqw", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1945684802, model.strategy().stages().get(0).afterStageWaitInSeconds()); Assertions .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("nwui", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions.assertEquals("avo", model.managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals(NodeImageSelectionType.CONSISTENT, 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 index 188cfb1be883b..fd4352a7c5c37 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { UpdateRunStatus model = BinaryData .fromString( - "{\"status\":{\"startTime\":\"2021-01-29T18:51:03Z\",\"completedTime\":\"2021-10-06T17:45:29Z\",\"state\":\"Stopped\"},\"stages\":[{\"status\":{\"startTime\":\"2021-03-07T01:43:41Z\",\"completedTime\":\"2021-03-18T16:28:01Z\",\"state\":\"Stopped\"},\"name\":\"dkirsoodqxhcr\",\"groups\":[],\"afterStageWaitStatus\":{\"waitDurationInSeconds\":1543175438}}]}") + "{\"status\":{\"startTime\":\"2021-05-23T11:03:50Z\",\"completedTime\":\"2021-01-18T04:02:20Z\",\"state\":\"Stopped\"},\"stages\":[{\"status\":{\"startTime\":\"2021-12-09T10:40:37Z\",\"completedTime\":\"2021-05-12T02:27:32Z\",\"state\":\"Skipped\"},\"name\":\"uxh\",\"groups\":[{\"status\":{\"startTime\":\"2020-12-29T05:18:57Z\",\"completedTime\":\"2021-08-19T10:45:17Z\",\"state\":\"Running\"},\"name\":\"oczvy\",\"members\":[{},{}]},{\"status\":{\"startTime\":\"2020-12-25T17:33:53Z\",\"completedTime\":\"2021-11-06T12:54:53Z\",\"state\":\"NotStarted\"},\"name\":\"rm\",\"members\":[{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-12-05T03:26:34Z\",\"completedTime\":\"2021-07-14T20:07:14Z\",\"state\":\"Failed\"},\"waitDurationInSeconds\":63177450}},{\"status\":{\"startTime\":\"2021-05-17T14:35:07Z\",\"completedTime\":\"2021-08-04T22:49:07Z\",\"state\":\"Failed\"},\"name\":\"iqzbq\",\"groups\":[{\"status\":{\"startTime\":\"2021-01-03T16:48:03Z\",\"completedTime\":\"2020-12-29T19:47:48Z\",\"state\":\"Running\"},\"name\":\"pkwlhz\",\"members\":[{},{}]},{\"status\":{\"startTime\":\"2021-11-18T04:52:43Z\",\"completedTime\":\"2021-11-08T00:37:22Z\",\"state\":\"Running\"},\"name\":\"nchrkcciww\",\"members\":[{},{},{}]},{\"status\":{\"startTime\":\"2021-02-07T01:05:42Z\",\"completedTime\":\"2021-05-03T11:30:29Z\",\"state\":\"Stopping\"},\"name\":\"ku\",\"members\":[{}]},{\"status\":{\"startTime\":\"2021-06-28T14:02:06Z\",\"completedTime\":\"2021-05-10T11:17:29Z\",\"state\":\"NotStarted\"},\"name\":\"mjmvxieduugidyjr\",\"members\":[{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-05-02T14:53:40Z\",\"completedTime\":\"2021-06-03T02:24:21Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":635298433}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"ocohslkevleg\"},{\"version\":\"fbuhfmvfaxkffe\"},{\"version\":\"th\"}]}}") .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 index 77da1406fa529..e8c8d040b5d70 100644 --- 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 @@ -5,6 +5,7 @@ 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; @@ -16,10 +17,11 @@ public void testDeserialize() throws Exception { UpdateRunStrategy model = BinaryData .fromString( - "{\"stages\":[{\"name\":\"dfvzwdzuhty\",\"groups\":[],\"afterStageWaitInSeconds\":396497881}]}") + "{\"stages\":[{\"name\":\"hvmdajvnysounq\",\"groups\":[{\"name\":\"noae\"}],\"afterStageWaitInSeconds\":1901274446}]}") .toObject(UpdateRunStrategy.class); - Assertions.assertEquals("dfvzwdzuhty", model.stages().get(0).name()); - Assertions.assertEquals(396497881, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("hvmdajvnysounq", model.stages().get(0).name()); + Assertions.assertEquals("noae", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1901274446, model.stages().get(0).afterStageWaitInSeconds()); } @org.junit.jupiter.api.Test @@ -30,11 +32,12 @@ public void testSerialize() throws Exception { Arrays .asList( new UpdateStage() - .withName("dfvzwdzuhty") - .withGroups(Arrays.asList()) - .withAfterStageWaitInSeconds(396497881))); + .withName("hvmdajvnysounq") + .withGroups(Arrays.asList(new UpdateGroup().withName("noae"))) + .withAfterStageWaitInSeconds(1901274446))); model = BinaryData.fromObject(model).toObject(UpdateRunStrategy.class); - Assertions.assertEquals("dfvzwdzuhty", model.stages().get(0).name()); - Assertions.assertEquals(396497881, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("hvmdajvnysounq", model.stages().get(0).name()); + Assertions.assertEquals("noae", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1901274446, 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 new file mode 100644 index 0000000000000..cd04b11386cab --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java @@ -0,0 +1,125 @@ +// 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\",\"strategy\":{\"stages\":[{\"name\":\"abjy\",\"groups\":[{\"name\":\"ffimrzrtuzqogsex\"},{\"name\":\"evfdnwnwm\"},{\"name\":\"wzsyyceuzs\"},{\"name\":\"i\"}],\"afterStageWaitInSeconds\":414197490},{\"name\":\"dpfrxtrthzvaytdw\",\"groups\":[{\"name\":\"rqubpaxhexiil\"},{\"name\":\"vpdtiirqtdqoa\"}],\"afterStageWaitInSeconds\":200859544},{\"name\":\"uzf\",\"groups\":[{\"name\":\"uyfxrxxleptramxj\"},{\"name\":\"zwl\"}],\"afterStageWaitInSeconds\":2125136939},{\"name\":\"xuqlcvydypat\",\"groups\":[{\"name\":\"aojkniodk\"}],\"afterStageWaitInSeconds\":2101936696}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"nuj\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2020-12-30T11:27:59Z\",\"completedTime\":\"2021-04-12T18:02:31Z\",\"state\":\"Skipped\"},\"stages\":[{\"status\":{},\"name\":\"nfwjlfltkacjvefk\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"ggkfpagaowpul\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"xkqjnsjervt\",\"id\":\"agxsdszuemps\",\"name\":\"zkfzbeyv\",\"type\":\"nqicvinvkjjxdxrb\"}"; + + 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("imfnjhfjx") + .withExistingFleet("epxgyqagvr", "mnpkukghimdblxg") + .withStrategy( + new UpdateRunStrategy() + .withStages( + Arrays + .asList( + new UpdateStage() + .withName("foqreyfkzik") + .withGroups(Arrays.asList(new UpdateGroup().withName("wneaiv"))) + .withAfterStageWaitInSeconds(322973840), + new UpdateStage() + .withName("zel") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("r"), + new UpdateGroup().withName("lsfeaenwabfatkld"))) + .withAfterStageWaitInSeconds(2043314878), + new UpdateStage() + .withName("jhwuaanozjos") + .withGroups( + Arrays + .asList( + new UpdateGroup().withName("oulpjrv"), + new UpdateGroup().withName("ag"))) + .withAfterStageWaitInSeconds(1846305847), + new UpdateStage() + .withName("imjwosyt") + .withGroups(Arrays.asList(new UpdateGroup().withName("cskfcktqumiekk"))) + .withAfterStageWaitInSeconds(1320070179)))) + .withManagedClusterUpdate( + new ManagedClusterUpdate() + .withUpgrade( + new ManagedClusterUpgradeSpec() + .withType(ManagedClusterUpgradeType.FULL) + .withKubernetesVersion("hlyfjhdgqgg")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))) + .withIfMatch("sofwqmzqalkrmnji") + .withIfNoneMatch("pxacqqudfn") + .create(); + + Assertions.assertEquals("abjy", response.strategy().stages().get(0).name()); + Assertions.assertEquals("ffimrzrtuzqogsex", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(414197490, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("nuj", 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 index a9c591142ce22..1070d1aece428 100644 --- 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 @@ -56,8 +56,6 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager - .updateRuns() - .delete("jky", "xjvuujqgidokg", "ljyoxgvcltb", "sncghkjeszz", com.azure.core.util.Context.NONE); + manager.updateRuns().delete("hykojoxafnndlpic", "koymkcd", "h", "pkkpw", 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 index 5bd05a25bc98e..024e273caf5ad 100644 --- 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 @@ -12,10 +12,13 @@ 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; @@ -30,7 +33,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[]},\"managedClusterUpdate\":{},\"status\":{\"stages\":[]}},\"eTag\":\"ymuctqhjfbebrj\",\"id\":\"erfuwuttt\",\"name\":\"fvjrbirphxepcy\",\"type\":\"ahfn\"}"; + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"pomgkopkwhojvp\",\"groups\":[{\"name\":\"gxysmocmbqfqvm\"}],\"afterStageWaitInSeconds\":1181340997},{\"name\":\"oz\",\"groups\":[{\"name\":\"helxprglya\"},{\"name\":\"dd\"},{\"name\":\"kcbcue\"},{\"name\":\"rjxgciqib\"}],\"afterStageWaitInSeconds\":703095811},{\"name\":\"sxsdqrhzoymibm\",\"groups\":[{\"name\":\"ibahwflus\"}],\"afterStageWaitInSeconds\":2001573010}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"rkwofyyvoqa\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-02-27T01:52:43Z\",\"completedTime\":\"2021-06-16T10:32:31Z\",\"state\":\"NotStarted\"},\"stages\":[{\"status\":{},\"name\":\"washr\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"qxwbpokulpiu\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"i\",\"id\":\"obyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,7 +64,17 @@ public void testGetWithResponse() throws Exception { UpdateRun response = manager .updateRuns() - .getWithResponse("senhwlrs", "frzpwvlqdqgb", "qylihkaetckt", com.azure.core.util.Context.NONE) + .getWithResponse("yzvqt", "nubexk", "zksmondj", com.azure.core.util.Context.NONE) .getValue(); + + Assertions.assertEquals("pomgkopkwhojvp", response.strategy().stages().get(0).name()); + Assertions.assertEquals("gxysmocmbqfqvm", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1181340997, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, response.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("rkwofyyvoqa", 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/UpdateRunsListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java index 6a7b670000583..97da5b802d023 100644 --- 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 @@ -13,10 +13,13 @@ 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; @@ -31,7 +34,7 @@ public void testListByFleet() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[]},\"managedClusterUpdate\":{},\"status\":{\"stages\":[]}},\"eTag\":\"gyxzk\",\"id\":\"ocukoklyax\",\"name\":\"conuqszfkbeype\",\"type\":\"rmjmwvvjektc\"}]}"; + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"tbhjpglkfgohdneu\",\"groups\":[{\"name\":\"phsdyhto\"},{\"name\":\"fikdowwqu\"},{\"name\":\"v\"},{\"name\":\"zx\"}],\"afterStageWaitInSeconds\":1297043875},{\"name\":\"ithhqzon\",\"groups\":[{\"name\":\"gbhcohfwdsj\"},{\"name\":\"ka\"},{\"name\":\"jutiiswacff\"}],\"afterStageWaitInSeconds\":264036091},{\"name\":\"zzewkfvhqcrai\",\"groups\":[{\"name\":\"n\"},{\"name\":\"pfuflrw\"}],\"afterStageWaitInSeconds\":1760230888},{\"name\":\"dlxyjrxs\",\"groups\":[{\"name\":\"fcnihgwq\"},{\"name\":\"pnedgf\"}],\"afterStageWaitInSeconds\":739247633}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"vq\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-09-19T11:38:13Z\",\"completedTime\":\"2021-10-03T13:34:01Z\",\"state\":\"Running\"},\"stages\":[{\"status\":{},\"name\":\"otbobzdopcj\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"d\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"rslpmutwuoeg\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"yqsluic\",\"id\":\"dggkzzlvmbmpa\",\"name\":\"modfvuefywsbpfvm\",\"type\":\"yhrfouyftaakcpw\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -60,6 +63,20 @@ public void testListByFleet() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = - manager.updateRuns().listByFleet("qnwvlrya", "w", com.azure.core.util.Context.NONE); + manager.updateRuns().listByFleet("lauwzizxbmpgcjef", "zmuvpbttdumorppx", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("tbhjpglkfgohdneu", response.iterator().next().strategy().stages().get(0).name()); + Assertions + .assertEquals("phsdyhto", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); + Assertions + .assertEquals(1297043875, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals( + ManagedClusterUpgradeType.FULL, response.iterator().next().managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("vq", response.iterator().next().managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions + .assertEquals( + NodeImageSelectionType.CONSISTENT, + 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 index 2c509c85f6d09..8dbaee34a5466 100644 --- 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 @@ -12,10 +12,13 @@ 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; @@ -30,7 +33,7 @@ public void testStart() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[]},\"managedClusterUpdate\":{},\"status\":{\"stages\":[]}},\"eTag\":\"fbxzpuzycisp\",\"id\":\"zahmgkbrpyydhibn\",\"name\":\"qqkpikadrg\",\"type\":\"tqagnbuynh\"}"; + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"qkacewii\",\"groups\":[{\"name\":\"ubjibww\"},{\"name\":\"f\"}],\"afterStageWaitInSeconds\":1856548413}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"vpuvks\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-28T10:41:26Z\",\"completedTime\":\"2021-07-05T23:56:24Z\",\"state\":\"Stopped\"},\"stages\":[{\"status\":{},\"name\":\"huopxodlqiynto\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"osjswsr\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"pzbchck\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"ysuiizynkedya\",\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -61,6 +64,15 @@ public void testStart() throws Exception { UpdateRun response = manager .updateRuns() - .start("bijhtxfvgxbf", "mxnehmp", "ec", "godebfqkkrbmpu", com.azure.core.util.Context.NONE); + .start("reqnovvqfov", "jxywsuws", "rsndsytgadgvra", "aeneqnzarrwl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qkacewii", response.strategy().stages().get(0).name()); + Assertions.assertEquals("ubjibww", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1856548413, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, response.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("vpuvks", 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/UpdateRunsStopMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopMockTests.java index 989907a296b1b..f4db12375841d 100644 --- 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 @@ -12,10 +12,13 @@ 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; @@ -30,7 +33,7 @@ public void testStop() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[]},\"managedClusterUpdate\":{},\"status\":{\"stages\":[]}},\"eTag\":\"synlqidybyxczfc\",\"id\":\"aaxdbabphlwrq\",\"name\":\"fkts\",\"type\":\"hsucoc\"}"; + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"kotl\",\"groups\":[{\"name\":\"yhgsy\"}],\"afterStageWaitInSeconds\":1150957892}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"ltdtbnnhad\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2020-12-23T13:08:39Z\",\"completedTime\":\"2021-09-01T15:57:06Z\",\"state\":\"Stopping\"},\"stages\":[{\"status\":{},\"name\":\"gxqquezik\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"allatmelwuipic\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"v\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"y\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"ueedndrdvs\",\"id\":\"kwqqtchealmf\",\"name\":\"tdaaygdvwvg\",\"type\":\"iohgwxrtfud\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -59,13 +62,16 @@ public void testStop() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); UpdateRun response = - manager - .updateRuns() - .stop( - "jggmebfsiarbu", - "rcvpnazzmhjrunmp", - "ttdbhrbnl", - "nkxmyskpbhenbtk", - com.azure.core.util.Context.NONE); + manager.updateRuns().stop("mwzn", "abikns", "rgjhxb", "dtlwwrlkd", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("kotl", response.strategy().stages().get(0).name()); + Assertions.assertEquals("yhgsy", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1150957892, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions + .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, response.managedClusterUpdate().upgrade().type()); + Assertions.assertEquals("ltdtbnnhad", 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 index d87c5cd07e5ce..01e8c07891437 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { UpdateStageStatus model = BinaryData .fromString( - "{\"status\":{\"startTime\":\"2021-12-04T15:56:22Z\",\"completedTime\":\"2020-12-23T01:19:24Z\",\"state\":\"Stopped\"},\"name\":\"wpgrjbzno\",\"groups\":[{\"status\":{\"startTime\":\"2021-01-31T18:34:57Z\",\"completedTime\":\"2021-11-14T01:20:47Z\",\"state\":\"Stopping\"},\"name\":\"bnmo\",\"members\":[]},{\"status\":{\"startTime\":\"2021-08-24T13:39:32Z\",\"completedTime\":\"2021-08-24T18:20:56Z\",\"state\":\"Stopped\"},\"name\":\"ljjgpbtoqcjmkl\",\"members\":[]},{\"status\":{\"startTime\":\"2021-11-17T00:12:24Z\",\"completedTime\":\"2021-04-20T08:45:23Z\",\"state\":\"Stopping\"},\"name\":\"yulpkudjkr\",\"members\":[]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-09-13T05:12:15Z\",\"completedTime\":\"2021-02-23T09:32:58Z\",\"state\":\"Failed\"},\"waitDurationInSeconds\":210488856}}") + "{\"status\":{\"startTime\":\"2021-11-07T07:40:57Z\",\"completedTime\":\"2021-04-24T05:01:37Z\",\"state\":\"Stopped\"},\"name\":\"ggi\",\"groups\":[{\"status\":{\"startTime\":\"2021-08-02T21:26:13Z\",\"completedTime\":\"2021-06-24T22:46:45Z\",\"state\":\"Stopping\"},\"name\":\"nspydptkoenkoukn\",\"members\":[{\"status\":{\"startTime\":\"2020-12-28T19:13:15Z\",\"completedTime\":\"2021-08-25T19:52:36Z\",\"state\":\"Skipped\"},\"name\":\"gkpocipazyxoe\",\"clusterResourceId\":\"kgjn\",\"operationId\":\"ucgygevqz\",\"message\":\"yp\"},{\"status\":{\"startTime\":\"2021-10-14T05:08:35Z\",\"completedTime\":\"2021-11-28T09:01:44Z\",\"state\":\"Skipped\"},\"name\":\"j\",\"clusterResourceId\":\"pyd\",\"operationId\":\"yhxdeoejzicwi\",\"message\":\"jttgzf\"},{\"status\":{\"startTime\":\"2021-03-25T08:46:02Z\",\"completedTime\":\"2021-05-30T04:32:56Z\",\"state\":\"Running\"},\"name\":\"deyeamdphagalpbu\",\"clusterResourceId\":\"gipwhonowkg\",\"operationId\":\"wankixzbi\",\"message\":\"eputtmrywnuzoqf\"},{\"status\":{\"startTime\":\"2021-10-11T21:17:46Z\",\"completedTime\":\"2021-11-21T21:02:37Z\",\"state\":\"NotStarted\"},\"name\":\"vyxlwhzlsicohoqq\",\"clusterResourceId\":\"vlryavwhheunmmq\",\"operationId\":\"yxzk\",\"message\":\"ocukoklyax\"}]},{\"status\":{\"startTime\":\"2021-10-22T03:41:48Z\",\"completedTime\":\"2021-02-12T02:33:14Z\",\"state\":\"Running\"},\"name\":\"beypewrmjmw\",\"members\":[{\"status\":{\"startTime\":\"2021-02-06T15:34:06Z\",\"completedTime\":\"2021-10-27T06:34:42Z\",\"state\":\"Stopped\"},\"name\":\"wlrsffrzpwv\",\"clusterResourceId\":\"dqgbiqylihkaetc\",\"operationId\":\"vfcivfsnkymuc\",\"message\":\"hjfbebrjcxe\"},{\"status\":{\"startTime\":\"2021-03-04T14:54:10Z\",\"completedTime\":\"2021-09-07T01:58:14Z\",\"state\":\"Completed\"},\"name\":\"vjrbirphxepcyvah\",\"clusterResourceId\":\"ljkyqxjvuuj\",\"operationId\":\"idokgjlj\",\"message\":\"xgvcl\"},{\"status\":{\"startTime\":\"2021-10-11T10:12:30Z\",\"completedTime\":\"2021-04-14T10:54:43Z\",\"state\":\"Stopping\"},\"name\":\"esz\",\"clusterResourceId\":\"bijhtxfvgxbf\",\"operationId\":\"xnehmpvec\",\"message\":\"odebfqkkrbmpu\"}]},{\"status\":{\"startTime\":\"2021-10-09T22:24:23Z\",\"completedTime\":\"2021-05-25T13:56:26Z\",\"state\":\"Running\"},\"name\":\"bxzpuzycisp\",\"members\":[{\"status\":{\"startTime\":\"2021-06-02T06:32:59Z\",\"completedTime\":\"2021-03-22T11:59:20Z\",\"state\":\"NotStarted\"},\"name\":\"y\",\"clusterResourceId\":\"ibnuqqkpik\",\"operationId\":\"rgvtqag\",\"message\":\"uynhijg\"},{\"status\":{\"startTime\":\"2021-04-23T17:49:38Z\",\"completedTime\":\"2021-11-02T05:09:13Z\",\"state\":\"Skipped\"},\"name\":\"utrc\",\"clusterResourceId\":\"na\",\"operationId\":\"mhjrunmpxttdbhr\",\"message\":\"l\"},{\"status\":{\"startTime\":\"2021-04-13T18:59:18Z\",\"completedTime\":\"2021-10-16T22:37:56Z\",\"state\":\"Failed\"},\"name\":\"henbtkcxywnytn\",\"clusterResourceId\":\"yn\",\"operationId\":\"idybyxczf\",\"message\":\"haaxdbabphl\"},{\"status\":{\"startTime\":\"2021-10-12T16:41:20Z\",\"completedTime\":\"2021-09-07T10:16:41Z\",\"state\":\"Running\"},\"name\":\"sucocmnyyazttbtw\",\"clusterResourceId\":\"qpuedckzywbiex\",\"operationId\":\"eyueaxibxujwb\",\"message\":\"walm\"}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-10-07T17:56:10Z\",\"completedTime\":\"2021-07-26T23:02:26Z\",\"state\":\"NotStarted\"},\"waitDurationInSeconds\":1101011494}}") .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 index 12f255a7fa124..a9380c31af977 100644 --- 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 @@ -16,28 +16,24 @@ public void testDeserialize() throws Exception { UpdateStage model = BinaryData .fromString( - "{\"name\":\"kfthwxmntei\",\"groups\":[{\"name\":\"pvkmijcmmxdcuf\"},{\"name\":\"fsrpymzidnse\"},{\"name\":\"cxtbzsg\"}],\"afterStageWaitInSeconds\":121296393}") + "{\"name\":\"hy\",\"groups\":[{\"name\":\"rpmopjmc\"},{\"name\":\"atuokthfuiu\"}],\"afterStageWaitInSeconds\":1445775245}") .toObject(UpdateStage.class); - Assertions.assertEquals("kfthwxmntei", model.name()); - Assertions.assertEquals("pvkmijcmmxdcuf", model.groups().get(0).name()); - Assertions.assertEquals(121296393, model.afterStageWaitInSeconds()); + Assertions.assertEquals("hy", model.name()); + Assertions.assertEquals("rpmopjmc", model.groups().get(0).name()); + Assertions.assertEquals(1445775245, model.afterStageWaitInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UpdateStage model = new UpdateStage() - .withName("kfthwxmntei") + .withName("hy") .withGroups( - Arrays - .asList( - new UpdateGroup().withName("pvkmijcmmxdcuf"), - new UpdateGroup().withName("fsrpymzidnse"), - new UpdateGroup().withName("cxtbzsg"))) - .withAfterStageWaitInSeconds(121296393); + Arrays.asList(new UpdateGroup().withName("rpmopjmc"), new UpdateGroup().withName("atuokthfuiu"))) + .withAfterStageWaitInSeconds(1445775245); model = BinaryData.fromObject(model).toObject(UpdateStage.class); - Assertions.assertEquals("kfthwxmntei", model.name()); - Assertions.assertEquals("pvkmijcmmxdcuf", model.groups().get(0).name()); - Assertions.assertEquals(121296393, model.afterStageWaitInSeconds()); + Assertions.assertEquals("hy", model.name()); + Assertions.assertEquals("rpmopjmc", model.groups().get(0).name()); + Assertions.assertEquals(1445775245, 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 index 4716012cd2cc1..57c63c3f03e55 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { UpdateStatus model = BinaryData .fromString( - "{\"startTime\":\"2020-12-26T05:08:12Z\",\"completedTime\":\"2021-01-23T02:14:07Z\",\"state\":\"Stopping\"}") + "{\"startTime\":\"2021-01-03T07:04:49Z\",\"completedTime\":\"2021-04-12T11:49:32Z\",\"state\":\"Stopping\"}") .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 new file mode 100644 index 0000000000000..e3c96d8a8bb5c --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java @@ -0,0 +1,25 @@ +// 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\":\"76b7828f-37cf-466a-9823-c05f180a3472\",\"clientId\":\"ac729feb-61c8-45b4-b1de-5cacf436ee60\"}") + .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 index 15506705ac0a2..1cec50bf5a55f 100644 --- 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 @@ -13,7 +13,7 @@ public void testDeserialize() throws Exception { WaitStatus model = BinaryData .fromString( - "{\"status\":{\"startTime\":\"2021-04-20T10:26:18Z\",\"completedTime\":\"2021-10-12T01:56:34Z\",\"state\":\"Stopped\"},\"waitDurationInSeconds\":1046063438}") + "{\"status\":{\"startTime\":\"2021-04-22T17:58:43Z\",\"completedTime\":\"2021-09-11T06:43:14Z\",\"state\":\"NotStarted\"},\"waitDurationInSeconds\":1045887723}") .toObject(WaitStatus.class); }