diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md index 80393dfe98025..d8a4d4dc54005 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2023-10-25) + +- Azure Resource Manager ContainerServiceFleet client library for Java. This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md index 4865ffbd848f7..cd522148ee9b3 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-08-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-10. 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.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md index 75e35f9ab9901..10a99f8310185 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md @@ -44,7 +44,7 @@ /** Samples for FleetMembers Create. */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/FleetMembers_Create.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -70,7 +70,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-08-15-preview/examples/FleetMembers_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. @@ -90,7 +90,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-08-15-preview/examples/FleetMembers_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. @@ -110,7 +110,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-08-15-preview/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. @@ -132,7 +132,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-08-15-preview/examples/FleetMembers_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. @@ -162,7 +162,7 @@ import java.util.Arrays; /** Samples for FleetUpdateStrategies CreateOrUpdate. */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. @@ -195,7 +195,7 @@ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /** Samples for FleetUpdateStrategies Delete. */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. @@ -215,7 +215,7 @@ public final class FleetUpdateStrategiesDeleteSamples { /** Samples for FleetUpdateStrategies Get. */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. @@ -235,7 +235,7 @@ public final class FleetUpdateStrategiesGetSamples { /** Samples for FleetUpdateStrategies ListByFleet. */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. @@ -252,15 +252,13 @@ public final class FleetUpdateStrategiesListByFleetSamples { ### Fleets_CreateOrUpdate ```java -import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; -import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import java.util.HashMap; 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-08-15-preview/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -275,10 +273,6 @@ public final class FleetsCreateOrUpdateSamples { .withRegion("East US") .withExistingResourceGroup("rg1") .withTags(mapOf("archv2", "", "tier", "production")) - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("dnsprefix1") - .withAgentProfile(new AgentProfile().withVmSize("Standard_DS1"))) .create(); } @@ -302,7 +296,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-08-15-preview/examples/Fleets_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. @@ -322,7 +316,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-08-15-preview/examples/Fleets_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. @@ -342,7 +336,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-08-15-preview/examples/Fleets_ListBySub.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. @@ -362,7 +356,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-08-15-preview/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. @@ -382,7 +376,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-08-15-preview/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. @@ -406,7 +400,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-08-15-preview/examples/Fleets_PatchTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -443,7 +437,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-08-15-preview/examples/Operations_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Operations_List.json */ /** * Sample code: List the operations for the provider. @@ -473,7 +467,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-08-15-preview/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. @@ -515,7 +509,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-08-15-preview/examples/UpdateRuns_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. @@ -535,7 +529,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-08-15-preview/examples/UpdateRuns_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. @@ -555,7 +549,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-08-15-preview/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. @@ -575,7 +569,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-08-15-preview/examples/UpdateRuns_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. @@ -595,7 +589,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-08-15-preview/examples/UpdateRuns_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 00fd6fc1526df..82ba9e99d7dd9 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-08-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-10. https://github.com/Azure/azure-sdk-for-java 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 4f8971a322adb..a3055c98060ce 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 @@ -220,7 +220,7 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu .append("-") .append("com.azure.resourcemanager.containerservicefleet") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 9ae7c731c5340..837aa10b5b9ba 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; 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; @@ -120,29 +119,6 @@ public FleetProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Get the hubProfile property: The FleetHubProfile configures the Fleet's hub. - * - * @return the hubProfile value. - */ - public FleetHubProfile hubProfile() { - return this.innerProperties() == null ? null : this.innerProperties().hubProfile(); - } - - /** - * Set the hubProfile property: The FleetHubProfile configures the Fleet's hub. - * - * @param hubProfile the hubProfile value to set. - * @return the FleetInner object itself. - */ - public FleetInner withHubProfile(FleetHubProfile hubProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new FleetProperties(); - } - this.innerProperties().withHubProfile(hubProfile); - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java index 3b07fc602230d..01fa8291d3db8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.containerservicefleet.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; /** Fleet properties. */ -@Fluent +@Immutable public final class FleetProperties { /* * The status of the last operation. @@ -18,12 +17,6 @@ public final class FleetProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private FleetProvisioningState provisioningState; - /* - * The FleetHubProfile configures the Fleet's hub. - */ - @JsonProperty(value = "hubProfile") - private FleetHubProfile hubProfile; - /** Creates an instance of FleetProperties class. */ public FleetProperties() { } @@ -37,34 +30,11 @@ public FleetProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the hubProfile property: The FleetHubProfile configures the Fleet's hub. - * - * @return the hubProfile value. - */ - public FleetHubProfile hubProfile() { - return this.hubProfile; - } - - /** - * Set the hubProfile property: The FleetHubProfile configures the Fleet's hub. - * - * @param hubProfile the hubProfile value to set. - * @return the FleetProperties object itself. - */ - public FleetProperties withHubProfile(FleetHubProfile hubProfile) { - this.hubProfile = hubProfile; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (hubProfile() != null) { - hubProfile().validate(); - } } } 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 4b034c6d669be..f339bc016a73e 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 @@ -194,7 +194,7 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-08-15-preview"; + this.apiVersion = "2023-10-15"; 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 ec42ed7e9ad02..7f855d798b6ac 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 @@ -11,7 +11,6 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; import com.azure.resourcemanager.containerservicefleet.models.Fleet; import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults; -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; @@ -64,10 +63,6 @@ public FleetProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public FleetHubProfile hubProfile() { - return this.innerModel().hubProfile(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -225,11 +220,6 @@ public FleetImpl withIdentity(ManagedServiceIdentity identity) { } } - public FleetImpl withHubProfile(FleetHubProfile hubProfile) { - this.innerModel().withHubProfile(hubProfile); - return this; - } - public FleetImpl withIfMatch(String ifMatch) { if (isInCreateMode()) { this.createIfMatch = ifMatch; 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 deleted file mode 100644 index 1c60272cf4cba..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AgentProfile.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.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; - - /* - * The virtual machine size of the Fleet hub. - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /** 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; - } - - /** - * Get the vmSize property: The virtual machine size of the Fleet hub. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The virtual machine size of the Fleet hub. - * - * @param vmSize the vmSize value to set. - * @return the AgentProfile object itself. - */ - public AgentProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - 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 deleted file mode 100644 index 3f2b6771dd07e..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ApiServerAccessProfile.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.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 063c111645649..ed8ed7eba073e 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 @@ -79,13 +79,6 @@ public interface Fleet { */ FleetProvisioningState provisioningState(); - /** - * Gets the hubProfile property: The FleetHubProfile configures the Fleet's hub. - * - * @return the hubProfile value. - */ - FleetHubProfile hubProfile(); - /** * Gets the region of the resource. * @@ -165,7 +158,6 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithHubProfile, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** @@ -206,17 +198,6 @@ interface WithIdentity { WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the Fleet definition allowing to specify hubProfile. */ - interface WithHubProfile { - /** - * Specifies the hubProfile property: The FleetHubProfile configures the Fleet's hub.. - * - * @param hubProfile The FleetHubProfile configures the Fleet's hub. - * @return the next definition stage. - */ - WithCreate withHubProfile(FleetHubProfile hubProfile); - } - /** The stage of the Fleet definition allowing to specify ifMatch. */ interface WithIfMatch { /** 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 deleted file mode 100644 index 86999df1f0507..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetHubProfile.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The FleetHubProfile configures the fleet hub. */ -@Fluent -public final class FleetHubProfile { - /* - * DNS prefix used to create the FQDN for the Fleet hub. - */ - @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. - */ - @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) - private String fqdn; - - /* - * The Kubernetes version of the Fleet hub. - */ - @JsonProperty(value = "kubernetesVersion", access = JsonProperty.Access.WRITE_ONLY) - private String kubernetesVersion; - - /* - * The Azure Portal FQDN of the Fleet hub. - */ - @JsonProperty(value = "portalFqdn", access = JsonProperty.Access.WRITE_ONLY) - private String portalFqdn; - - /** Creates an instance of FleetHubProfile class. */ - public FleetHubProfile() { - } - - /** - * Get the dnsPrefix property: DNS prefix used to create the FQDN for the Fleet hub. - * - * @return the dnsPrefix value. - */ - public String dnsPrefix() { - return this.dnsPrefix; - } - - /** - * Set the dnsPrefix property: DNS prefix used to create the FQDN for the Fleet hub. - * - * @param dnsPrefix the dnsPrefix value to set. - * @return the FleetHubProfile object itself. - */ - public FleetHubProfile withDnsPrefix(String dnsPrefix) { - this.dnsPrefix = 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. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the kubernetesVersion property: The Kubernetes version of the Fleet hub. - * - * @return the kubernetesVersion value. - */ - public String kubernetesVersion() { - return this.kubernetesVersion; - } - - /** - * Get the portalFqdn property: The Azure Portal FQDN of the Fleet hub. - * - * @return the portalFqdn value. - */ - public String portalFqdn() { - return this.portalFqdn; - } - - /** - * Validates the instance. - * - * @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/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json index 428c7ab6a3fb9..5fc41cdad40b0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservicefleet/reflect-config.json @@ -28,21 +28,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.containerservicefleet.models.AgentProfile", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity", "allDeclaredConstructors" : true, diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateSamples.java index 355ff392a4f78..c5945c6a8d333 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-08-15-preview/examples/FleetMembers_Create.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 d678e1403348c..9ae0ce3239f6d 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-08-15-preview/examples/FleetMembers_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 9ccf9eea319de..8ff12b84e2326 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-08-15-preview/examples/FleetMembers_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 8337aee6af02a..157c8d82dc5ae 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-08-15-preview/examples/FleetMembers_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 708134055f8ca..7797f84ee5351 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-08-15-preview/examples/FleetMembers_Update.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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/FleetUpdateStrategiesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java index 73b55d7e636ed..1466d7521a85c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for FleetUpdateStrategies CreateOrUpdate. */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java index d6f6ba13d3f74..d6748211361b0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for FleetUpdateStrategies Delete. */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java index a15f915fa02da..3c228f6a7e799 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for FleetUpdateStrategies Get. */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java index c88d189561504..bf1b1631bb680 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetSamples.java @@ -7,7 +7,7 @@ /** Samples for FleetUpdateStrategies ListByFleet. */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. 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 7b9ce2699152e..a77d285564c0d 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 @@ -4,15 +4,13 @@ package com.azure.resourcemanager.containerservicefleet.generated; -import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; -import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import java.util.HashMap; 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-08-15-preview/examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -27,10 +25,6 @@ public static void createsAFleetResourceWithALongRunningOperation( .withRegion("East US") .withExistingResourceGroup("rg1") .withTags(mapOf("archv2", "", "tier", "production")) - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("dnsprefix1") - .withAgentProfile(new AgentProfile().withVmSize("Standard_DS1"))) .create(); } 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 52aeb1855f2bf..e3f16ffc7284f 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-08-15-preview/examples/Fleets_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 e666acd3f8694..33970a49f5982 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-08-15-preview/examples/Fleets_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 704ea45c8f3d8..9a76ead88a688 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-08-15-preview/examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 0f5b966f71d53..0448fed785eee 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-08-15-preview/examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 521a862565d8a..517bd9a38d80b 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-08-15-preview/examples/Fleets_ListBySub.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 7ee152bc232d8..15a5eabd0ce2c 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-08-15-preview/examples/Fleets_PatchTags.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. 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 5542bb8d4b7f5..053a5400e4f69 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-08-15-preview/examples/Operations_List.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 eb2d52cb2cf64..8b00c50b172b6 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 @@ -17,7 +17,7 @@ /** Samples for UpdateRuns CreateOrUpdate. */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-08-15-preview/examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/examples/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. 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 33a6429331e41..310c1e34f22f4 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-08-15-preview/examples/UpdateRuns_Delete.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 33ca022315900..a7edeb525d0b3 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-08-15-preview/examples/UpdateRuns_Get.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 af1e8f632f62c..59770fe65bf85 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-08-15-preview/examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 b1077cc9010ab..803cc431b3f12 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-08-15-preview/examples/UpdateRuns_Start.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 19ea137f7daea..df5398a5ae7f2 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-08-15-preview/examples/UpdateRuns_Stop.json + * x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/stable/2023-10-15/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 deleted file mode 100644 index 6461f30cc34fe..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AgentProfileTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.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\":\"ot\",\"vmSize\":\"qgoulznd\"}").toObject(AgentProfile.class); - Assertions.assertEquals("ot", model.subnetId()); - Assertions.assertEquals("qgoulznd", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentProfile model = new AgentProfile().withSubnetId("ot").withVmSize("qgoulznd"); - model = BinaryData.fromObject(model).toObject(AgentProfile.class); - Assertions.assertEquals("ot", model.subnetId()); - Assertions.assertEquals("qgoulznd", model.vmSize()); - } -} 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 deleted file mode 100644 index 876603546d3f3..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ApiServerAccessProfileTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.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\":false,\"enableVnetIntegration\":false,\"subnetId\":\"yypnddhsgcbacphe\"}") - .toObject(ApiServerAccessProfile.class); - Assertions.assertEquals(false, model.enablePrivateCluster()); - Assertions.assertEquals(false, model.enableVnetIntegration()); - Assertions.assertEquals("yypnddhsgcbacphe", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApiServerAccessProfile model = - new ApiServerAccessProfile() - .withEnablePrivateCluster(false) - .withEnableVnetIntegration(false) - .withSubnetId("yypnddhsgcbacphe"); - model = BinaryData.fromObject(model).toObject(ApiServerAccessProfile.class); - Assertions.assertEquals(false, model.enablePrivateCluster()); - Assertions.assertEquals(false, model.enableVnetIntegration()); - Assertions.assertEquals("yypnddhsgcbacphe", 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 deleted file mode 100644 index 762e7965ab00d..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult; - -public final class FleetCredentialResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetCredentialResult model = - BinaryData.fromString("{\"name\":\"algbquxigjyjg\"}").toObject(FleetCredentialResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetCredentialResult model = new FleetCredentialResult(); - model = BinaryData.fromObject(model).toObject(FleetCredentialResult.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java deleted file mode 100644 index 783f34067fe04..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner; - -public final class FleetCredentialResultsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetCredentialResultsInner model = - BinaryData - .fromString("{\"kubeconfigs\":[{\"name\":\"ppbhtqqrolfp\"}]}") - .toObject(FleetCredentialResultsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetCredentialResultsInner model = new FleetCredentialResultsInner(); - model = BinaryData.fromObject(model).toObject(FleetCredentialResultsInner.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java deleted file mode 100644 index c6d436387f019..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; -import com.azure.resourcemanager.containerservicefleet.models.ApiServerAccessProfile; -import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; -import org.junit.jupiter.api.Assertions; - -public final class FleetHubProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetHubProfile model = - BinaryData - .fromString( - "{\"dnsPrefix\":\"nhutjeltmrldhugj\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":true,\"subnetId\":\"hocdgeab\"},\"agentProfile\":{\"subnetId\":\"huticndvkao\",\"vmSize\":\"yiftyhxhuro\"},\"fqdn\":\"tyxolniwpwc\",\"kubernetesVersion\":\"jfkgiawxk\",\"portalFqdn\":\"ypl\"}") - .toObject(FleetHubProfile.class); - Assertions.assertEquals("nhutjeltmrldhugj", model.dnsPrefix()); - Assertions.assertEquals(false, model.apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("hocdgeab", model.apiServerAccessProfile().subnetId()); - Assertions.assertEquals("huticndvkao", model.agentProfile().subnetId()); - Assertions.assertEquals("yiftyhxhuro", model.agentProfile().vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetHubProfile model = - new FleetHubProfile() - .withDnsPrefix("nhutjeltmrldhugj") - .withApiServerAccessProfile( - new ApiServerAccessProfile() - .withEnablePrivateCluster(false) - .withEnableVnetIntegration(true) - .withSubnetId("hocdgeab")) - .withAgentProfile(new AgentProfile().withSubnetId("huticndvkao").withVmSize("yiftyhxhuro")); - model = BinaryData.fromObject(model).toObject(FleetHubProfile.class); - Assertions.assertEquals("nhutjeltmrldhugj", model.dnsPrefix()); - Assertions.assertEquals(false, model.apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("hocdgeab", model.apiServerAccessProfile().subnetId()); - Assertions.assertEquals("huticndvkao", model.agentProfile().subnetId()); - Assertions.assertEquals("yiftyhxhuro", model.agentProfile().vmSize()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java deleted file mode 100644 index 0b431bd1d11c9..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; -import com.azure.resourcemanager.containerservicefleet.models.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; - -public final class FleetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"hubProfile\":{\"dnsPrefix\":\"trg\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"s\"},\"agentProfile\":{\"subnetId\":\"gvfcj\",\"vmSize\":\"zoxxjtf\"},\"fqdn\":\"luwfzitonpeqfpjk\",\"kubernetesVersion\":\"xofpdvhpfxxypi\",\"portalFqdn\":\"nmayhuybb\"}},\"eTag\":\"odepoogin\",\"identity\":{\"principalId\":\"41fc5068-f4b4-43c8-8c7f-b0509ceea1f4\",\"tenantId\":\"6981f5a7-0039-4307-96c0-c377f770d0d4\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"narxzxtheotus\":{\"principalId\":\"ae638241-d0a0-47cf-a5ae-3d9d1bf51f87\",\"clientId\":\"d405e5e1-947a-441a-9752-478077162f96\"},\"evcciqihnhun\":{\"principalId\":\"5510c36d-e29c-47c1-ae56-4001feaf2c1c\",\"clientId\":\"6e4dc999-1e22-4e03-b9c2-f64a6ac441f5\"},\"jzrnf\":{\"principalId\":\"614b2426-c641-4743-957d-627ae53c9655\",\"clientId\":\"8a280838-ba4b-4e4a-a70c-76bfe9e071d7\"},\"gispemvtzfkufubl\":{\"principalId\":\"2a1fccd1-8ddf-4ec7-8936-a9fb9f9fc119\",\"clientId\":\"37d11bac-1ff7-4486-a9b2-be7d5e39256c\"}}},\"location\":\"fxqeof\",\"tags\":{\"msmjqulngsntn\":\"qjhqjbas\"},\"id\":\"ybkzgcwr\",\"name\":\"clxxwrljdo\",\"type\":\"skcqvkocrcjd\"}") - .toObject(FleetInner.class); - Assertions.assertEquals("fxqeof", model.location()); - Assertions.assertEquals("qjhqjbas", model.tags().get("msmjqulngsntn")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("trg", model.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("s", model.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("gvfcj", model.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("zoxxjtf", model.hubProfile().agentProfile().vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetInner model = - new FleetInner() - .withLocation("fxqeof") - .withTags(mapOf("msmjqulngsntn", "qjhqjbas")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "narxzxtheotus", - new UserAssignedIdentity(), - "evcciqihnhun", - new UserAssignedIdentity(), - "jzrnf", - new UserAssignedIdentity(), - "gispemvtzfkufubl", - new UserAssignedIdentity()))) - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("trg") - .withApiServerAccessProfile( - new ApiServerAccessProfile() - .withEnablePrivateCluster(true) - .withEnableVnetIntegration(true) - .withSubnetId("s")) - .withAgentProfile(new AgentProfile().withSubnetId("gvfcj").withVmSize("zoxxjtf"))); - model = BinaryData.fromObject(model).toObject(FleetInner.class); - Assertions.assertEquals("fxqeof", model.location()); - Assertions.assertEquals("qjhqjbas", model.tags().get("msmjqulngsntn")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("trg", model.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("s", model.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("gvfcj", model.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("zoxxjtf", model.hubProfile().agentProfile().vmSize()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java deleted file mode 100644 index f5fb0008a6923..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; -import com.azure.resourcemanager.containerservicefleet.models.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; -import org.junit.jupiter.api.Assertions; - -public final class FleetListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"xqhabi\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"zb\"},\"agentProfile\":{\"subnetId\":\"npqxuh\",\"vmSize\":\"y\"},\"fqdn\":\"iwbybrkxvdumjg\",\"kubernetesVersion\":\"fwvuk\",\"portalFqdn\":\"audccsnhs\"}},\"eTag\":\"nyejhkryhtnap\",\"identity\":{\"principalId\":\"8920761c-a8bb-4e78-b007-7cd10a838a3e\",\"tenantId\":\"226bb70e-704a-4f82-9c82-dad9788c462a\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mkkvnip\":{\"principalId\":\"e5e68941-85af-4f52-9c5b-e7cc38fc18a3\",\"clientId\":\"68d90b81-dbc5-43c2-b767-3c56a040d533\"}}},\"location\":\"xzjnchgejs\",\"tags\":{\"ahuxinpm\":\"mailzydehojw\",\"vcputegj\":\"njaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\",\"vwryoqpso\":\"odjpslwejd\"},\"id\":\"cctazakljlahbc\",\"name\":\"yffdfdos\",\"type\":\"gexpaojakhmsbz\"}],\"nextLink\":\"crzevdphlx\"}") - .toObject(FleetListResult.class); - Assertions.assertEquals("xzjnchgejs", model.value().get(0).location()); - Assertions.assertEquals("mailzydehojw", model.value().get(0).tags().get("ahuxinpm")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, 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("y", model.value().get(0).hubProfile().agentProfile().vmSize()); - Assertions.assertEquals("crzevdphlx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetListResult model = - new FleetListResult() - .withValue( - Arrays - .asList( - new FleetInner() - .withLocation("xzjnchgejs") - .withTags( - mapOf( - "ahuxinpm", - "mailzydehojw", - "vcputegj", - "njaqwixjspro", - "uuvmkjozkrwfnd", - "wmfdatscmdvpjhul", - "vwryoqpso", - "odjpslwejd")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("mkkvnip", new UserAssignedIdentity()))) - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("xqhabi") - .withApiServerAccessProfile( - new ApiServerAccessProfile() - .withEnablePrivateCluster(true) - .withEnableVnetIntegration(false) - .withSubnetId("zb")) - .withAgentProfile(new AgentProfile().withSubnetId("npqxuh").withVmSize("y"))))) - .withNextLink("crzevdphlx"); - model = BinaryData.fromObject(model).toObject(FleetListResult.class); - Assertions.assertEquals("xzjnchgejs", model.value().get(0).location()); - Assertions.assertEquals("mailzydehojw", model.value().get(0).tags().get("ahuxinpm")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, 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("y", model.value().get(0).hubProfile().agentProfile().vmSize()); - Assertions.assertEquals("crzevdphlx", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java deleted file mode 100644 index 9526961f38ddf..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberInner model = - BinaryData - .fromString( - "{\"properties\":{\"clusterResourceId\":\"snb\",\"group\":\"qabnmoc\",\"provisioningState\":\"Canceled\"},\"eTag\":\"hurzafblj\",\"id\":\"pbtoqcjmkl\",\"name\":\"a\",\"type\":\"bqidtqaj\"}") - .toObject(FleetMemberInner.class); - Assertions.assertEquals("snb", model.clusterResourceId()); - Assertions.assertEquals("qabnmoc", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberInner model = new FleetMemberInner().withClusterResourceId("snb").withGroup("qabnmoc"); - model = BinaryData.fromObject(model).toObject(FleetMemberInner.class); - Assertions.assertEquals("snb", model.clusterResourceId()); - Assertions.assertEquals("qabnmoc", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java deleted file mode 100644 index f6aa17bc0a94b..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetMemberListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"yfhrtxilnerkujy\",\"group\":\"l\",\"provisioningState\":\"Failed\"},\"eTag\":\"fqawrlyxw\",\"id\":\"cpr\",\"name\":\"nwbxgjvtbvpyssz\",\"type\":\"nruj\"},{\"properties\":{\"clusterResourceId\":\"uhmuouqfprwzwbn\",\"group\":\"itnwuizgazxufi\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"y\",\"id\":\"hr\",\"name\":\"idf\",\"type\":\"zwdzuh\"},{\"properties\":{\"clusterResourceId\":\"mwisdkfthwxmnt\",\"group\":\"waopvkmijcmmxd\",\"provisioningState\":\"Leaving\"},\"eTag\":\"fsrpymzidnse\",\"id\":\"xtbzsgfyccsne\",\"name\":\"mdwzjeiachboo\",\"type\":\"flnrosfqpteehzz\"},{\"properties\":{\"clusterResourceId\":\"pyqr\",\"group\":\"z\",\"provisioningState\":\"Failed\"},\"eTag\":\"swjdkirso\",\"id\":\"qxhcrmn\",\"name\":\"hjtckwhd\",\"type\":\"oifiyipjxsqwpgr\"}],\"nextLink\":\"znorcj\"}") - .toObject(FleetMemberListResult.class); - Assertions.assertEquals("yfhrtxilnerkujy", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("l", model.value().get(0).group()); - Assertions.assertEquals("znorcj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberListResult model = - new FleetMemberListResult() - .withValue( - Arrays - .asList( - new FleetMemberInner().withClusterResourceId("yfhrtxilnerkujy").withGroup("l"), - new FleetMemberInner().withClusterResourceId("uhmuouqfprwzwbn").withGroup("itnwuizgazxufi"), - new FleetMemberInner().withClusterResourceId("mwisdkfthwxmnt").withGroup("waopvkmijcmmxd"), - new FleetMemberInner().withClusterResourceId("pyqr").withGroup("z"))) - .withNextLink("znorcj"); - model = BinaryData.fromObject(model).toObject(FleetMemberListResult.class); - Assertions.assertEquals("yfhrtxilnerkujy", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("l", model.value().get(0).group()); - Assertions.assertEquals("znorcj", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java deleted file mode 100644 index f105c8d005266..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberProperties model = - BinaryData - .fromString( - "{\"clusterResourceId\":\"yulpkudjkr\",\"group\":\"hbzhfepg\",\"provisioningState\":\"Canceled\"}") - .toObject(FleetMemberProperties.class); - Assertions.assertEquals("yulpkudjkr", model.clusterResourceId()); - Assertions.assertEquals("hbzhfepg", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberProperties model = - new FleetMemberProperties().withClusterResourceId("yulpkudjkr").withGroup("hbzhfepg"); - model = BinaryData.fromObject(model).toObject(FleetMemberProperties.class); - Assertions.assertEquals("yulpkudjkr", model.clusterResourceId()); - Assertions.assertEquals("hbzhfepg", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java deleted file mode 100644 index d8ab0d8312038..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberUpdateProperties model = - BinaryData.fromString("{\"group\":\"c\"}").toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("c", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("c"); - model = BinaryData.fromObject(model).toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("c", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java deleted file mode 100644 index 7e68167a4401e..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberUpdate model = - BinaryData.fromString("{\"properties\":{\"group\":\"zloc\"}}").toObject(FleetMemberUpdate.class); - Assertions.assertEquals("zloc", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberUpdate model = new FleetMemberUpdate().withGroup("zloc"); - model = BinaryData.fromObject(model).toObject(FleetMemberUpdate.class); - Assertions.assertEquals("zloc", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java deleted file mode 100644 index 2c9728093866d..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"clusterResourceId\":\"hsd\",\"group\":\"t\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"kd\",\"id\":\"wq\",\"name\":\"uvxzxclvi\",\"type\":\"hhqzonosgg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetMember response = - manager - .fleetMembers() - .define("l") - .withExistingFleet("lrb", "tkoievseotgq") - .withClusterResourceId("muwlauwzizxbm") - .withGroup("cjefuzmu") - .withIfMatch("bhjpglkfgohdne") - .withIfNoneMatch("el") - .create(); - - Assertions.assertEquals("hsd", response.clusterResourceId()); - Assertions.assertEquals("t", response.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java deleted file mode 100644 index 9073401cc9464..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .fleetMembers() - .delete("gxtibqdxbxw", "kbogqxndlkzgx", "uriplbpodxunkb", "bxmubyynt", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java deleted file mode 100644 index 508c472841efa..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"clusterResourceId\":\"lcxog\",\"group\":\"konzmnsik\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"ze\",\"id\":\"kdltfzxmhhvhg\",\"name\":\"r\",\"type\":\"odkwobd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetMember response = - manager - .fleetMembers() - .getWithResponse("lvwiwubmwmbesl", "nkww", "pp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lcxog", response.clusterResourceId()); - Assertions.assertEquals("konzmnsik", response.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java deleted file mode 100644 index 82869fdf2b705..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetMembersListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"clusterResourceId\":\"t\",\"group\":\"vfiwjmygtdss\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"mweriofzpy\",\"id\":\"emwabnet\",\"name\":\"hhszh\",\"type\":\"d\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleetMembers().listByFleet("bhhxsrzdzuc", "rsc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("t", response.iterator().next().clusterResourceId()); - Assertions.assertEquals("vfiwjmygtdss", response.iterator().next().group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java deleted file mode 100644 index 76455a18d2859..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FleetPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetPatch model = - BinaryData - .fromString( - "{\"tags\":{\"lmmnkzsmodmglo\":\"ciqfou\",\"uqktap\":\"gpbkwtmut\",\"kdosvqw\":\"pwgcuertu\"},\"identity\":{\"principalId\":\"fd4f9965-38a7-411f-886f-6834eeb598c3\",\"tenantId\":\"e28757b4-d211-476c-848b-cf0c94a61807\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"ddgmb\":{\"principalId\":\"01ecdb70-c186-4a57-b2fd-f138f515a144\",\"clientId\":\"e412eba8-c58c-4e81-9f5a-35b2ef533a0e\"}}}}") - .toObject(FleetPatch.class); - Assertions.assertEquals("ciqfou", model.tags().get("lmmnkzsmodmglo")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetPatch model = - new FleetPatch() - .withTags(mapOf("lmmnkzsmodmglo", "ciqfou", "uqktap", "gpbkwtmut", "kdosvqw", "pwgcuertu")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ddgmb", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(FleetPatch.class); - Assertions.assertEquals("ciqfou", model.tags().get("lmmnkzsmodmglo")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java deleted file mode 100644 index 791c967ba07cd..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetProperties; -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; - -public final class FleetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updating\",\"hubProfile\":{\"dnsPrefix\":\"xbnjbiksq\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"nqpjwnzlljfmpp\"},\"agentProfile\":{\"subnetId\":\"vmgxsab\",\"vmSize\":\"qduujitcjczdz\"},\"fqdn\":\"ndhkrw\",\"kubernetesVersion\":\"appd\",\"portalFqdn\":\"dkvwrwjfe\"}}") - .toObject(FleetProperties.class); - Assertions.assertEquals("xbnjbiksq", model.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("nqpjwnzlljfmpp", model.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("vmgxsab", model.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("qduujitcjczdz", model.hubProfile().agentProfile().vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetProperties model = - new FleetProperties() - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("xbnjbiksq") - .withApiServerAccessProfile( - new ApiServerAccessProfile() - .withEnablePrivateCluster(true) - .withEnableVnetIntegration(true) - .withSubnetId("nqpjwnzlljfmpp")) - .withAgentProfile(new AgentProfile().withSubnetId("vmgxsab").withVmSize("qduujitcjczdz"))); - model = BinaryData.fromObject(model).toObject(FleetProperties.class); - Assertions.assertEquals("xbnjbiksq", model.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, model.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("nqpjwnzlljfmpp", model.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("vmgxsab", model.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("qduujitcjczdz", model.hubProfile().agentProfile().vmSize()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java deleted file mode 100644 index 7d9c187915523..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"y\",\"groups\":[{\"name\":\"wlmdjrkv\"},{\"name\":\"g\"}],\"afterStageWaitInSeconds\":1410181750},{\"name\":\"vpdbodaciz\",\"groups\":[{\"name\":\"lhkrribdeibqipqk\"}],\"afterStageWaitInSeconds\":1234217414},{\"name\":\"xndzwm\",\"groups\":[{\"name\":\"fajpjorwk\"},{\"name\":\"nyhgbijtji\"}],\"afterStageWaitInSeconds\":2036493170},{\"name\":\"zs\",\"groups\":[{\"name\":\"ibsystawf\"},{\"name\":\"djpvkvpbjxbkz\"},{\"name\":\"zkdvncja\"},{\"name\":\"udurgkakmokz\"}],\"afterStageWaitInSeconds\":523614486}]}},\"eTag\":\"lffhmouwqlg\",\"id\":\"fzeeyebizik\",\"name\":\"yuhqlbjbsybbqwrv\",\"type\":\"ldgmfpgvmpip\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetUpdateStrategy response = - manager - .fleetUpdateStrategies() - .define("bwemhairs") - .withExistingFleet("kaivwit", "scywuggwoluhc") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("wmsweypqwd") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("icccn"), - new UpdateGroup().withName("qhuexm"), - new UpdateGroup().withName("ttlstvlzywemhz"))) - .withAfterStageWaitInSeconds(1311146203), - new UpdateStage() - .withName("sdtclusiypbs") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("tg"), new UpdateGroup().withName("sl"))) - .withAfterStageWaitInSeconds(1007983036), - new UpdateStage() - .withName("dcygqukyhejhz") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("gfpelolppvksrpqv"), - new UpdateGroup().withName("jzraehtwdwrf"), - new UpdateGroup().withName("swibyr"))) - .withAfterStageWaitInSeconds(66676019)))) - .withIfMatch("cxnavv") - .withIfNoneMatch("xqi") - .create(); - - Assertions.assertEquals("y", response.strategy().stages().get(0).name()); - Assertions.assertEquals("wlmdjrkv", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1410181750, response.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java deleted file mode 100644 index b4615ad4183d5..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .fleetUpdateStrategies() - .delete("rmaequ", "ah", "icslfaoq", "piyylhalnswhccsp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java deleted file mode 100644 index e6473287ef81f..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"q\",\"groups\":[{\"name\":\"doamciodhkha\"},{\"name\":\"xkhnzbonlwnto\"},{\"name\":\"gokdwbwhks\"},{\"name\":\"zcmrvexztvb\"}],\"afterStageWaitInSeconds\":991988200},{\"name\":\"sfraoyzko\",\"groups\":[{\"name\":\"lmnguxaw\"},{\"name\":\"aldsy\"}],\"afterStageWaitInSeconds\":1439928585},{\"name\":\"imerqfobwyznk\",\"groups\":[{\"name\":\"utwpfhp\"},{\"name\":\"gmhrskdsnfdsdoak\"}],\"afterStageWaitInSeconds\":323713899},{\"name\":\"lmkk\",\"groups\":[{\"name\":\"dlhewp\"},{\"name\":\"sdsttwvog\"},{\"name\":\"bbejdcngqqm\"},{\"name\":\"akufgmjz\"}],\"afterStageWaitInSeconds\":1463483261}]}},\"eTag\":\"grtwae\",\"id\":\"uzkopbminrfd\",\"name\":\"oyuhhziui\",\"type\":\"fozbhdmsmlmzqhof\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetUpdateStrategy response = - manager - .fleetUpdateStrategies() - .getWithResponse("dcpzfoqo", "i", "ybxarzgszu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("q", response.strategy().stages().get(0).name()); - Assertions.assertEquals("doamciodhkha", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(991988200, response.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java deleted file mode 100644 index 31e893715efd9..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategiesListByFleetMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetUpdateStrategiesListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"ifrvtpu\",\"groups\":[{\"name\":\"mqlgk\"},{\"name\":\"btndo\"}],\"afterStageWaitInSeconds\":146248988}]}},\"eTag\":\"bjcntujitc\",\"id\":\"df\",\"name\":\"wwa\",\"type\":\"zkoj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleetUpdateStrategies().listByFleet("l", "wabm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ifrvtpu", response.iterator().next().strategy().stages().get(0).name()); - Assertions.assertEquals("mqlgk", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions - .assertEquals(146248988, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java deleted file mode 100644 index 7ca2385463e83..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"dbpgnxytxhp\",\"groups\":[{\"name\":\"zpfzabglc\"},{\"name\":\"hxw\"}],\"afterStageWaitInSeconds\":767485321}]}},\"eTag\":\"qik\",\"id\":\"bovpl\",\"name\":\"zbhvgyuguosv\",\"type\":\"kfssxqukkf\"}") - .toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("dbpgnxytxhp", model.strategy().stages().get(0).name()); - Assertions.assertEquals("zpfzabglc", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(767485321, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyInner model = - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("dbpgnxytxhp") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("zpfzabglc"), - new UpdateGroup().withName("hxw"))) - .withAfterStageWaitInSeconds(767485321)))); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("dbpgnxytxhp", model.strategy().stages().get(0).name()); - Assertions.assertEquals("zpfzabglc", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(767485321, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java deleted file mode 100644 index 9c7c88b4ec9b0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyListResultTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyListResult; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"twwrqp\"}]}},\"eTag\":\"dckzywbiexz\",\"id\":\"yueaxibxujwb\",\"name\":\"qwalmuzyoxaepd\",\"type\":\"zjancuxr\"}],\"nextLink\":\"wbavxbniwdj\"}") - .toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("twwrqp", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("wbavxbniwdj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyListResult model = - new FleetUpdateStrategyListResult() - .withValue( - Arrays - .asList( - new FleetUpdateStrategyInner() - .withStrategy( - new UpdateRunStrategy() - .withStages(Arrays.asList(new UpdateStage().withName("twwrqp")))))) - .withNextLink("wbavxbniwdj"); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("twwrqp", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("wbavxbniwdj", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java deleted file mode 100644 index 5d3ec29a12359..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetUpdateStrategyPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyProperties; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FleetUpdateStrategyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetUpdateStrategyProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"gsxnkjzkdeslpv\",\"groups\":[{\"name\":\"wiyighxpkdw\"},{\"name\":\"baiuebbaumny\"}],\"afterStageWaitInSeconds\":624396177}]}}") - .toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("gsxnkjzkdeslpv", model.strategy().stages().get(0).name()); - Assertions.assertEquals("wiyighxpkdw", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(624396177, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetUpdateStrategyProperties model = - new FleetUpdateStrategyProperties() - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("gsxnkjzkdeslpv") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("wiyighxpkdw"), - new UpdateGroup().withName("baiuebbaumny"))) - .withAfterStageWaitInSeconds(624396177)))); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("gsxnkjzkdeslpv", model.strategy().stages().get(0).name()); - Assertions.assertEquals("wiyighxpkdw", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(624396177, model.strategy().stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java deleted file mode 100644 index db77796a8dfa1..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.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; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"mpew\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"rn\"},\"agentProfile\":{\"subnetId\":\"hqjohxcrsbfova\",\"vmSize\":\"ruvw\"},\"fqdn\":\"sqfsubcgjbirxb\",\"kubernetesVersion\":\"bsrfbj\",\"portalFqdn\":\"twss\"}},\"eTag\":\"ftpvjzbexil\",\"identity\":{\"principalId\":\"16d66bfc-39a4-4c38-b14a-2541268ad766\",\"tenantId\":\"5e64c591-4eb5-442b-b83b-db5d2eea7229\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pmqtaru\":{\"principalId\":\"e1be06b3-e91b-4646-adba-cab4abe98a28\",\"clientId\":\"3a7bdcce-5dc3-485d-8b7a-8ee484d04d0b\"},\"mkcjhwqytjrybn\":{\"principalId\":\"17c72af0-e5a4-4236-ba94-47a5af5d9a6c\",\"clientId\":\"c1e6ea3f-902a-4ab6-a4b3-49f012f6efd3\"},\"wgdrjervnaenqp\":{\"principalId\":\"718a66aa-b8d4-4c63-b52b-c0085a30315e\",\"clientId\":\"cb729303-5d89-4241-b04a-48c6043771e1\"},\"ndoygmifthnzdnd\":{\"principalId\":\"d6be28c6-fed8-4d01-b941-bc518d8baa47\",\"clientId\":\"d650aad7-87ae-46fb-b7b6-c378aa4f37e7\"}}},\"location\":\"gnayqigynduh\",\"tags\":{\"maqolbgycduie\":\"qlkth\",\"qlfmmdnbb\":\"tgccymvaolpss\",\"wyhzdx\":\"lzpswiydm\"},\"id\":\"sadbz\",\"name\":\"nvdfznuda\",\"type\":\"dvxzbncblylpst\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Fleet response = - manager - .fleets() - .define("wyjsflhhcaalnjix") - .withRegion("uaopppcqeq") - .withExistingResourceGroup("mvb") - .withTags(mapOf("ahzxctobgbk", "z", "mgrcfbu", "moizpos", "mjh", "rmfqjhhkxbpvj", "tswb", "xjyngudivk")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "gucnapkte", - new UserAssignedIdentity(), - "lwptfdy", - new UserAssignedIdentity(), - "qbuaceopzfqr", - new UserAssignedIdentity()))) - .withHubProfile( - new FleetHubProfile() - .withDnsPrefix("joya") - .withApiServerAccessProfile( - new ApiServerAccessProfile() - .withEnablePrivateCluster(false) - .withEnableVnetIntegration(true) - .withSubnetId("kiidzyex")) - .withAgentProfile(new AgentProfile().withSubnetId("lixhnrztfol").withVmSize("nxknalaulp"))) - .withIfMatch("mcbxvwvxysl") - .withIfNoneMatch("bhsfxob") - .create(); - - Assertions.assertEquals("gnayqigynduh", response.location()); - Assertions.assertEquals("qlkth", response.tags().get("maqolbgycduie")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("mpew", response.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("rn", response.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("hqjohxcrsbfova", response.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("ruvw", response.hubProfile().agentProfile().vmSize()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java deleted file mode 100644 index 4bb4d3bee483b..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.fleets().delete("ultskzbbtdz", "mv", "ekg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index bc0866fde2d34..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Creating\",\"hubProfile\":{\"dnsPrefix\":\"nhjdauw\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"tdhxujznbmpowuwp\"},\"agentProfile\":{\"subnetId\":\"lve\",\"vmSize\":\"lupj\"},\"fqdn\":\"hfxobbcswsrtj\",\"kubernetesVersion\":\"plrbpbewtghf\",\"portalFqdn\":\"lcgwxzvlvqh\"}},\"eTag\":\"begibtnmxiebwwa\",\"identity\":{\"principalId\":\"3a9d318d-dfb7-4e59-ba57-36c25a01bd50\",\"tenantId\":\"e185aa80-91ad-429a-a614-ee683da3b241\",\"type\":\"None\",\"userAssignedIdentities\":{\"tzjuzgwyzmhtxo\":{\"principalId\":\"24563c88-d38f-4545-a14f-5ca303fa1a7e\",\"clientId\":\"03e4e334-3eee-49c3-9512-f5e1a0c6c742\"},\"ts\":{\"principalId\":\"d075009a-d886-4ab1-a51d-1fe119e703e8\",\"clientId\":\"c96c5ebb-9e24-4f48-a61c-29c6977d0da3\"}}},\"location\":\"jcbpwxqpsrknft\",\"tags\":{\"yvxqtayriwwroy\":\"riuhprwm\",\"bycnojvkn\":\"bexrmcq\",\"qsgzvahapj\":\"e\",\"zlmwlxkvugfhz\":\"zhpvgqzcjrvxd\"},\"id\":\"vawjvzunlu\",\"name\":\"hnnpr\",\"type\":\"xipeilpjzuaejx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Fleet response = - manager - .fleets() - .getByResourceGroupWithResponse("nrjawgqwg", "hniskxfbkpyc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jcbpwxqpsrknft", response.location()); - Assertions.assertEquals("riuhprwm", response.tags().get("yvxqtayriwwroy")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("nhjdauw", response.hubProfile().dnsPrefix()); - Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("tdhxujznbmpowuwp", response.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("lve", response.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("lupj", response.hubProfile().agentProfile().vmSize()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java deleted file mode 100644 index f6959673a87c7..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"hubProfile\":{\"dnsPrefix\":\"eemaofmxagkvtme\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":true,\"subnetId\":\"hvljuahaquh\"},\"agentProfile\":{\"subnetId\":\"mdua\",\"vmSize\":\"exq\"},\"fqdn\":\"fadmws\",\"kubernetesVersion\":\"r\",\"portalFqdn\":\"xpvgo\"}},\"eTag\":\"lf\",\"identity\":{\"principalId\":\"61ab43c2-58d9-4dd3-a491-1118ea52d937\",\"tenantId\":\"b9730ec9-bca9-4dac-8a72-7003e297e01b\",\"type\":\"None\",\"userAssignedIdentities\":{\"e\":{\"principalId\":\"453a29e8-d761-4925-b2bf-f8fbec0b1f84\",\"clientId\":\"49b761c0-bc58-426f-a2e0-8e4c80c068e5\"},\"wkz\":{\"principalId\":\"1007fd38-857f-4c71-8ef7-bec98e0454a9\",\"clientId\":\"c02bb178-a4ee-42c5-b839-e72a64fdd74f\"}}},\"location\":\"liourqhak\",\"tags\":{\"w\":\"ashsfwxos\",\"cjooxdjebwpucwwf\":\"xcug\",\"hzceuojgjrwjue\":\"ovbvmeueciv\"},\"id\":\"otwmcdyt\",\"name\":\"x\",\"type\":\"it\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.fleets().listByResourceGroup("ehhseyvjusrts", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("liourqhak", response.iterator().next().location()); - Assertions.assertEquals("ashsfwxos", response.iterator().next().tags().get("w")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, 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()); - Assertions.assertEquals("exq", response.iterator().next().hubProfile().agentProfile().vmSize()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java deleted file mode 100644 index 174357a8ec0e8..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListCredentialsWithResponseMockTests { - @Test - public void testListCredentialsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"kubeconfigs\":[{\"name\":\"dttouwaboekqvkel\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FleetCredentialResults response = - manager - .fleets() - .listCredentialsWithResponse("wozuhkf", "bsjyofdx", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java deleted file mode 100644 index eaefef07c7d33..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class FleetsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"hubProfile\":{\"dnsPrefix\":\"togt\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":false,\"subnetId\":\"vnm\"},\"agentProfile\":{\"subnetId\":\"kvceoveilovnotyf\",\"vmSize\":\"cnjbkcnxdhbt\"},\"fqdn\":\"phywpnvj\",\"kubernetesVersion\":\"qnermclfplphoxu\",\"portalFqdn\":\"rpabg\"}},\"eTag\":\"psbjta\",\"identity\":{\"principalId\":\"c6054ddf-bbcc-4cb1-8054-f6a71b0c703a\",\"tenantId\":\"c3c2e227-03cf-44be-8685-ebc8b96090ee\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"ueefjzwfqkqu\":{\"principalId\":\"44c7e2b1-6a91-48a2-b4b0-355aa8885482\",\"clientId\":\"b93837b5-53af-40c9-b28e-3a4f01f39b78\"},\"suyonobglaocq\":{\"principalId\":\"1b79cc6f-ec3f-47f1-88e8-40fef44dea3f\",\"clientId\":\"5eb62a70-39d7-4cbe-a015-f38f0baa5236\"}}},\"location\":\"ccm\",\"tags\":{\"moyrxvwfudwpz\":\"dxyt\",\"rqjbhckfrl\":\"txhdzh\",\"ca\":\"rxsbkyvp\"},\"id\":\"uzbpzkafku\",\"name\":\"b\",\"type\":\"rnwb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.fleets().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ccm", response.iterator().next().location()); - Assertions.assertEquals("dxyt", response.iterator().next().tags().get("moyrxvwfudwpz")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("togt", 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("vnm", response.iterator().next().hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("kvceoveilovnotyf", response.iterator().next().hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("cnjbkcnxdhbt", response.iterator().next().hubProfile().agentProfile().vmSize()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java deleted file mode 100644 index f6c72eda500d7..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedClusterUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedClusterUpdate model = - BinaryData - .fromString( - "{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"oczvy\"},\"nodeImageSelection\":{\"type\":\"Latest\"}}") - .toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("oczvy", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedClusterUpdate model = - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("oczvy")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST)); - model = BinaryData.fromObject(model).toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.upgrade().type()); - Assertions.assertEquals("oczvy", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java deleted file mode 100644 index 36f37a23c8da0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedClusterUpgradeSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedClusterUpgradeSpec model = - BinaryData - .fromString("{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"kdvjsll\"}") - .toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("kdvjsll", model.kubernetesVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedClusterUpgradeSpec model = - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("kdvjsll"); - model = BinaryData.fromObject(model).toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("kdvjsll", model.kubernetesVersion()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 8f9ee959a6e05..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"c42d8bf5-4483-4325-95b6-5cea77e032b9\",\"tenantId\":\"a4c1cf36-b350-4422-8ca4-64270437a46c\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"fgibmadgakeq\":{\"principalId\":\"9df94168-a791-404c-9033-846f1c6ff8b5\",\"clientId\":\"dd52ce99-b25d-44ec-a94c-5f3616f04ce1\"},\"yb\":{\"principalId\":\"876febef-fd18-4dc6-a884-672a79043091\",\"clientId\":\"9682f597-976a-48ee-ab73-1a8f7c3a48f3\"},\"e\":{\"principalId\":\"e808e1b9-2385-4206-ae29-ef18f74873de\",\"clientId\":\"c6b2c7c2-caf3-4aad-881c-7342c91ea24f\"}}}") - .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( - "fgibmadgakeq", - new UserAssignedIdentity(), - "yb", - new UserAssignedIdentity(), - "e", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java deleted file mode 100644 index ef732fc0790b1..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/MemberUpdateStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.MemberUpdateStatus; - -public final class MemberUpdateStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MemberUpdateStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-10-04T02:04:35Z\",\"completedTime\":\"2021-01-20T10:25:16Z\",\"state\":\"Stopped\"},\"name\":\"runmp\",\"clusterResourceId\":\"tdbhrbnla\",\"operationId\":\"xmyskp\",\"message\":\"enbtkcxywny\"}") - .toObject(MemberUpdateStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MemberUpdateStatus model = new MemberUpdateStatus(); - model = BinaryData.fromObject(model).toObject(MemberUpdateStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java deleted file mode 100644 index 466b01b9e5881..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionStatusTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionStatus; - -public final class NodeImageSelectionStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageSelectionStatus model = - BinaryData - .fromString("{\"selectedNodeImageVersions\":[{\"version\":\"czfc\"},{\"version\":\"aaxdbabphlwrq\"}]}") - .toObject(NodeImageSelectionStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageSelectionStatus model = new NodeImageSelectionStatus(); - model = BinaryData.fromObject(model).toObject(NodeImageSelectionStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java deleted file mode 100644 index da7e9454c87d0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageSelectionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import org.junit.jupiter.api.Assertions; - -public final class NodeImageSelectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageSelection model = BinaryData.fromString("{\"type\":\"Latest\"}").toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageSelection model = new NodeImageSelection().withType(NodeImageSelectionType.LATEST); - model = BinaryData.fromObject(model).toObject(NodeImageSelection.class); - Assertions.assertEquals(NodeImageSelectionType.LATEST, model.type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java deleted file mode 100644 index 2d9fb327e8c8b..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/NodeImageVersionTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageVersion; - -public final class NodeImageVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeImageVersion model = - BinaryData.fromString("{\"version\":\"ktsthsucocmny\"}").toObject(NodeImageVersion.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeImageVersion model = new NodeImageVersion(); - model = BinaryData.fromObject(model).toObject(NodeImageVersion.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java deleted file mode 100644 index cc1ab10f373b8..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java deleted file mode 100644 index 2d40cb2bb10bd..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner; -import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java deleted file mode 100644 index 594e5268f00f9..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java deleted file mode 100644 index 644de39182c64..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"deoj\",\"isDataAction\":true,\"display\":{\"provider\":\"hsmtxpsiebtfhvp\",\"resource\":\"apskrdqm\",\"operation\":\"jdhtldwkyzxu\",\"description\":\"kn\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java deleted file mode 100644 index 2bead7c6ee3cf..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroupStatus; - -public final class UpdateGroupStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateGroupStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-09-28T09:51:37Z\",\"completedTime\":\"2021-11-19T23:57:57Z\",\"state\":\"Completed\"},\"name\":\"xerf\",\"members\":[{\"status\":{\"startTime\":\"2021-12-09T09:08:05Z\",\"completedTime\":\"2021-04-15T13:49:51Z\",\"state\":\"Stopped\"},\"name\":\"i\",\"clusterResourceId\":\"hxepcyvahfnlj\",\"operationId\":\"qxj\",\"message\":\"ujqgidok\"},{\"status\":{\"startTime\":\"2021-01-15T06:23:03Z\",\"completedTime\":\"2021-09-19T17:18:46Z\",\"state\":\"Completed\"},\"name\":\"ltbgsncghkj\",\"clusterResourceId\":\"zz\",\"operationId\":\"ijhtxf\",\"message\":\"xbf\"},{\"status\":{\"startTime\":\"2021-05-15T12:37:03Z\",\"completedTime\":\"2021-08-21T00:43:46Z\",\"state\":\"Running\"},\"name\":\"cxgod\",\"clusterResourceId\":\"fqkkr\",\"operationId\":\"pukgriwflzlfb\",\"message\":\"puz\"},{\"status\":{\"startTime\":\"2021-03-03T14:03:42Z\",\"completedTime\":\"2021-10-06T10:59:11Z\",\"state\":\"Stopped\"},\"name\":\"mgkbrpyydhibn\",\"clusterResourceId\":\"qkpikadrgvtqagnb\",\"operationId\":\"nhijggmebfsi\",\"message\":\"butr\"}]}") - .toObject(UpdateGroupStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateGroupStatus model = new UpdateGroupStatus(); - model = BinaryData.fromObject(model).toObject(UpdateGroupStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java deleted file mode 100644 index 905e765d17b18..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import org.junit.jupiter.api.Assertions; - -public final class UpdateGroupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateGroup model = BinaryData.fromString("{\"name\":\"rq\"}").toObject(UpdateGroup.class); - Assertions.assertEquals("rq", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateGroup model = new UpdateGroup().withName("rq"); - model = BinaryData.fromObject(model).toObject(UpdateGroup.class); - Assertions.assertEquals("rq", model.name()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java deleted file mode 100644 index 861d809bb98d6..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunInnerTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"khixuigdtopbo\",\"strategy\":{\"stages\":[{\"name\":\"ghmewuam\",\"groups\":[{\"name\":\"rzayv\"},{\"name\":\"t\"},{\"name\":\"gvdfgiotkftutq\"},{\"name\":\"ln\"}],\"afterStageWaitInSeconds\":259722291}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"gug\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-08-24T15:02:51Z\",\"completedTime\":\"2021-08-28T06:39:58Z\",\"state\":\"Completed\"},\"stages\":[{\"status\":{\"startTime\":\"2021-03-17T16:24:31Z\",\"completedTime\":\"2021-06-26T08:11:35Z\",\"state\":\"Skipped\"},\"name\":\"yb\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{\"status\":{},\"waitDurationInSeconds\":384321349}},{\"status\":{\"startTime\":\"2021-09-11T07:53:16Z\",\"completedTime\":\"2021-05-06T05:02:34Z\",\"state\":\"Skipped\"},\"name\":\"tzlcuiywgqywgn\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{\"status\":{},\"waitDurationInSeconds\":1744996179}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"rcgyn\"},{\"version\":\"cpecfvmmcoofs\"},{\"version\":\"zevgb\"}]}}},\"eTag\":\"jqabcypmivkwlzuv\",\"id\":\"fwnfnb\",\"name\":\"cfionl\",\"type\":\"bxetqgtzxdpn\"}") - .toObject(UpdateRunInner.class); - Assertions.assertEquals("khixuigdtopbo", model.updateStrategyId()); - Assertions.assertEquals("ghmewuam", model.strategy().stages().get(0).name()); - Assertions.assertEquals("rzayv", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(259722291, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("gug", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunInner model = - new UpdateRunInner() - .withUpdateStrategyId("khixuigdtopbo") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("ghmewuam") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("rzayv"), - new UpdateGroup().withName("t"), - new UpdateGroup().withName("gvdfgiotkftutq"), - new UpdateGroup().withName("ln"))) - .withAfterStageWaitInSeconds(259722291)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("gug")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST))); - model = BinaryData.fromObject(model).toObject(UpdateRunInner.class); - Assertions.assertEquals("khixuigdtopbo", model.updateStrategyId()); - Assertions.assertEquals("ghmewuam", model.strategy().stages().get(0).name()); - Assertions.assertEquals("rzayv", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(259722291, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("gug", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, model.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java deleted file mode 100644 index 59215c319bce2..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"hbcsgl\",\"strategy\":{\"stages\":[{\"name\":\"a\"},{\"name\":\"tjaodxobnb\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"qp\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-10-24T07:57:26Z\",\"completedTime\":\"2021-03-17T23:59:37Z\",\"state\":\"Failed\"},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"cp\",\"id\":\"gmaajrm\",\"name\":\"djwzrlov\",\"type\":\"clwhijcoejctbz\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"y\",\"strategy\":{\"stages\":[{\"name\":\"bfkgukdkex\"},{\"name\":\"ppofmxaxcfjpgdd\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"jjxhvpmo\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-11T14:08:23Z\",\"completedTime\":\"2020-12-20T15:16:48Z\",\"state\":\"Completed\"},\"stages\":[{},{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"vddntwn\",\"id\":\"icbtwnpzao\",\"name\":\"vuhrhcffcyddgl\",\"type\":\"jthjqkwpyei\"}],\"nextLink\":\"mqc\"}") - .toObject(UpdateRunListResult.class); - Assertions.assertEquals("hbcsgl", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("a", model.value().get(0).strategy().stages().get(0).name()); - Assertions - .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("qp", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, - model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("mqc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunListResult model = - new UpdateRunListResult() - .withValue( - Arrays - .asList( - new UpdateRunInner() - .withUpdateStrategyId("hbcsgl") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("a"), - new UpdateStage().withName("tjaodxobnb")))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("qp")) - .withNodeImageSelection( - new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))), - new UpdateRunInner() - .withUpdateStrategyId("y") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage().withName("bfkgukdkex"), - new UpdateStage().withName("ppofmxaxcfjpgdd")))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("jjxhvpmo")) - .withNodeImageSelection( - new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))))) - .withNextLink("mqc"); - model = BinaryData.fromObject(model).toObject(UpdateRunListResult.class); - Assertions.assertEquals("hbcsgl", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("a", model.value().get(0).strategy().stages().get(0).name()); - Assertions - .assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("qp", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, - model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("mqc", model.nextLink()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java deleted file mode 100644 index bb1b522142f2f..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunPropertiesTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunProperties; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"wxrjfeallnwsub\",\"strategy\":{\"stages\":[{\"name\":\"jampmngnzscxaqw\",\"groups\":[{\"name\":\"hcbonqvpkvlr\"},{\"name\":\"njeaseipheofloke\"},{\"name\":\"y\"},{\"name\":\"enjbdlwtgrhp\"}],\"afterStageWaitInSeconds\":469621378},{\"name\":\"jumasx\",\"groups\":[{\"name\":\"pqyegualhbxxh\"},{\"name\":\"jj\"}],\"afterStageWaitInSeconds\":57336706}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"dgwdslfhot\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-07-29T20:13:33Z\",\"completedTime\":\"2021-07-05T23:51:59Z\",\"state\":\"Stopped\"},\"stages\":[{\"status\":{\"startTime\":\"2021-04-17T12:51:37Z\",\"completedTime\":\"2021-09-14T10:31:34Z\",\"state\":\"Running\"},\"name\":\"ltyfsop\",\"groups\":[{\"status\":{},\"name\":\"snzwd\",\"members\":[{}]},{\"status\":{},\"name\":\"orxzdmohctbqvud\",\"members\":[{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-02-14T16:40:57Z\",\"completedTime\":\"2021-04-03T23:08:08Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":766815263}},{\"status\":{\"startTime\":\"2021-04-30T19:52:02Z\",\"completedTime\":\"2021-02-16T09:07:36Z\",\"state\":\"Stopping\"},\"name\":\"lazjdyggdtjixhbk\",\"groups\":[{\"status\":{},\"name\":\"e\",\"members\":[{},{},{},{}]},{\"status\":{},\"name\":\"n\",\"members\":[{},{}]},{\"status\":{},\"name\":\"xfw\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-02-12T00:37:49Z\",\"completedTime\":\"2021-05-14T16:24:46Z\",\"state\":\"Failed\"},\"waitDurationInSeconds\":1668619152}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"amdecte\"},{\"version\":\"iqscjeypv\"}]}}}") - .toObject(UpdateRunProperties.class); - Assertions.assertEquals("wxrjfeallnwsub", model.updateStrategyId()); - Assertions.assertEquals("jampmngnzscxaqw", model.strategy().stages().get(0).name()); - Assertions.assertEquals("hcbonqvpkvlr", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(469621378, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("dgwdslfhot", model.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.CONSISTENT, model.managedClusterUpdate().nodeImageSelection().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunProperties model = - new UpdateRunProperties() - .withUpdateStrategyId("wxrjfeallnwsub") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("jampmngnzscxaqw") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("hcbonqvpkvlr"), - new UpdateGroup().withName("njeaseipheofloke"), - new UpdateGroup().withName("y"), - new UpdateGroup().withName("enjbdlwtgrhp"))) - .withAfterStageWaitInSeconds(469621378), - new UpdateStage() - .withName("jumasx") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("pqyegualhbxxh"), - new UpdateGroup().withName("jj"))) - .withAfterStageWaitInSeconds(57336706)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("dgwdslfhot")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))); - model = BinaryData.fromObject(model).toObject(UpdateRunProperties.class); - Assertions.assertEquals("wxrjfeallnwsub", model.updateStrategyId()); - Assertions.assertEquals("jampmngnzscxaqw", model.strategy().stages().get(0).name()); - Assertions.assertEquals("hcbonqvpkvlr", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(469621378, model.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("dgwdslfhot", 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 deleted file mode 100644 index 73b786beb65c4..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus; - -public final class UpdateRunStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-10-29T02:56:05Z\",\"completedTime\":\"2021-01-12T05:42:21Z\",\"state\":\"Failed\"},\"stages\":[{\"status\":{\"startTime\":\"2021-09-28T12:07:12Z\",\"completedTime\":\"2021-08-19T08:59:20Z\",\"state\":\"Failed\"},\"name\":\"wtruwiqzbqjvsovm\",\"groups\":[{\"status\":{\"startTime\":\"2021-01-06T15:04:50Z\",\"completedTime\":\"2021-10-06T11:03:39Z\",\"state\":\"Stopped\"},\"name\":\"dobpxjmflbvvn\",\"members\":[{},{},{}]},{\"status\":{\"startTime\":\"2020-12-22T17:08:24Z\",\"completedTime\":\"2021-03-23T06:31:54Z\",\"state\":\"Stopping\"},\"name\":\"qkhr\",\"members\":[{},{},{},{}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-10-13T04:47:14Z\",\"completedTime\":\"2021-10-06T16:40:04Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":1433992289}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{\"version\":\"imjm\"},{\"version\":\"ied\"},{\"version\":\"gidyjrrf\"},{\"version\":\"aos\"}]}}") - .toObject(UpdateRunStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunStatus model = new UpdateRunStatus(); - model = BinaryData.fromObject(model).toObject(UpdateRunStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java deleted file mode 100644 index 36d449a4a5150..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateRunStrategyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateRunStrategy model = - BinaryData - .fromString( - "{\"stages\":[{\"name\":\"zrkgqhcjrefovg\",\"groups\":[{\"name\":\"sle\"}],\"afterStageWaitInSeconds\":2031463120},{\"name\":\"xyqj\",\"groups\":[{\"name\":\"attpngjcrcczsq\"},{\"name\":\"jh\"},{\"name\":\"mdajv\"},{\"name\":\"ysou\"}],\"afterStageWaitInSeconds\":104525492},{\"name\":\"canoaeupf\",\"groups\":[{\"name\":\"ltrpmopj\"},{\"name\":\"cma\"},{\"name\":\"u\"},{\"name\":\"kthfui\"}],\"afterStageWaitInSeconds\":1958511129},{\"name\":\"dsfcpkvxodpuoz\",\"groups\":[{\"name\":\"ydagfuaxbe\"},{\"name\":\"yiuokktwh\"},{\"name\":\"dxwzywqsmbsurexi\"},{\"name\":\"o\"}],\"afterStageWaitInSeconds\":1010959661}]}") - .toObject(UpdateRunStrategy.class); - Assertions.assertEquals("zrkgqhcjrefovg", model.stages().get(0).name()); - Assertions.assertEquals("sle", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(2031463120, model.stages().get(0).afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunStrategy model = - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("zrkgqhcjrefovg") - .withGroups(Arrays.asList(new UpdateGroup().withName("sle"))) - .withAfterStageWaitInSeconds(2031463120), - new UpdateStage() - .withName("xyqj") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("attpngjcrcczsq"), - new UpdateGroup().withName("jh"), - new UpdateGroup().withName("mdajv"), - new UpdateGroup().withName("ysou"))) - .withAfterStageWaitInSeconds(104525492), - new UpdateStage() - .withName("canoaeupf") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("ltrpmopj"), - new UpdateGroup().withName("cma"), - new UpdateGroup().withName("u"), - new UpdateGroup().withName("kthfui"))) - .withAfterStageWaitInSeconds(1958511129), - new UpdateStage() - .withName("dsfcpkvxodpuoz") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("ydagfuaxbe"), - new UpdateGroup().withName("yiuokktwh"), - new UpdateGroup().withName("dxwzywqsmbsurexi"), - new UpdateGroup().withName("o"))) - .withAfterStageWaitInSeconds(1010959661))); - model = BinaryData.fromObject(model).toObject(UpdateRunStrategy.class); - Assertions.assertEquals("zrkgqhcjrefovg", model.stages().get(0).name()); - Assertions.assertEquals("sle", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(2031463120, model.stages().get(0).afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java deleted file mode 100644 index 74709fe17b076..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeSpec; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelection; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"fz\",\"strategy\":{\"stages\":[{\"name\":\"xxbuyq\",\"groups\":[{\"name\":\"feqztppriol\"},{\"name\":\"or\"},{\"name\":\"altol\"}],\"afterStageWaitInSeconds\":136991246}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"obqwcsdbnwdcfh\"},\"nodeImageSelection\":{\"type\":\"Consistent\"}},\"status\":{\"status\":{\"startTime\":\"2021-01-17T20:42:13Z\",\"completedTime\":\"2021-04-24T11:58:07Z\",\"state\":\"Running\"},\"stages\":[{\"status\":{},\"name\":\"nvxbvt\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"cormr\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"ofudflvkgju\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"qvsaznqntorud\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"c\",\"id\":\"auwjuetaebu\",\"name\":\"u\",\"type\":\"dmovsm\"}"; - - 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("hky") - .withExistingFleet("duhpk", "kgymareqnajxqug") - .withUpdateStrategyId("dgssofwqmzqal") - .withStrategy( - new UpdateRunStrategy() - .withStages( - Arrays - .asList( - new UpdateStage() - .withName("njijpxacqqudf") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("xbaaabjyv"), - new UpdateGroup().withName("yffimrzrtuzqogs"), - new UpdateGroup().withName("xnevfdnwn"), - new UpdateGroup().withName("mewzsyyc"))) - .withAfterStageWaitInSeconds(1576556557), - new UpdateStage() - .withName("soibjudpfrx") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("hzv"), - new UpdateGroup().withName("ytdw"), - new UpdateGroup().withName("qbrqubpaxhexiili"), - new UpdateGroup().withName("pdtii"))) - .withAfterStageWaitInSeconds(1443311228), - new UpdateStage() - .withName("d") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("xoruzfgsquyfxrx"), - new UpdateGroup().withName("l"), - new UpdateGroup().withName("ptramxj"))) - .withAfterStageWaitInSeconds(576385447), - new UpdateStage() - .withName("lwnwxuqlcvydyp") - .withGroups( - Arrays - .asList( - new UpdateGroup().withName("ooaojkniodkooebw"), - new UpdateGroup().withName("ujhemmsbvdkcrodt"), - new UpdateGroup().withName("infwjlfltkacjve"), - new UpdateGroup().withName("kdlfoa"))) - .withAfterStageWaitInSeconds(1662630957)))) - .withManagedClusterUpdate( - new ManagedClusterUpdate() - .withUpgrade( - new ManagedClusterUpgradeSpec() - .withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("pagao")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT))) - .withIfMatch("yhmlwpaztzp") - .withIfNoneMatch("fn") - .create(); - - Assertions.assertEquals("fz", response.updateStrategyId()); - Assertions.assertEquals("xxbuyq", response.strategy().stages().get(0).name()); - Assertions.assertEquals("feqztppriol", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(136991246, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("obqwcsdbnwdcfh", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.CONSISTENT, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java deleted file mode 100644 index b97b4858f012e..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.updateRuns().delete("n", "synljphuopxodl", "iyntorzihle", "sjswsrms", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java deleted file mode 100644 index 4b37eeb14a443..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsGetWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"uejrjxgc\",\"strategy\":{\"stages\":[{\"name\":\"brh\",\"groups\":[{\"name\":\"sdqrhzoymibmrq\"},{\"name\":\"ibahwflus\"},{\"name\":\"dtmhrkwofyyvoqa\"},{\"name\":\"piexpbtgiw\"}],\"afterStageWaitInSeconds\":1911820344},{\"name\":\"enwash\",\"groups\":[{\"name\":\"tkcnqxwb\"},{\"name\":\"okulpiujwa\"},{\"name\":\"sipqii\"},{\"name\":\"byuqerpqlp\"}],\"afterStageWaitInSeconds\":1285990077},{\"name\":\"ciuqgbdb\",\"groups\":[{\"name\":\"uvfbtkuwh\"},{\"name\":\"mhykojoxafnndl\"},{\"name\":\"ichkoymkcdyhb\"},{\"name\":\"kkpwdreqnovvq\"}],\"afterStageWaitInSeconds\":1985211204}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"xywsuws\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-07-23T03:32:16Z\",\"completedTime\":\"2021-07-30T00:54:27Z\",\"state\":\"Stopping\"},\"stages\":[{\"status\":{},\"name\":\"aeneqnzarrwl\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"acewiipfpubjibw\",\"id\":\"f\",\"name\":\"ohqkvpuvksgpls\",\"type\":\"kn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .getWithResponse("xozap", "helxprglya", "dd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uejrjxgc", response.updateStrategyId()); - Assertions.assertEquals("brh", response.strategy().stages().get(0).name()); - Assertions.assertEquals("sdqrhzoymibmrq", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1911820344, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("xywsuws", response.managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals(NodeImageSelectionType.LATEST, response.managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java deleted file mode 100644 index 12945f5afd310..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsListByFleetMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"ffgdkz\",\"strategy\":{\"stages\":[{\"name\":\"kfvhqcrailvpn\",\"groups\":[{\"name\":\"uflrwd\"},{\"name\":\"hdlxyjrxsagafcn\"},{\"name\":\"hgw\"}],\"afterStageWaitInSeconds\":1561921505},{\"name\":\"nedgfbc\",\"groups\":[{\"name\":\"vq\"},{\"name\":\"pkeqdcvdrhvoo\"},{\"name\":\"sotbob\"}],\"afterStageWaitInSeconds\":67092515},{\"name\":\"pcjwv\",\"groups\":[{\"name\":\"ld\"},{\"name\":\"mgxcxrslpm\"}],\"afterStageWaitInSeconds\":2107317095},{\"name\":\"uoegrpkhjwniyqs\",\"groups\":[{\"name\":\"cpdggkzzlvmbmp\"}],\"afterStageWaitInSeconds\":2116317811}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"fv\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-06-26T00:17:44Z\",\"completedTime\":\"2021-11-23T01:55:39Z\",\"state\":\"Completed\"},\"stages\":[{\"status\":{},\"name\":\"ouyftaakc\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"qtmnubexkpzk\",\"groups\":[{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"uxvypomgkopkwh\",\"id\":\"v\",\"name\":\"ajqgxy\",\"type\":\"mocmbqfqvmk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.updateRuns().listByFleet("hcohfwdsjnk", "ljuti", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ffgdkz", response.iterator().next().updateStrategyId()); - Assertions.assertEquals("kfvhqcrailvpn", response.iterator().next().strategy().stages().get(0).name()); - Assertions.assertEquals("uflrwd", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions - .assertEquals(1561921505, response.iterator().next().strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions - .assertEquals( - ManagedClusterUpgradeType.NODE_IMAGE_ONLY, - response.iterator().next().managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("fv", response.iterator().next().managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions - .assertEquals( - NodeImageSelectionType.LATEST, - response.iterator().next().managedClusterUpdate().nodeImageSelection().type()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java deleted file mode 100644 index 451d5f34f2341..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStartMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"pcdpumnz\",\"strategy\":{\"stages\":[{\"name\":\"z\",\"groups\":[{\"name\":\"biknsorgjhxbld\"},{\"name\":\"lwwrl\"}],\"afterStageWaitInSeconds\":49969250}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"cvokotllxdyhg\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-05-19T11:15:04Z\",\"completedTime\":\"2021-03-24T02:03:23Z\",\"state\":\"Stopping\"},\"stages\":[{\"status\":{},\"name\":\"d\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"khnvpam\",\"id\":\"x\",\"name\":\"queziky\",\"type\":\"ggxkallatmelwuip\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .start("yzrpzbchckqqzq", "ox", "ysuiizynkedya", "rwyhqmibzyhwitsm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pcdpumnz", response.updateStrategyId()); - Assertions.assertEquals("z", response.strategy().stages().get(0).name()); - Assertions.assertEquals("biknsorgjhxbld", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(49969250, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("cvokotllxdyhg", 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 deleted file mode 100644 index 3fd779ad8b698..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsStopMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpgradeType; -import com.azure.resourcemanager.containerservicefleet.models.NodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRun; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UpdateRunsStopMockTests { - @Test - public void testStop() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"aygdvwvgpioh\",\"strategy\":{\"stages\":[{\"name\":\"rtfudxepxg\",\"groups\":[{\"name\":\"gvr\"},{\"name\":\"mnpkukghimdblxg\"},{\"name\":\"imfnjhfjx\"}],\"afterStageWaitInSeconds\":205109580},{\"name\":\"zk\",\"groups\":[{\"name\":\"qreyfkzi\"},{\"name\":\"fjawneaivxwczel\"},{\"name\":\"c\"},{\"name\":\"r\"}],\"afterStageWaitInSeconds\":833171610},{\"name\":\"feaenwab\",\"groups\":[{\"name\":\"kl\"}],\"afterStageWaitInSeconds\":1993086714}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"hwuaanozjosp\"},\"nodeImageSelection\":{\"type\":\"Latest\"}},\"status\":{\"status\":{\"startTime\":\"2021-08-26T08:44:25Z\",\"completedTime\":\"2021-09-04T05:53:47Z\",\"state\":\"Stopping\"},\"stages\":[{\"status\":{},\"name\":\"mjwosytx\",\"groups\":[{},{},{},{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"cktqumiekkezzi\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"hdgqggeb\",\"groups\":[{}],\"afterStageWaitStatus\":{}},{\"status\":{},\"name\":\"eqidbqfatpx\",\"groups\":[{},{},{}],\"afterStageWaitStatus\":{}}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{}]}}},\"eTag\":\"oadsuvar\",\"id\":\"wdmjsjqbjhhyx\",\"name\":\"rw\",\"type\":\"yc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerServiceFleetManager manager = - ContainerServiceFleetManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateRun response = - manager - .updateRuns() - .stop("ccjzkzivgvv", "nayrhyrnxxmueedn", "rdvstkwqqtch", "alm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aygdvwvgpioh", response.updateStrategyId()); - Assertions.assertEquals("rtfudxepxg", response.strategy().stages().get(0).name()); - Assertions.assertEquals("gvr", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(205109580, response.strategy().stages().get(0).afterStageWaitInSeconds()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, response.managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("hwuaanozjosp", 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/UpdateStageStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageStatusTests.java deleted file mode 100644 index 68f91e6bb8c30..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStageStatus; - -public final class UpdateStageStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStageStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-01-08T18:58:11Z\",\"completedTime\":\"2021-07-02T04:52:06Z\",\"state\":\"Running\"},\"name\":\"kevle\",\"groups\":[{\"status\":{\"startTime\":\"2021-09-05T06:09:57Z\",\"completedTime\":\"2021-07-04T01:19:13Z\",\"state\":\"Completed\"},\"name\":\"x\",\"members\":[{\"status\":{\"startTime\":\"2021-04-21T05:15:54Z\",\"completedTime\":\"2021-02-10T14:32:29Z\",\"state\":\"Stopped\"},\"name\":\"zy\",\"clusterResourceId\":\"hxmzsbbzoggig\",\"operationId\":\"wburvjxxjnspydpt\",\"message\":\"enkouknvudw\"},{\"status\":{\"startTime\":\"2021-08-25T19:52:36Z\",\"completedTime\":\"2021-08-10T13:58:21Z\",\"state\":\"Skipped\"},\"name\":\"pocipazyxoegu\",\"clusterResourceId\":\"jnpiucgyg\",\"operationId\":\"qzntypm\",\"message\":\"p\"},{\"status\":{\"startTime\":\"2021-09-25T16:47:02Z\",\"completedTime\":\"2021-02-24T05:44:07Z\",\"state\":\"Stopped\"},\"name\":\"ydnfyhxdeoejz\",\"clusterResourceId\":\"w\",\"operationId\":\"sjttgzfbish\",\"message\":\"khaj\"}]},{\"status\":{\"startTime\":\"2020-12-31T23:44:32Z\",\"completedTime\":\"2021-02-27T14:31:16Z\",\"state\":\"Failed\"},\"name\":\"g\",\"members\":[{\"status\":{\"startTime\":\"2021-03-27T18:31:14Z\",\"completedTime\":\"2021-09-13T21:07:14Z\",\"state\":\"Stopped\"},\"name\":\"onowk\",\"clusterResourceId\":\"hwankixzbinjepu\",\"operationId\":\"mryw\",\"message\":\"zoqftiyqzrnkcqvy\"},{\"status\":{\"startTime\":\"2021-03-26T11:48:28Z\",\"completedTime\":\"2021-01-23T07:25:21Z\",\"state\":\"NotStarted\"},\"name\":\"hoqqnwvlr\",\"clusterResourceId\":\"vwhheunmmqhgyx\",\"operationId\":\"onocukok\",\"message\":\"axuconuq\"},{\"status\":{\"startTime\":\"2021-09-15T09:48:55Z\",\"completedTime\":\"2021-10-30T19:28:33Z\",\"state\":\"Stopped\"},\"name\":\"rmjmwvvjektc\",\"clusterResourceId\":\"enhwlrs\",\"operationId\":\"rzpwvlqdqgbiq\",\"message\":\"ihkaetcktvfc\"}]}],\"afterStageWaitStatus\":{\"status\":{\"startTime\":\"2021-09-20T06:05:50Z\",\"completedTime\":\"2021-01-15T09:34:54Z\",\"state\":\"Stopped\"},\"waitDurationInSeconds\":2064900799}}") - .toObject(UpdateStageStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStageStatus model = new UpdateStageStatus(); - model = BinaryData.fromObject(model).toObject(UpdateStageStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java deleted file mode 100644 index d766d3a238419..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateGroup; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UpdateStageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStage model = - BinaryData - .fromString( - "{\"name\":\"cfsf\",\"groups\":[{\"name\":\"mddystkiiux\"},{\"name\":\"qyud\"}],\"afterStageWaitInSeconds\":2120884016}") - .toObject(UpdateStage.class); - Assertions.assertEquals("cfsf", model.name()); - Assertions.assertEquals("mddystkiiux", model.groups().get(0).name()); - Assertions.assertEquals(2120884016, model.afterStageWaitInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStage model = - new UpdateStage() - .withName("cfsf") - .withGroups( - Arrays.asList(new UpdateGroup().withName("mddystkiiux"), new UpdateGroup().withName("qyud"))) - .withAfterStageWaitInSeconds(2120884016); - model = BinaryData.fromObject(model).toObject(UpdateStage.class); - Assertions.assertEquals("cfsf", model.name()); - Assertions.assertEquals("mddystkiiux", model.groups().get(0).name()); - Assertions.assertEquals(2120884016, model.afterStageWaitInSeconds()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java deleted file mode 100644 index 56b5f0b3985b7..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UpdateStatus; - -public final class UpdateStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateStatus model = - BinaryData - .fromString( - "{\"startTime\":\"2021-01-29T02:12:36Z\",\"completedTime\":\"2021-10-23T12:01:36Z\",\"state\":\"Stopped\"}") - .toObject(UpdateStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateStatus model = new UpdateStatus(); - model = BinaryData.fromObject(model).toObject(UpdateStatus.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java deleted file mode 100644 index a7b432de23387..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"03250774-b8c5-49c2-bd72-f4620cc2b31c\",\"clientId\":\"641430a8-e1ae-417f-9dd9-5675e0e4d7bb\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java deleted file mode 100644 index d3b339c4d81f0..0000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/WaitStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.WaitStatus; - -public final class WaitStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WaitStatus model = - BinaryData - .fromString( - "{\"status\":{\"startTime\":\"2021-03-03T06:00:33Z\",\"completedTime\":\"2021-02-17T04:39:54Z\",\"state\":\"Skipped\"},\"waitDurationInSeconds\":1309072810}") - .toObject(WaitStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WaitStatus model = new WaitStatus(); - model = BinaryData.fromObject(model).toObject(WaitStatus.class); - } -}