diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md index baa71edbf4ae..d14845206134 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/CHANGELOG.md @@ -1,14 +1,222 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0-beta.2 (2025-02-27) -### Features Added +- Azure Resource Manager Container Service Fleet client library for Java. This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. Azure Kubernetes Fleet Manager api client. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.FleetMemberListResult` was removed + +#### `models.UpdateRunListResult` was removed + +#### `models.OperationListResult` was removed + +#### `models.FleetUpdateStrategyListResult` was removed + +#### `models.FleetListResult` was removed + +#### `models.UserAssignedIdentity` was modified + +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.ManagedServiceIdentity` was modified + +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` + +### Features Added + +* `models.UpgradeChannel` was added + +* `implementation.models.OperationListResult` was added + +* `models.AutoUpgradeProfile$Update` was added + +* `models.AutoUpgradeProfile$Definition` was added + +* `models.FleetStatus` was added + +* `models.AutoUpgradeProfileProvisioningState` was added + +* `models.FleetMemberStatus` was added + +* `models.AutoUpgradeNodeImageSelectionType` was added + +* `implementation.models.FleetMemberListResult` was added + +* `models.AutoUpgradeProfile$UpdateStages` was added + +* `models.AutoUpgradeProfiles` was added + +* `models.AutoUpgradeProfile` was added + +* `implementation.models.UpdateRunListResult` was added + +* `models.AutoUpgradeNodeImageSelection` was added + +* `implementation.models.FleetListResult` was added + +* `models.AutoUpgradeProfile$DefinitionStages` was added + +* `implementation.models.AutoUpgradeProfileListResult` was added + +* `implementation.models.FleetUpdateStrategyListResult` was added + +#### `models.ApiServerAccessProfile` was modified + +* `withSubnetId(java.lang.String)` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `enableVnetIntegration()` was added +* `withEnableVnetIntegration(java.lang.Boolean)` was added +* `subnetId()` was added + +#### `models.UserAssignedIdentity` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.WaitStatus` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `ContainerServiceFleetManager` was modified + +* `autoUpgradeProfiles()` was added + +#### `models.AgentProfile` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.FleetMember` was modified + +* `labels()` was added +* `status()` was added + +#### `models.UpdateStageStatus` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Fleet` was modified + +* `status()` was added + +#### `models.ManagedServiceIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UpdateGroupStatus` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.FleetHubProfile` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.UpdateRunStrategy` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NodeImageSelection` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `withCustomNodeImageVersions(java.util.List)` was added +* `customNodeImageVersions()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NodeImageSelectionStatus` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.FleetMember$Definition` was modified + +* `withLabels(java.util.Map)` was added + +#### `models.FleetMemberUpdate` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `withLabels(java.util.Map)` was added +* `labels()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UpdateStatus` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.FleetPatch` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UpdateGroup` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.ManagedClusterUpgradeSpec` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added -### Other Changes +#### `models.UpdateStage` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.SkipProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MemberUpdateStatus` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.FleetCredentialResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationDisplay` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ManagedClusterUpdate` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SkipTarget` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NodeImageVersion` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.FleetMember$Update` was modified + +* `withLabels(java.util.Map)` was added + +#### `models.UpdateRunStatus` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added ## 1.2.0-beta.1 (2024-10-17) diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md index 33395f33f8e1..22c83cd7f842 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager ContainerServiceFleet client library for Java +# Azure Resource Manager Container Service Fleet client library for Java -Azure Resource Manager ContainerServiceFleet client library for Java. +Azure Resource Manager Container Service Fleet client library for Java. -This package contains Microsoft Azure SDK for ContainerServiceFleet Management SDK. Azure Kubernetes Fleet Manager Client. Package tag package-2024-05-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 Container Service Fleet Management SDK. Azure Kubernetes Fleet Manager api client. 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.2.0-beta.1 + 1.2.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ContainerServiceFleetManager manager = ContainerServiceFleetManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -107,5 +107,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md index bbffc0d40517..9d7ce33c5606 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/SAMPLE.md @@ -14,7 +14,7 @@ - [Delete](#fleetmembers_delete) - [Get](#fleetmembers_get) - [ListByFleet](#fleetmembers_listbyfleet) -- [Update](#fleetmembers_update) +- [UpdateAsync](#fleetmembers_updateasync) ## FleetUpdateStrategies @@ -25,13 +25,13 @@ ## Fleets -- [CreateOrUpdate](#fleets_createorupdate) +- [Create](#fleets_create) - [Delete](#fleets_delete) - [GetByResourceGroup](#fleets_getbyresourcegroup) - [List](#fleets_list) - [ListByResourceGroup](#fleets_listbyresourcegroup) - [ListCredentials](#fleets_listcredentials) -- [Update](#fleets_update) +- [UpdateAsync](#fleets_updateasync) ## Operations @@ -56,9 +56,7 @@ import com.azure.resourcemanager.containerservicefleet.models.UpgradeChannel; */ public final class AutoUpgradeProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_CreateOrUpdate.json */ /** * Sample code: Create an AutoUpgradeProfile. @@ -84,9 +82,7 @@ public final class AutoUpgradeProfilesCreateOrUpdateSamples { */ public final class AutoUpgradeProfilesDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_Delete.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_Delete.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. @@ -109,9 +105,7 @@ public final class AutoUpgradeProfilesDeleteSamples { */ public final class AutoUpgradeProfilesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_Get.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_Get.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. @@ -134,9 +128,7 @@ public final class AutoUpgradeProfilesGetSamples { */ public final class AutoUpgradeProfilesListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_ListByFleet.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_ListByFleet.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. @@ -153,14 +145,15 @@ public final class AutoUpgradeProfilesListByFleetSamples { ### FleetMembers_Create ```java +import java.util.HashMap; +import java.util.Map; + /** * Samples for FleetMembers Create. */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Create.json + * x-ms-original-file: 2025-03-01/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -174,8 +167,21 @@ public final class FleetMembersCreateSamples { .withExistingFleet("rg1", "fleet1") .withClusterResourceId( "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1") + .withLabels(mapOf("environment", "production")) .create(); } + + // 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; + } } ``` @@ -187,9 +193,7 @@ public final class FleetMembersCreateSamples { */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Delete.json + * x-ms-original-file: 2025-03-01/FleetMembers_Delete.json */ /** * Sample code: Deletes a FleetMember resource asynchronously with a long running operation. @@ -211,9 +215,7 @@ public final class FleetMembersDeleteSamples { */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Get.json + * x-ms-original-file: 2025-03-01/FleetMembers_Get.json */ /** * Sample code: Gets a FleetMember resource. @@ -235,9 +237,7 @@ public final class FleetMembersGetSamples { */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_ListByFleet.json + * x-ms-original-file: 2025-03-01/FleetMembers_ListByFleet.json */ /** * Sample code: Lists the members of a Fleet. @@ -251,19 +251,17 @@ public final class FleetMembersListByFleetSamples { } ``` -### FleetMembers_Update +### FleetMembers_UpdateAsync ```java import com.azure.resourcemanager.containerservicefleet.models.FleetMember; /** - * Samples for FleetMembers Update. + * Samples for FleetMembers UpdateAsync. */ -public final class FleetMembersUpdateSamples { +public final class FleetMembersUpdateAsyncSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Update.json + * x-ms-original-file: 2025-03-01/FleetMembers_Update.json */ /** * Sample code: Updates a FleetMember resource synchronously. @@ -293,9 +291,7 @@ import java.util.Arrays; */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/UpdateStrategies_CreateOrUpdate.json */ /** * Sample code: Create a FleetUpdateStrategy. @@ -323,9 +319,7 @@ public final class FleetUpdateStrategiesCreateOrUpdateSamples { */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_Delete.json + * x-ms-original-file: 2025-03-01/UpdateStrategies_Delete.json */ /** * Sample code: Delete a FleetUpdateStrategy resource. @@ -347,9 +341,7 @@ public final class FleetUpdateStrategiesDeleteSamples { */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_Get.json + * x-ms-original-file: 2025-03-01/UpdateStrategies_Get.json */ /** * Sample code: Get a FleetUpdateStrategy resource. @@ -371,9 +363,7 @@ public final class FleetUpdateStrategiesGetSamples { */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: 2025-03-01/UpdateStrategies_ListByFleet.json */ /** * Sample code: List the FleetUpdateStrategy resources by fleet. @@ -387,7 +377,7 @@ public final class FleetUpdateStrategiesListByFleetSamples { } ``` -### Fleets_CreateOrUpdate +### Fleets_Create ```java import com.azure.resourcemanager.containerservicefleet.models.AgentProfile; @@ -396,13 +386,11 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for Fleets CreateOrUpdate. + * Samples for Fleets Create. */ -public final class FleetsCreateOrUpdateSamples { +public final class FleetsCreateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -415,7 +403,7 @@ public final class FleetsCreateOrUpdateSamples { .define("fleet1") .withRegion("East US") .withExistingResourceGroup("rg1") - .withTags(mapOf("archv2", "", "tier", "production")) + .withTags(mapOf("tier", "production", "archv2", "")) .withHubProfile(new FleetHubProfile().withDnsPrefix("dnsprefix1") .withAgentProfile(new AgentProfile().withVmSize("Standard_DS1"))) .create(); @@ -443,9 +431,7 @@ public final class FleetsCreateOrUpdateSamples { */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_Delete.json + * x-ms-original-file: 2025-03-01/Fleets_Delete.json */ /** * Sample code: Deletes a Fleet resource asynchronously with a long running operation. @@ -467,9 +453,7 @@ public final class FleetsDeleteSamples { */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_Get.json + * x-ms-original-file: 2025-03-01/Fleets_Get.json */ /** * Sample code: Gets a Fleet resource. @@ -491,9 +475,7 @@ public final class FleetsGetByResourceGroupSamples { */ public final class FleetsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListBySub.json + * x-ms-original-file: 2025-03-01/Fleets_ListBySub.json */ /** * Sample code: Lists the Fleet resources in a subscription. @@ -515,9 +497,7 @@ public final class FleetsListSamples { */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: 2025-03-01/Fleets_ListByResourceGroup.json */ /** * Sample code: Lists the Fleet resources in a resource group. @@ -539,9 +519,7 @@ public final class FleetsListByResourceGroupSamples { */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: 2025-03-01/Fleets_ListCredentialsResult.json */ /** * Sample code: Lists the user credentials of a Fleet. @@ -555,7 +533,7 @@ public final class FleetsListCredentialsSamples { } ``` -### Fleets_Update +### Fleets_UpdateAsync ```java import com.azure.resourcemanager.containerservicefleet.models.Fleet; @@ -563,13 +541,11 @@ import java.util.HashMap; import java.util.Map; /** - * Samples for Fleets Update. + * Samples for Fleets UpdateAsync. */ -public final class FleetsUpdateSamples { +public final class FleetsUpdateAsyncSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_PatchTags.json + * x-ms-original-file: 2025-03-01/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -581,7 +557,7 @@ public final class FleetsUpdateSamples { Fleet resource = manager.fleets() .getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); + resource.update().withTags(mapOf("tier", "secure", "env", "prod")).withIfMatch("dfjkwelr7384").apply(); } // Use "Map.of" if available @@ -606,9 +582,7 @@ public final class FleetsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Operations_List.json + * x-ms-original-file: 2025-03-01/Operations_List.json */ /** * Sample code: List the operations for the provider. @@ -640,9 +614,7 @@ import java.util.Arrays; */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/UpdateRuns_CreateOrUpdate.json */ /** * Sample code: Create an UpdateRun. @@ -676,9 +648,7 @@ public final class UpdateRunsCreateOrUpdateSamples { */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Delete.json + * x-ms-original-file: 2025-03-01/UpdateRuns_Delete.json */ /** * Sample code: Delete an updateRun resource. @@ -700,9 +670,7 @@ public final class UpdateRunsDeleteSamples { */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Get.json + * x-ms-original-file: 2025-03-01/UpdateRuns_Get.json */ /** * Sample code: Gets an UpdateRun resource. @@ -724,9 +692,7 @@ public final class UpdateRunsGetSamples { */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: 2025-03-01/UpdateRuns_ListByFleet.json */ /** * Sample code: Lists the UpdateRun resources by fleet. @@ -753,9 +719,7 @@ import java.util.Arrays; */ public final class UpdateRunsSkipSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Skip.json + * x-ms-original-file: 2025-03-01/UpdateRuns_Skip.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. @@ -782,9 +746,7 @@ public final class UpdateRunsSkipSamples { */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Start.json + * x-ms-original-file: 2025-03-01/UpdateRuns_Start.json */ /** * Sample code: Starts an UpdateRun. @@ -806,9 +768,7 @@ public final class UpdateRunsStartSamples { */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Stop.json + * x-ms-original-file: 2025-03-01/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 0ffb20f0708e..b62722d50eed 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.2.0-beta.2 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-2024-05-preview. + Microsoft Azure SDK for Container Service Fleet Management + This package contains Microsoft Azure SDK for Container Service Fleet Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Kubernetes Fleet Manager api client. https://github.com/Azure/azure-sdk-for-java @@ -46,6 +46,7 @@ 0 0 true + false 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 8f83dc7484ff..14b54a7739fe 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet; @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,9 +20,9 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.containerservicefleet.fluent.ContainerServiceFleetManagementClient; import com.azure.resourcemanager.containerservicefleet.implementation.AutoUpgradeProfilesImpl; @@ -41,26 +42,27 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to ContainerServiceFleetManager. - * Azure Kubernetes Fleet Manager Client. + * Azure Kubernetes Fleet Manager api client. */ public final class ContainerServiceFleetManager { private Operations operations; private Fleets fleets; - private AutoUpgradeProfiles autoUpgradeProfiles; - private FleetMembers fleetMembers; private UpdateRuns updateRuns; private FleetUpdateStrategies fleetUpdateStrategies; + private AutoUpgradeProfiles autoUpgradeProfiles; + private final ContainerServiceFleetManagementClient clientObject; private ContainerServiceFleetManager(HttpPipeline httpPipeline, AzureProfile profile, @@ -75,11 +77,11 @@ private ContainerServiceFleetManager(HttpPipeline httpPipeline, AzureProfile pro } /** - * Creates an instance of ContainerServiceFleet service API entry point. + * Creates an instance of Container Service Fleet service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the ContainerServiceFleet service API instance. + * @return the Container Service Fleet service API instance. */ public static ContainerServiceFleetManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -88,11 +90,11 @@ public static ContainerServiceFleetManager authenticate(TokenCredential credenti } /** - * Creates an instance of ContainerServiceFleet service API entry point. + * Creates an instance of Container Service Fleet service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the ContainerServiceFleet service API instance. + * @return the Container Service Fleet service API instance. */ public static ContainerServiceFleetManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -114,6 +116,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-containerservicefleet.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -211,22 +216,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of ContainerServiceFleet service API entry point. + * Creates an instance of Container Service Fleet service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the ContainerServiceFleet service API instance. + * @return the Container Service Fleet service API instance. */ public ContainerServiceFleetManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.containerservicefleet") .append("/") - .append("1.2.0-beta.1"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -259,7 +266,7 @@ public ContainerServiceFleetManager authenticate(TokenCredential credential, Azu HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -296,18 +303,6 @@ public Fleets fleets() { return fleets; } - /** - * Gets the resource collection API of AutoUpgradeProfiles. It manages AutoUpgradeProfile. - * - * @return Resource collection API of AutoUpgradeProfiles. - */ - public AutoUpgradeProfiles autoUpgradeProfiles() { - if (this.autoUpgradeProfiles == null) { - this.autoUpgradeProfiles = new AutoUpgradeProfilesImpl(clientObject.getAutoUpgradeProfiles(), this); - } - return autoUpgradeProfiles; - } - /** * Gets the resource collection API of FleetMembers. It manages FleetMember. * @@ -344,6 +339,18 @@ public FleetUpdateStrategies fleetUpdateStrategies() { return fleetUpdateStrategies; } + /** + * Gets the resource collection API of AutoUpgradeProfiles. It manages AutoUpgradeProfile. + * + * @return Resource collection API of AutoUpgradeProfiles. + */ + public AutoUpgradeProfiles autoUpgradeProfiles() { + if (this.autoUpgradeProfiles == null) { + this.autoUpgradeProfiles = new AutoUpgradeProfilesImpl(clientObject.getAutoUpgradeProfiles(), this); + } + return autoUpgradeProfiles; + } + /** * Gets wrapped service client ContainerServiceFleetManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java index 2eb6fbdf7d8b..35cbde2a9095 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/AutoUpgradeProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -17,33 +17,6 @@ * An instance of this class provides access to all the operations defined in AutoUpgradeProfilesClient. */ public interface AutoUpgradeProfilesClient { - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName); - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); - /** * Get a AutoUpgradeProfile. * @@ -205,4 +178,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String fleetName, String autoUpgradeProfileName, String ifMatch, Context context); + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName); + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java index fba3890ba0ee..9f6ce21c235f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -12,26 +12,26 @@ */ public interface ContainerServiceFleetManagementClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -60,13 +60,6 @@ public interface ContainerServiceFleetManagementClient { */ FleetsClient getFleets(); - /** - * Gets the AutoUpgradeProfilesClient object to access its operations. - * - * @return the AutoUpgradeProfilesClient object. - */ - AutoUpgradeProfilesClient getAutoUpgradeProfiles(); - /** * Gets the FleetMembersClient object to access its operations. * @@ -87,4 +80,11 @@ public interface ContainerServiceFleetManagementClient { * @return the FleetUpdateStrategiesClient object. */ FleetUpdateStrategiesClient getFleetUpdateStrategies(); + + /** + * Gets the AutoUpgradeProfilesClient object to access its operations. + * + * @return the AutoUpgradeProfilesClient object. + */ + AutoUpgradeProfilesClient getAutoUpgradeProfiles(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java index b6a8be9d8ea5..e17fad6f0642 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -18,33 +18,6 @@ * An instance of this class provides access to all the operations defined in FleetMembersClient. */ public interface FleetMembersClient { - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName); - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); - /** * Get a FleetMember. * @@ -158,8 +131,8 @@ FleetMemberInner create(String resourceGroupName, String fleetName, String fleet * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, String fleetName, - String fleetMemberName, FleetMemberUpdate properties); + SyncPoller, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties); /** * Update a FleetMember. @@ -176,8 +149,8 @@ SyncPoller, FleetMemberInner> beginUpdate(String re * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, String fleetName, - String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context); + SyncPoller, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context); /** * Update a FleetMember. @@ -192,7 +165,7 @@ SyncPoller, FleetMemberInner> beginUpdate(String re * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties); /** @@ -210,7 +183,7 @@ FleetMemberInner update(String resourceGroupName, String fleetName, String fleet * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + FleetMemberInner updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context); /** @@ -271,4 +244,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context); + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName); + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java index af5ac70c7261..8b4cafc7c355 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetUpdateStrategiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -17,33 +17,6 @@ * An instance of this class provides access to all the operations defined in FleetUpdateStrategiesClient. */ public interface FleetUpdateStrategiesClient { - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName); - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); - /** * Get a FleetUpdateStrategy. * @@ -206,4 +179,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context); + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName); + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java index d639b9d0c44b..1cf1a0a3690e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -19,53 +19,6 @@ * An instance of this class provides access to all the operations defined in FleetsClient. */ public interface FleetsClient { - /** - * Lists fleets in the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists fleets in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets a Fleet. * @@ -105,7 +58,7 @@ public interface FleetsClient { * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName, + SyncPoller, FleetInner> beginCreate(String resourceGroupName, String fleetName, FleetInner resource); /** @@ -123,7 +76,7 @@ SyncPoller, FleetInner> beginCreateOrUpdate(String resour * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName, + SyncPoller, FleetInner> beginCreate(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context); /** @@ -138,7 +91,7 @@ SyncPoller, FleetInner> beginCreateOrUpdate(String resour * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource); + FleetInner create(String resourceGroupName, String fleetName, FleetInner resource); /** * Creates or updates a Fleet. @@ -155,7 +108,7 @@ SyncPoller, FleetInner> beginCreateOrUpdate(String resour * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, + FleetInner create(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context); /** @@ -170,7 +123,7 @@ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + SyncPoller, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, FleetPatch properties); /** @@ -187,7 +140,7 @@ SyncPoller, FleetInner> beginUpdate(String resourceGroupN * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + SyncPoller, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); /** @@ -202,7 +155,7 @@ SyncPoller, FleetInner> beginUpdate(String resourceGroupN * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties); + FleetInner updateAsync(String resourceGroupName, String fleetName, FleetPatch properties); /** * Update a Fleet. @@ -218,7 +171,7 @@ SyncPoller, FleetInner> beginUpdate(String resourceGroupN * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, + FleetInner updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context); /** @@ -276,6 +229,53 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String fleetName, String ifMatch, Context context); + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Lists fleets in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists fleets in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + /** * Lists the user credentials of a Fleet. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java index 6803bb01e8f2..fde7eb9f846d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java index 40cbb58d67fb..c099695b3641 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent; @@ -18,33 +18,6 @@ * An instance of this class provides access to all the operations defined in UpdateRunsClient. */ public interface UpdateRunsClient { - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName); - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); - /** * Get a UpdateRun. * @@ -208,76 +181,97 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName); + + /** + * List UpdateRun resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); + + /** + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body); + SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body, String ifMatch, Context context); + SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); + UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, - String ifMatch, Context context); + UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context); /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -285,15 +279,14 @@ UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, String updateRunName); /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -303,15 +296,14 @@ SyncPoller, UpdateRunInner> beginStart(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -319,13 +311,13 @@ SyncPoller, UpdateRunInner> beginStart(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName); + UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName); /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -335,74 +327,76 @@ SyncPoller, UpdateRunInner> beginStart(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, - String updateRunName); + SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body); /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, - String updateRunName, String ifMatch, Context context); + SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch, Context context); /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName); + UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, - Context context); + UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, + String ifMatch, Context context); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java index 31120a9db718..41de201fe66c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java index 929e4be00c68..ec71d0467748 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/AutoUpgradeProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java index 31ef4477919a..810f68303688 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; @@ -26,7 +26,7 @@ public final class FleetCredentialResultsInner implements JsonSerializable labels() { + return this.innerProperties() == null ? null : this.innerProperties().labels(); + } + + /** + * Set the labels property: The labels for the fleet member. + * + * @param labels the labels value to set. + * @return the FleetMemberInner object itself. + */ + public FleetMemberInner withLabels(Map labels) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetMemberProperties(); + } + this.innerProperties().withLabels(labels); + return this; + } + + /** + * Get the status property: Status information of the last operation for fleet member. + * + * @return the status value. + */ + public FleetMemberStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java index 7cc78059b6df..827b910b17db 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; @@ -11,7 +11,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetMemberStatus; import java.io.IOException; +import java.util.Map; /** * A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. @@ -35,6 +37,16 @@ public final class FleetMemberProperties implements JsonSerializable labels; + + /* + * Status information of the last operation for fleet member. + */ + private FleetMemberStatus status; + /** * Creates an instance of FleetMemberProperties class. */ @@ -94,6 +106,35 @@ public FleetMemberProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the labels property: The labels for the fleet member. + * + * @return the labels value. + */ + public Map labels() { + return this.labels; + } + + /** + * Set the labels property: The labels for the fleet member. + * + * @param labels the labels value to set. + * @return the FleetMemberProperties object itself. + */ + public FleetMemberProperties withLabels(Map labels) { + this.labels = labels; + return this; + } + + /** + * Get the status property: Status information of the last operation for fleet member. + * + * @return the status value. + */ + public FleetMemberStatus status() { + return this.status; + } + /** * Validates the instance. * @@ -105,6 +146,9 @@ public void validate() { .log(new IllegalArgumentException( "Missing required property clusterResourceId in model FleetMemberProperties")); } + if (status() != null) { + status().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(FleetMemberProperties.class); @@ -117,6 +161,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("clusterResourceId", this.clusterResourceId); jsonWriter.writeStringField("group", this.group); + jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -143,6 +188,11 @@ public static FleetMemberProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("provisioningState".equals(fieldName)) { deserializedFleetMemberProperties.provisioningState = FleetMemberProvisioningState.fromString(reader.getString()); + } else if ("labels".equals(fieldName)) { + Map labels = reader.readMap(reader1 -> reader1.getString()); + deserializedFleetMemberProperties.labels = labels; + } else if ("status".equals(fieldName)) { + deserializedFleetMemberProperties.status = FleetMemberStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java index dbec0461ba19..0d4e7398d09a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.Map; /** * The updatable properties of the FleetMember. @@ -21,6 +22,11 @@ public final class FleetMemberUpdateProperties implements JsonSerializable labels; + /** * Creates an instance of FleetMemberUpdateProperties class. */ @@ -47,6 +53,26 @@ public FleetMemberUpdateProperties withGroup(String group) { return this; } + /** + * Get the labels property: The labels for the fleet member. + * + * @return the labels value. + */ + public Map labels() { + return this.labels; + } + + /** + * Set the labels property: The labels for the fleet member. + * + * @param labels the labels value to set. + * @return the FleetMemberUpdateProperties object itself. + */ + public FleetMemberUpdateProperties withLabels(Map labels) { + this.labels = labels; + return this; + } + /** * Validates the instance. * @@ -62,6 +88,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("group", this.group); + jsonWriter.writeMapField("labels", this.labels, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -82,6 +109,9 @@ public static FleetMemberUpdateProperties fromJson(JsonReader jsonReader) throws if ("group".equals(fieldName)) { deserializedFleetMemberUpdateProperties.group = reader.getString(); + } else if ("labels".equals(fieldName)) { + Map labels = reader.readMap(reader1 -> reader1.getString()); + deserializedFleetMemberUpdateProperties.labels = labels; } else { reader.skipChildren(); } 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 74f048ab8f17..eb1b43514dc7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; @@ -11,6 +11,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetStatus; import java.io.IOException; /** @@ -28,6 +29,11 @@ public final class FleetProperties implements JsonSerializable */ private FleetHubProfile hubProfile; + /* + * Status information for the fleet. + */ + private FleetStatus status; + /** * Creates an instance of FleetProperties class. */ @@ -63,6 +69,15 @@ public FleetProperties withHubProfile(FleetHubProfile hubProfile) { return this; } + /** + * Get the status property: Status information for the fleet. + * + * @return the status value. + */ + public FleetStatus status() { + return this.status; + } + /** * Validates the instance. * @@ -72,6 +87,9 @@ public void validate() { if (hubProfile() != null) { hubProfile().validate(); } + if (status() != null) { + status().validate(); + } } /** @@ -104,6 +122,8 @@ public static FleetProperties fromJson(JsonReader jsonReader) throws IOException = FleetProvisioningState.fromString(reader.getString()); } else if ("hubProfile".equals(fieldName)) { deserializedFleetProperties.hubProfile = FleetHubProfile.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedFleetProperties.status = FleetStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java index f8df9b9367a9..dbac798b5c30 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java index 19ec9108c7a1..3aaf1e9ac689 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetUpdateStrategyProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java index a1613e7bf6ac..d0672ba61919 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,11 +15,9 @@ import java.io.IOException; /** - * REST API Operation - * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -28,8 +26,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,14 +43,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,7 +65,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -84,17 +82,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -106,8 +93,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java index 1b8bb2b9b2ba..f1f63c0a2fad 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java index 0a17aecdf3d8..0ecf7120ed87 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java index b607f24aa663..2ad1f3775d46 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for ContainerServiceFleetManagementClient. - * Azure Kubernetes Fleet Manager Client. + * Package containing the inner data models for ContainerServiceFleet. + * Azure Kubernetes Fleet Manager api client. */ package com.azure.resourcemanager.containerservicefleet.fluent.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java index c3fd33604ffe..14ae5fb82e45 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for ContainerServiceFleetManagementClient. - * Azure Kubernetes Fleet Manager Client. + * Package containing the service clients for ContainerServiceFleet. + * Azure Kubernetes Fleet Manager api client. */ package com.azure.resourcemanager.containerservicefleet.fluent; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java index 22ae08338b90..566991145487 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfileImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java index d9aab9b50348..4c9949cd70da 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.AutoUpgradeProfilesClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileInner; -import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.AutoUpgradeProfileListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,203 +67,59 @@ public final class AutoUpgradeProfilesClientImpl implements AutoUpgradeProfilesC * The interface defining all the services for ContainerServiceFleetManagementClientAutoUpgradeProfiles to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface AutoUpgradeProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @PathParam("autoUpgradeProfileName") String autoUpgradeProfileName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, @PathParam("autoUpgradeProfileName") String autoUpgradeProfileName, - @BodyParam("application/json") AutoUpgradeProfileInner resource, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutoUpgradeProfileInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("autoUpgradeProfileName") String autoUpgradeProfileName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFleet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, - String fleetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, - String fleetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, fleetName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), - nextLink -> listByFleetNextSinglePageAsync(nextLink)); - } - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, - Context context) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), - nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); - } - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); - } - - /** - * List AutoUpgradeProfile resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName, - Context context) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); - } - /** * Get a AutoUpgradeProfile. * @@ -437,11 +293,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, - autoUpgradeProfileName, resource, accept, context)) + autoUpgradeProfileName, contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -488,11 +345,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, autoUpgradeProfileName, - resource, accept, context); + contentType, accept, resource, context); } /** @@ -1004,6 +862,149 @@ public void delete(String resourceGroupName, String fleetName, String autoUpgrad deleteAsync(resourceGroupName, fleetName, autoUpgradeProfileName, ifMatch, context).block(); } + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePageAsync(nextLink)); + } + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, + Context context) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); + } + + /** + * List AutoUpgradeProfile resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName, + Context context) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java index 79848de1354a..5702152a9b0a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/AutoUpgradeProfilesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -27,17 +27,6 @@ public AutoUpgradeProfilesImpl(AutoUpgradeProfilesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoUpgradeProfileImpl(inner1, this.manager())); - } - - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - PagedIterable inner - = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoUpgradeProfileImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String fleetName, String autoUpgradeProfileName, Context context) { Response inner @@ -68,6 +57,17 @@ public void delete(String resourceGroupName, String fleetName, String autoUpgrad this.serviceClient().delete(resourceGroupName, fleetName, autoUpgradeProfileName, ifMatch, context); } + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoUpgradeProfileImpl(inner1, this.manager())); + } + + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + PagedIterable inner + = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutoUpgradeProfileImpl(inner1, this.manager())); + } + public AutoUpgradeProfile getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java index 9d4989c802c2..818c80d8e561 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { ContainerServiceFleetManagementClientImpl.class }) public final class ContainerServiceFleetManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the ContainerServiceFleetManagementClientBuilder. */ - public ContainerServiceFleetManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ContainerServiceFleetManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the ContainerServiceFleetManagementClientBuilder. */ - public ContainerServiceFleetManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ContainerServiceFleetManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public ContainerServiceFleetManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ContainerServiceFleetManagementClientImpl client = new ContainerServiceFleetManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java index fc8c0666507c..5215a330fa4c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -45,26 +45,12 @@ @ServiceClient(builder = ContainerServiceFleetManagementClientBuilder.class) public final class ContainerServiceFleetManagementClientImpl implements ContainerServiceFleetManagementClient { /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -73,12 +59,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -86,6 +72,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -156,20 +156,6 @@ public FleetsClient getFleets() { return this.fleets; } - /** - * The AutoUpgradeProfilesClient object to access its operations. - */ - private final AutoUpgradeProfilesClient autoUpgradeProfiles; - - /** - * Gets the AutoUpgradeProfilesClient object to access its operations. - * - * @return the AutoUpgradeProfilesClient object. - */ - public AutoUpgradeProfilesClient getAutoUpgradeProfiles() { - return this.autoUpgradeProfiles; - } - /** * The FleetMembersClient object to access its operations. */ @@ -212,6 +198,20 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { return this.fleetUpdateStrategies; } + /** + * The AutoUpgradeProfilesClient object to access its operations. + */ + private final AutoUpgradeProfilesClient autoUpgradeProfiles; + + /** + * Gets the AutoUpgradeProfilesClient object to access its operations. + * + * @return the AutoUpgradeProfilesClient object. + */ + public AutoUpgradeProfilesClient getAutoUpgradeProfiles() { + return this.autoUpgradeProfiles; + } + /** * Initializes an instance of ContainerServiceFleetManagementClient client. * @@ -219,23 +219,23 @@ public FleetUpdateStrategiesClient getFleetUpdateStrategies() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ ContainerServiceFleetManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-05-02-preview"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-03-01"; this.operations = new OperationsClientImpl(this); this.fleets = new FleetsClientImpl(this); - this.autoUpgradeProfiles = new AutoUpgradeProfilesClientImpl(this); this.fleetMembers = new FleetMembersClientImpl(this); this.updateRuns = new UpdateRunsClientImpl(this); this.fleetUpdateStrategies = new FleetUpdateStrategiesClientImpl(this); + this.autoUpgradeProfiles = new AutoUpgradeProfilesClientImpl(this); } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java index 41fbd0adabdb..acb4dbaae35e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; 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 b49d5928c754..95aae4ddbc63 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile; import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetStatus; import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentity; import java.util.Collections; import java.util.Map; @@ -68,6 +69,10 @@ public FleetHubProfile hubProfile() { return this.innerModel().hubProfile(); } + public FleetStatus status() { + return this.innerModel().status(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -108,15 +113,14 @@ public FleetImpl withExistingResourceGroup(String resourceGroupName) { public Fleet create() { this.innerObject = serviceManager.serviceClient() .getFleets() - .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, - Context.NONE); + .create(resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE); return this; } public Fleet create(Context context) { this.innerObject = serviceManager.serviceClient() .getFleets() - .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, context); + .create(resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, context); return this; } @@ -138,14 +142,14 @@ public FleetImpl update() { public Fleet apply() { this.innerObject = serviceManager.serviceClient() .getFleets() - .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE); + .updateAsync(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE); return this; } public Fleet apply(Context context) { this.innerObject = serviceManager.serviceClient() .getFleets() - .update(resourceGroupName, fleetName, updateProperties, updateIfMatch, context); + .updateAsync(resourceGroupName, fleetName, updateProperties, updateIfMatch, context); return this; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java index 9ad2de43ff94..8d0836917df7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -9,7 +9,10 @@ import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; import com.azure.resourcemanager.containerservicefleet.models.FleetMember; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState; +import com.azure.resourcemanager.containerservicefleet.models.FleetMemberStatus; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; +import java.util.Collections; +import java.util.Map; public final class FleetMemberImpl implements FleetMember, FleetMember.Definition, FleetMember.Update { private FleetMemberInner innerObject; @@ -48,6 +51,19 @@ public FleetMemberProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public Map labels() { + Map inner = this.innerModel().labels(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public FleetMemberStatus status() { + return this.innerModel().status(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -114,14 +130,14 @@ public FleetMemberImpl update() { public FleetMember apply() { this.innerObject = serviceManager.serviceClient() .getFleetMembers() - .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE); + .updateAsync(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE); return this; } public FleetMember apply(Context context) { this.innerObject = serviceManager.serviceClient() .getFleetMembers() - .update(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context); + .updateAsync(resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context); return this; } @@ -165,6 +181,16 @@ public FleetMemberImpl withGroup(String group) { } } + public FleetMemberImpl withLabels(Map labels) { + if (isInCreateMode()) { + this.innerModel().withLabels(labels); + return this; + } else { + this.updateProperties.withLabels(labels); + return this; + } + } + public FleetMemberImpl withIfMatch(String ifMatch) { if (isInCreateMode()) { this.createIfMatch = ifMatch; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java index a3b3bd93302b..1c06082957f8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetMemberListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.FleetMemberListResult; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,211 +69,68 @@ public final class FleetMembersClientImpl implements FleetMembersClient { * The interface defining all the services for ContainerServiceFleetManagementClientFleetMembers to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetMembersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, - @PathParam("fleetMemberName") String fleetMemberName, - @BodyParam("application/json") FleetMemberInner resource, @HeaderParam("Accept") String accept, + @PathParam("fleetMemberName") String fleetMemberName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FleetMemberInner resource, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> updateAsync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, - @BodyParam("application/json") FleetMemberUpdate properties, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetMemberUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("fleetMemberName") String fleetMemberName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFleet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, - String fleetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, fleetName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), - nextLink -> listByFleetNextSinglePageAsync(nextLink)); - } - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), - nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); - } - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); - } - - /** - * List FleetMember resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); - } - /** * Get a FleetMember. * @@ -446,11 +303,12 @@ private Mono>> createWithResponseAsync(String resource } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, fleetMemberName, - resource, accept, context)) + contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -496,10 +354,12 @@ private Mono>> createWithResponseAsync(String resource } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ifMatch, ifNoneMatch, fleetName, fleetMemberName, resource, accept, context); + resourceGroupName, ifMatch, ifNoneMatch, fleetName, fleetMemberName, contentType, accept, resource, + context); } /** @@ -740,7 +600,7 @@ public FleetMemberInner create(String resourceGroupName, String fleetName, Strin * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> updateAsyncWithResponseAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -766,11 +626,12 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, fleetMemberName, properties, - accept, context)) + .withContext(context -> service.updateAsync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, fleetMemberName, contentType, + accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -789,7 +650,7 @@ private Mono>> updateWithResponseAsync(String resource * @return a member of the Fleet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> updateAsyncWithResponseAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -815,10 +676,12 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ifMatch, fleetName, fleetMemberName, properties, accept, context); + return service.updateAsync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, fleetMemberName, contentType, + accept, properties, context); } /** @@ -835,10 +698,10 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + private PollerFlux, FleetMemberInner> beginUpdateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } @@ -856,11 +719,11 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + private PollerFlux, FleetMemberInner> beginUpdateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, this.client.getContext()); } @@ -880,11 +743,11 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link PollerFlux} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetMemberInner> beginUpdateAsync(String resourceGroupName, + private PollerFlux, FleetMemberInner> beginUpdateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, context); } @@ -902,10 +765,10 @@ private PollerFlux, FleetMemberInner> beginUpdateAs * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, + public SyncPoller, FleetMemberInner> beginUpdateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) + return this.beginUpdateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch) .getSyncPoller(); } @@ -924,9 +787,9 @@ public SyncPoller, FleetMemberInner> beginUpdate(St * @return the {@link SyncPoller} for polling of a member of the Fleet. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetMemberInner> beginUpdate(String resourceGroupName, + public SyncPoller, FleetMemberInner> beginUpdateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { - return this.beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) + return this.beginUpdateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context) .getSyncPoller(); } @@ -944,9 +807,9 @@ public SyncPoller, FleetMemberInner> beginUpdate(St * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch) { - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -963,10 +826,10 @@ private Mono updateAsync(String resourceGroupName, String flee * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -985,9 +848,9 @@ private Mono updateAsync(String resourceGroupName, String flee * @return a member of the Fleet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1004,10 +867,10 @@ private Mono updateAsync(String resourceGroupName, String flee * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + public FleetMemberInner updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) { final String ifMatch = null; - return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).block(); + return updateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch).block(); } /** @@ -1025,9 +888,9 @@ public FleetMemberInner update(String resourceGroupName, String fleetName, Strin * @return a member of the Fleet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetMemberInner update(String resourceGroupName, String fleetName, String fleetMemberName, + public FleetMemberInner updateAsync(String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties, String ifMatch, Context context) { - return updateAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).block(); + return updateAsyncAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context).block(); } /** @@ -1303,6 +1166,147 @@ public void delete(String resourceGroupName, String fleetName, String fleetMembe deleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context).block(); } + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePageAsync(nextLink)); + } + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); + } + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); + } + + /** + * List FleetMember resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java index d37f9d2fb220..b1f812628173 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -27,16 +27,6 @@ public FleetMembersImpl(FleetMembersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager())); - } - - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, Context context) { Response inner @@ -67,6 +57,16 @@ public void delete(String resourceGroupName, String fleetName, String fleetMembe this.serviceClient().delete(resourceGroupName, fleetName, fleetMemberName, ifMatch, context); } + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager())); + } + + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager())); + } + public FleetMember getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java index 81a3825d2c36..05f8eec36679 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.FleetUpdateStrategiesClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetUpdateStrategyInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategyListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.FleetUpdateStrategyListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,202 +67,58 @@ public final class FleetUpdateStrategiesClientImpl implements FleetUpdateStrateg * The interface defining all the services for ContainerServiceFleetManagementClientFleetUpdateStrategies to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetUpdateStrategiesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @PathParam("updateStrategyName") String updateStrategyName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, - @PathParam("updateStrategyName") String updateStrategyName, - @BodyParam("application/json") FleetUpdateStrategyInner resource, @HeaderParam("Accept") String accept, + @PathParam("updateStrategyName") String updateStrategyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FleetUpdateStrategyInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies/{updateStrategyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("updateStrategyName") String updateStrategyName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateStrategies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByFleet(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, - String fleetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, - String fleetName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, fleetName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), - nextLink -> listByFleetNextSinglePageAsync(nextLink)); - } - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, - Context context) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), - nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); - } - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); - } - - /** - * List FleetUpdateStrategy resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName, - Context context) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); - } - /** * Get a FleetUpdateStrategy. * @@ -437,11 +293,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateStrategyName, - resource, accept, context)) + contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -489,11 +346,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateStrategyName, - resource, accept, context); + contentType, accept, resource, context); } /** @@ -1012,6 +870,149 @@ public void delete(String resourceGroupName, String fleetName, String updateStra deleteAsync(resourceGroupName, fleetName, updateStrategyName, ifMatch, context).block(); } + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByFleetSinglePageAsync(String resourceGroupName, + String fleetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePageAsync(nextLink)); + } + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, + Context context) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); + } + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); + } + + /** + * List FleetUpdateStrategy resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName, + Context context) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); + } + /** * Get the next page of items. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java index b8e856de3e26..f91436300fe5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -27,17 +27,6 @@ public FleetUpdateStrategiesImpl(FleetUpdateStrategiesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager())); - } - - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - PagedIterable inner - = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String fleetName, String updateStrategyName, Context context) { Response inner @@ -68,6 +57,17 @@ public void delete(String resourceGroupName, String fleetName, String updateStra this.serviceClient().delete(resourceGroupName, fleetName, updateStrategyName, ifMatch, context); } + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager())); + } + + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + PagedIterable inner + = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetUpdateStrategyImpl(inner1, this.manager())); + } + public FleetUpdateStrategy getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java index 3fbf83f3c190..46d67f654be5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetUpdateStrategyImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java index 9ca5fdf0aae3..7c682b332a72 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -36,7 +36,7 @@ import com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner; -import com.azure.resourcemanager.containerservicefleet.models.FleetListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.FleetListResult; import com.azure.resourcemanager.containerservicefleet.models.FleetPatch; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -70,69 +70,69 @@ public final class FleetsClientImpl implements FleetsClient { * The interface defining all the services for ContainerServiceFleetManagementClientFleets to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface FleetsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, - @BodyParam("application/json") FleetInner resource, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FleetInner resource, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> updateAsync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, @BodyParam("application/json") FleetPatch properties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("fleetName") String fleetName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FleetPatch properties, + Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/fleets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredentials(@HostParam("$host") String endpoint, + Mono> listCredentials(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @HeaderParam("Accept") String accept, Context context); @@ -141,257 +141,19 @@ Mono> listCredentials(@HostParam("$host") @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Lists fleets in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists fleets in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists fleets in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists fleets in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists fleets in the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists fleets in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists fleets in the specified subscription and resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - /** * Gets a Fleet. * @@ -523,7 +285,7 @@ public FleetInner getByResourceGroup(String resourceGroupName, String fleetName) * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> createWithResponseAsync(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -545,11 +307,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, resource, accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, contentType, + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -568,7 +331,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> createWithResponseAsync(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -590,11 +353,11 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, resource, accept, - context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, ifNoneMatch, fleetName, contentType, accept, resource, context); } /** @@ -611,10 +374,10 @@ private Mono>> createOrUpdateWithResponseAsync(String * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, - String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { + private PollerFlux, FleetInner> beginCreateAsync(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); + = createWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); } @@ -631,12 +394,12 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, - String fleetName, FleetInner resource) { + private PollerFlux, FleetInner> beginCreateAsync(String resourceGroupName, String fleetName, + FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); + = createWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); } @@ -656,11 +419,11 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName, - String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { + private PollerFlux, FleetInner> beginCreateAsync(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context); + = createWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context); } @@ -677,12 +440,11 @@ private PollerFlux, FleetInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, - String fleetName, FleetInner resource) { + public SyncPoller, FleetInner> beginCreate(String resourceGroupName, String fleetName, + FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch) - .getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).getSyncPoller(); } /** @@ -700,9 +462,9 @@ public SyncPoller, FleetInner> beginCreateOrUpdate(String * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, - String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context) + public SyncPoller, FleetInner> beginCreate(String resourceGroupName, String fleetName, + FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { + return this.beginCreateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context) .getSyncPoller(); } @@ -720,9 +482,9 @@ public SyncPoller, FleetInner> beginCreateOrUpdate(String * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource, + private Mono createAsync(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) { - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() + return beginCreateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -738,10 +500,10 @@ private Mono createOrUpdateAsync(String resourceGroupName, String fl * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource) { + private Mono createAsync(String resourceGroupName, String fleetName, FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() + return beginCreateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -760,9 +522,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, String fl * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource, + private Mono createAsync(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).last() + return beginCreateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -778,10 +540,10 @@ private Mono createOrUpdateAsync(String resourceGroupName, String fl * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource) { + public FleetInner create(String resourceGroupName, String fleetName, FleetInner resource) { final String ifMatch = null; final String ifNoneMatch = null; - return createOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).block(); + return createAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).block(); } /** @@ -799,9 +561,9 @@ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, Fle * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, + public FleetInner create(String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch, Context context) { - return createOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).block(); + return createAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).block(); } /** @@ -817,7 +579,7 @@ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, Fle * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> updateAsyncWithResponseAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -839,10 +601,12 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, properties, accept, context)) + .withContext(context -> service.updateAsync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -860,7 +624,7 @@ private Mono>> updateWithResponseAsync(String resource * @return the Fleet resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> updateAsyncWithResponseAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -882,10 +646,12 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ifMatch, fleetName, properties, accept, context); + return service.updateAsync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, contentType, accept, properties, + context); } /** @@ -901,10 +667,10 @@ private Mono>> updateWithResponseAsync(String resource * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, - FleetPatch properties, String ifMatch) { + private PollerFlux, FleetInner> beginUpdateAsyncAsync(String resourceGroupName, + String fleetName, FleetPatch properties, String ifMatch) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); } @@ -921,11 +687,11 @@ private PollerFlux, FleetInner> beginUpdateAsync(String r * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, - FleetPatch properties) { + private PollerFlux, FleetInner> beginUpdateAsyncAsync(String resourceGroupName, + String fleetName, FleetPatch properties) { final String ifMatch = null; Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext()); } @@ -944,11 +710,11 @@ private PollerFlux, FleetInner> beginUpdateAsync(String r * @return the {@link PollerFlux} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, - FleetPatch properties, String ifMatch, Context context) { + private PollerFlux, FleetInner> beginUpdateAsyncAsync(String resourceGroupName, + String fleetName, FleetPatch properties, String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context); + = updateAsyncWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context); } @@ -965,10 +731,10 @@ private PollerFlux, FleetInner> beginUpdateAsync(String r * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + public SyncPoller, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).getSyncPoller(); + return this.beginUpdateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch).getSyncPoller(); } /** @@ -985,9 +751,9 @@ public SyncPoller, FleetInner> beginUpdate(String resourc * @return the {@link SyncPoller} for polling of the Fleet resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName, + public SyncPoller, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { - return this.beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context).getSyncPoller(); + return this.beginUpdateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch, context).getSyncPoller(); } /** @@ -1003,9 +769,9 @@ public SyncPoller, FleetInner> beginUpdate(String resourc * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) { - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1021,9 +787,9 @@ private Mono updateAsync(String resourceGroupName, String fleetName, * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) { + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1041,9 +807,9 @@ private Mono updateAsync(String resourceGroupName, String fleetName, * @return the Fleet resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, + private Mono updateAsyncAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, fleetName, properties, ifMatch, context).last() + return beginUpdateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1059,9 +825,9 @@ private Mono updateAsync(String resourceGroupName, String fleetName, * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties) { + public FleetInner updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) { final String ifMatch = null; - return updateAsync(resourceGroupName, fleetName, properties, ifMatch).block(); + return updateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch).block(); } /** @@ -1078,9 +844,9 @@ public FleetInner update(String resourceGroupName, String fleetName, FleetPatch * @return the Fleet resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, + public FleetInner updateAsync(String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) { - return updateAsync(resourceGroupName, fleetName, properties, ifMatch, context).block(); + return updateAsyncAsync(resourceGroupName, fleetName, properties, ifMatch, context).block(); } /** @@ -1330,6 +1096,244 @@ public void delete(String resourceGroupName, String fleetName, String ifMatch, C deleteAsync(resourceGroupName, fleetName, ifMatch, context).block(); } + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists fleets in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Lists fleets in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists fleets in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists fleets in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists fleets in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists fleets in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Lists fleets in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + /** * Lists the user credentials of a Fleet. * @@ -1459,7 +1463,7 @@ public FleetCredentialResultsInner listCredentials(String resourceGroupName, Str * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1470,7 +1474,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1488,7 +1492,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1498,7 +1502,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1514,7 +1518,7 @@ private Mono> listBySubscriptionNextSinglePageAsync(St * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1525,7 +1529,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1543,7 +1547,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1553,7 +1557,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java index 74e2ea388c06..18d0055512b8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -29,26 +29,6 @@ public FleetsImpl(FleetsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, fleetName, context); @@ -77,6 +57,26 @@ public void delete(String resourceGroupName, String fleetName, String ifMatch, C this.serviceClient().delete(resourceGroupName, fleetName, ifMatch, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager())); + } + public Response listCredentialsWithResponse(String resourceGroupName, String fleetName, Context context) { Response inner diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java index 8ec2a71a828a..07d3128fa442 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java index 9ae43ab08d04..07a205305227 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner; -import com.azure.resourcemanager.containerservicefleet.models.OperationListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,14 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for ContainerServiceFleetManagementClientOperations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ContainerService/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java index a6d906de4732..86969e5a38c8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java index 298ab0f5676b..82d33157efd2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java index 97b12c23dac2..bd586d5f4a31 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -163,14 +163,6 @@ public UpdateRun refresh(Context context) { return this; } - public UpdateRun skip(SkipProperties body) { - return serviceManager.updateRuns().skip(resourceGroupName, fleetName, updateRunName, body); - } - - public UpdateRun skip(SkipProperties body, String ifMatch, Context context) { - return serviceManager.updateRuns().skip(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); - } - public UpdateRun start() { return serviceManager.updateRuns().start(resourceGroupName, fleetName, updateRunName); } @@ -187,6 +179,14 @@ public UpdateRun stop(String ifMatch, Context context) { return serviceManager.updateRuns().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context); } + public UpdateRun skip(SkipProperties body) { + return serviceManager.updateRuns().skip(resourceGroupName, fleetName, updateRunName, body); + } + + public UpdateRun skip(SkipProperties body, String ifMatch, Context context) { + return serviceManager.updateRuns().skip(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); + } + public UpdateRunImpl withUpdateStrategyId(String updateStrategyId) { this.innerModel().withUpdateStrategyId(updateStrategyId); return this; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java index 08f7f914bba4..46aa60a840f9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -34,8 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient; import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.containerservicefleet.implementation.models.UpdateRunListResult; import com.azure.resourcemanager.containerservicefleet.models.SkipProperties; -import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,63 +69,53 @@ public final class UpdateRunsClientImpl implements UpdateRunsClient { * The interface defining all the services for ContainerServiceFleetManagementClientUpdateRuns to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "ContainerServiceFlee") public interface UpdateRunsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByFleet(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, - @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @HeaderParam("If-None-Match") String ifNoneMatch, @PathParam("fleetName") String fleetName, - @PathParam("updateRunName") String updateRunName, @BodyParam("application/json") UpdateRunInner resource, - @HeaderParam("Accept") String accept, Context context); + @PathParam("updateRunName") String updateRunName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateRunInner resource, + Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/skip") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> skip(@HostParam("$host") String endpoint, + Mono> listByFleet(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, - @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, - @BodyParam("application/json") SkipProperties body, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, @@ -135,161 +125,31 @@ Mono>> start(@HostParam("$host") String endpoint, @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, + Mono>> stop(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/skip") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> skip(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("If-Match") String ifMatch, + @PathParam("fleetName") String fleetName, @PathParam("updateRunName") String updateRunName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SkipProperties body, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByFleetNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (fleetName == null) { - return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, fleetName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), - nextLink -> listByFleetNextSinglePageAsync(nextLink)); - } - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { - return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), - nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); - } - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); - } - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); - } - /** * Get a UpdateRun. * @@ -460,11 +320,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateRunName, - resource, accept, context)) + contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -510,11 +371,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, ifNoneMatch, fleetName, updateRunName, - resource, accept, context); + contentType, accept, resource, context); } /** @@ -1025,22 +887,18 @@ public void delete(String resourceGroupName, String fleetName, String updateRunN } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. - * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> skipWithResponseAsync(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body, String ifMatch) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1056,40 +914,30 @@ private Mono>> skipWithResponseAsync(String resourceGr if (fleetName == null) { return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.skip(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, body, accept, - context)) + .withContext(context -> service.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> skipWithResponseAsync(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body, String ifMatch, Context context) { + private Mono> listByFleetSinglePageAsync(String resourceGroupName, String fleetName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1105,236 +953,356 @@ private Mono>> skipWithResponseAsync(String resourceGr if (fleetName == null) { return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); } - if (updateRunName == null) { - return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.skip(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ifMatch, fleetName, updateRunName, body, accept, context); + return service + .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, fleetName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. - * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, - String fleetName, String updateRunName, SkipProperties body, String ifMatch) { - Mono>> mono - = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName), + nextLink -> listByFleetNextSinglePageAsync(nextLink)); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, - String fleetName, String updateRunName, SkipProperties body) { - final String ifMatch = null; - Mono>> mono - = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) { + return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context), + nextLink -> listByFleetNextSinglePageAsync(nextLink, context)); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName)); + } + + /** + * List UpdateRun resources by Fleet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context)); + } + + /** + * Starts an UpdateRun. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (fleetName == null) { + return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); + } + + /** + * Starts an UpdateRun. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, - String fleetName, String updateRunName, SkipProperties body, String ifMatch, Context context) { + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch) { + Mono>> mono + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); + } + + /** + * Starts an UpdateRun. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName) { + final String ifMatch = null; + Mono>> mono + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); + } + + /** + * Starts an UpdateRun. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + String fleetName, String updateRunName, String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); + = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body) { + public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName) { final String ifMatch = null; - return this.beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).getSyncPoller(); + return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, - String updateRunName, SkipProperties body, String ifMatch, Context context) { - return this.beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).getSyncPoller(); + public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + String updateRunName, String ifMatch, Context context) { + return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, - SkipProperties body, String ifMatch) { - return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).last() + private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch) { + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, - SkipProperties body) { + private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).last() + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, - SkipProperties body, String ifMatch, Context context) { - return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).last() + private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + String ifMatch, Context context) { + return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { + public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return skipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).block(); + return startAsync(resourceGroupName, fleetName, updateRunName, ifMatch).block(); } /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * Starts an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, - String ifMatch, Context context) { - return skipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).block(); + public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { + return startAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1343,11 +1311,10 @@ public UpdateRunInner skip(String resourceGroupName, String fleetName, String up * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1369,13 +1336,13 @@ private Mono>> startWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1385,11 +1352,10 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String fleetName, + private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1411,12 +1377,12 @@ private Mono>> startWithResponseAsync(String resourceG } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1425,20 +1391,19 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { Mono>> mono - = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1446,21 +1411,20 @@ private PollerFlux, UpdateRunInner> beginStartAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; Mono>> mono - = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1470,21 +1434,20 @@ private PollerFlux, UpdateRunInner> beginStartAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStartAsync(String resourceGroupName, + private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = startWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); + = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1492,18 +1455,17 @@ private PollerFlux, UpdateRunInner> beginStartAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); + return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1513,17 +1475,16 @@ public SyncPoller, UpdateRunInner> beginStart(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStart(String resourceGroupName, String fleetName, + public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return this.beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); + return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1532,18 +1493,17 @@ public SyncPoller, UpdateRunInner> beginStart(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch) { - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1551,18 +1511,17 @@ private Mono startAsync(String resourceGroupName, String fleetNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName) { + private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1572,18 +1531,17 @@ private Mono startAsync(String resourceGroupName, String fleetNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String fleetName, String updateRunName, + private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return beginStartAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() + return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1591,16 +1549,16 @@ private Mono startAsync(String resourceGroupName, String fleetNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName) { + public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName) { final String ifMatch = null; - return startAsync(resourceGroupName, fleetName, updateRunName, ifMatch).block(); + return stopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).block(); } /** - * Starts an UpdateRun. + * Stops an UpdateRun. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. @@ -1610,30 +1568,30 @@ public UpdateRunInner start(String resourceGroupName, String fleetName, String u * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - return startAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); + return stopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, - String updateRunName, String ifMatch) { + private Mono>> skipWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1652,30 +1610,37 @@ private Mono>> stopWithResponseAsync(String resourceGr if (updateRunName == null) { return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, accept, context)) + .withContext(context -> service.skip(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, ifMatch, fleetName, updateRunName, contentType, + accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet along with {@link Response} - * on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String fleetName, - String updateRunName, String ifMatch, Context context) { + private Mono>> skipWithResponseAsync(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1694,213 +1659,222 @@ private Mono>> stopWithResponseAsync(String resourceGr if (updateRunName == null) { return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, ifMatch, fleetName, updateRunName, accept, context); + return service.skip(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, ifMatch, fleetName, updateRunName, contentType, accept, body, context); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, - String fleetName, String updateRunName, String ifMatch) { + private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, + String fleetName, String updateRunName, SkipProperties body, String ifMatch) { Mono>> mono - = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, - String fleetName, String updateRunName) { + private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, + String fleetName, String updateRunName, SkipProperties body) { final String ifMatch = null; Mono>> mono - = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch); + = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, this.client.getContext()); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, UpdateRunInner> beginStopAsync(String resourceGroupName, - String fleetName, String updateRunName, String ifMatch, Context context) { + private PollerFlux, UpdateRunInner> beginSkipAsync(String resourceGroupName, + String fleetName, String updateRunName, SkipProperties body, String ifMatch, Context context) { context = this.client.mergeContext(context); Mono>> mono - = stopWithResponseAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context); + = skipWithResponseAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), UpdateRunInner.class, UpdateRunInner.class, context); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, - String updateRunName) { + public SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body) { final String ifMatch = null; - return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).getSyncPoller(); + return this.beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).getSyncPoller(); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a multi-stage process to perform update operations across members - * of a Fleet. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, UpdateRunInner> beginStop(String resourceGroupName, String fleetName, - String updateRunName, String ifMatch, Context context) { - return this.beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).getSyncPoller(); + public SyncPoller, UpdateRunInner> beginSkip(String resourceGroupName, String fleetName, + String updateRunName, SkipProperties body, String ifMatch, Context context) { + return this.beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).getSyncPoller(); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, - String ifMatch) { - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() + private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch) { + return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName) { + private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body) { final String ifMatch = null; - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).last() + return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet on successful completion of - * {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String fleetName, String updateRunName, - String ifMatch, Context context) { - return beginStopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).last() + private Mono skipAsync(String resourceGroupName, String fleetName, String updateRunName, + SkipProperties body, String ifMatch, Context context) { + return beginSkipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName) { + public UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { final String ifMatch = null; - return stopAsync(resourceGroupName, fleetName, updateRunName, ifMatch).block(); + return skipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch).block(); } /** - * Stops an UpdateRun. + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, - Context context) { - return stopAsync(resourceGroupName, fleetName, updateRunName, ifMatch, context).block(); + public UpdateRunInner skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, + String ifMatch, Context context) { + return skipAsync(resourceGroupName, fleetName, updateRunName, body, ifMatch, context).block(); } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java index 275692b5c54a..23a5c1a34b2e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.implementation; @@ -28,16 +28,6 @@ public UpdateRunsImpl(UpdateRunsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByFleet(String resourceGroupName, String fleetName) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); - } - - public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { - PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String fleetName, String updateRunName, Context context) { Response inner @@ -68,8 +58,18 @@ public void delete(String resourceGroupName, String fleetName, String updateRunN this.serviceClient().delete(resourceGroupName, fleetName, updateRunName, ifMatch, context); } - public UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { - UpdateRunInner inner = this.serviceClient().skip(resourceGroupName, fleetName, updateRunName, body); + public PagedIterable listByFleet(String resourceGroupName, String fleetName) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + + public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) { + PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + + public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName) { + UpdateRunInner inner = this.serviceClient().start(resourceGroupName, fleetName, updateRunName); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -77,10 +77,10 @@ public UpdateRun skip(String resourceGroupName, String fleetName, String updateR } } - public UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, - String ifMatch, Context context) { + public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + Context context) { UpdateRunInner inner - = this.serviceClient().skip(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); + = this.serviceClient().start(resourceGroupName, fleetName, updateRunName, ifMatch, context); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -88,8 +88,8 @@ public UpdateRun skip(String resourceGroupName, String fleetName, String updateR } } - public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName) { - UpdateRunInner inner = this.serviceClient().start(resourceGroupName, fleetName, updateRunName); + public UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName) { + UpdateRunInner inner = this.serviceClient().stop(resourceGroupName, fleetName, updateRunName); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -97,10 +97,9 @@ public UpdateRun start(String resourceGroupName, String fleetName, String update } } - public UpdateRun start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, + public UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context) { - UpdateRunInner inner - = this.serviceClient().start(resourceGroupName, fleetName, updateRunName, ifMatch, context); + UpdateRunInner inner = this.serviceClient().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -108,8 +107,8 @@ public UpdateRun start(String resourceGroupName, String fleetName, String update } } - public UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName) { - UpdateRunInner inner = this.serviceClient().stop(resourceGroupName, fleetName, updateRunName); + public UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body) { + UpdateRunInner inner = this.serviceClient().skip(resourceGroupName, fleetName, updateRunName, body); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { @@ -117,9 +116,10 @@ public UpdateRun stop(String resourceGroupName, String fleetName, String updateR } } - public UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, - Context context) { - UpdateRunInner inner = this.serviceClient().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context); + public UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, + String ifMatch, Context context) { + UpdateRunInner inner + = this.serviceClient().skip(resourceGroupName, fleetName, updateRunName, body, ifMatch, context); if (inner != null) { return new UpdateRunImpl(inner, this.manager()); } else { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/AutoUpgradeProfileListResult.java similarity index 80% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/AutoUpgradeProfileListResult.java index 49256fcf9c5d..25b668809080 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/AutoUpgradeProfileListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a AutoUpgradeProfile list operation. */ -@Fluent +@Immutable public final class AutoUpgradeProfileListResult implements JsonSerializable { /* * The AutoUpgradeProfile items on this page @@ -32,7 +32,7 @@ public final class AutoUpgradeProfileListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The AutoUpgradeProfile items on this page. - * - * @param value the value value to set. - * @return the AutoUpgradeProfileListResult object itself. - */ - public AutoUpgradeProfileListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the AutoUpgradeProfileListResult object itself. - */ - public AutoUpgradeProfileListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetListResult.java similarity index 80% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetListResult.java index eeb8e227f7c6..bfe2b84cab75 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a Fleet list operation. */ -@Fluent +@Immutable public final class FleetListResult implements JsonSerializable { /* * The Fleet items on this page @@ -32,7 +32,7 @@ public final class FleetListResult implements JsonSerializable /** * Creates an instance of FleetListResult class. */ - public FleetListResult() { + private FleetListResult() { } /** @@ -44,17 +44,6 @@ public List value() { return this.value; } - /** - * Set the value property: The Fleet items on this page. - * - * @param value the value value to set. - * @return the FleetListResult object itself. - */ - public FleetListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the FleetListResult object itself. - */ - public FleetListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetMemberListResult.java similarity index 80% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetMemberListResult.java index f8c2ef592420..4836e6b649fd 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetMemberListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a FleetMember list operation. */ -@Fluent +@Immutable public final class FleetMemberListResult implements JsonSerializable { /* * The FleetMember items on this page @@ -32,7 +32,7 @@ public final class FleetMemberListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The FleetMember items on this page. - * - * @param value the value value to set. - * @return the FleetMemberListResult object itself. - */ - public FleetMemberListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the FleetMemberListResult object itself. - */ - public FleetMemberListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetUpdateStrategyListResult.java similarity index 80% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetUpdateStrategyListResult.java index 875b346fe787..a9e8cf491996 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/FleetUpdateStrategyListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a FleetUpdateStrategy list operation. */ -@Fluent +@Immutable public final class FleetUpdateStrategyListResult implements JsonSerializable { /* * The FleetUpdateStrategy items on this page @@ -32,7 +32,7 @@ public final class FleetUpdateStrategyListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The FleetUpdateStrategy items on this page. - * - * @param value the value value to set. - * @return the FleetUpdateStrategyListResult object itself. - */ - public FleetUpdateStrategyListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the FleetUpdateStrategyListResult object itself. - */ - public FleetUpdateStrategyListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/OperationListResult.java similarity index 73% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/OperationListResult.java index 5220b1f869b2..24b85d00a2a5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/OperationListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,23 +21,23 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -59,17 +60,24 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/UpdateRunListResult.java similarity index 80% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/UpdateRunListResult.java index b7da56f0f445..e34763f5b06c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunListResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/models/UpdateRunListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.containerservicefleet.models; +package com.azure.resourcemanager.containerservicefleet.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * The response of a UpdateRun list operation. */ -@Fluent +@Immutable public final class UpdateRunListResult implements JsonSerializable { /* * The UpdateRun items on this page @@ -32,7 +32,7 @@ public final class UpdateRunListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The UpdateRun items on this page. - * - * @param value the value value to set. - * @return the UpdateRunListResult object itself. - */ - public UpdateRunListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link to the next page of items. * @@ -64,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the UpdateRunListResult object itself. - */ - public UpdateRunListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java index 1ae401cdc028..ae0d36a01842 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for ContainerServiceFleetManagementClient. - * Azure Kubernetes Fleet Manager Client. + * Package containing the implementations for ContainerServiceFleet. + * Azure Kubernetes Fleet Manager api client. */ package com.azure.resourcemanager.containerservicefleet.implementation; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java index 3adc9ba31383..7a8a2beb331b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); 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 index 3688bd5de753..92fc8539a5ba 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; 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 index a1bc34f9fc22..d2319b9351fd 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java index aae6d6b4eaf6..9268cdd0c7a7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java index ea0855bf88fd..9d55689cd9fd 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeNodeImageSelectionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,12 +12,20 @@ */ public final class AutoUpgradeNodeImageSelectionType extends ExpandableStringEnum { /** - * Static value Latest for AutoUpgradeNodeImageSelectionType. + * Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., + * 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, + * the latest available version is different in different regions. */ public static final AutoUpgradeNodeImageSelectionType LATEST = fromString("Latest"); /** - * Static value Consistent for AutoUpgradeNodeImageSelectionType. + * The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters + * affected by the update run, the system selects the latest image version such that it is available across all + * other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image + * type will be upgraded to the same image version. For example, if the latest image version for image type + * 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in + * region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system + * will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. */ public static final AutoUpgradeNodeImageSelectionType CONSISTENT = fromString("Consistent"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java index 9e7e5f6cccd6..f7fefc4655ba 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java index 8a2fac31fc02..27df8ed8b2ba 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfileProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,17 +13,17 @@ public final class AutoUpgradeProfileProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for AutoUpgradeProfileProvisioningState. + * Resource has been created. */ public static final AutoUpgradeProfileProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for AutoUpgradeProfileProvisioningState. + * Resource creation failed. */ public static final AutoUpgradeProfileProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for AutoUpgradeProfileProvisioningState. + * Resource creation was canceled. */ public static final AutoUpgradeProfileProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java index f217b6dba4de..9edaedb1018e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/AutoUpgradeProfiles.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,84 +13,84 @@ */ public interface AutoUpgradeProfiles { /** - * List AutoUpgradeProfile resources by Fleet. + * Get a AutoUpgradeProfile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. + * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + * @return a AutoUpgradeProfile along with {@link Response}. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName); + Response getWithResponse(String resourceGroupName, String fleetName, + String autoUpgradeProfileName, Context context); /** - * List AutoUpgradeProfile resources by Fleet. + * Get a AutoUpgradeProfile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. + * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. + * @return a AutoUpgradeProfile. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); + AutoUpgradeProfile get(String resourceGroupName, String fleetName, String autoUpgradeProfileName); /** - * Get a AutoUpgradeProfile. + * Delete a AutoUpgradeProfile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutoUpgradeProfile along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String fleetName, - String autoUpgradeProfileName, Context context); + void delete(String resourceGroupName, String fleetName, String autoUpgradeProfileName); /** - * Get a AutoUpgradeProfile. + * Delete a AutoUpgradeProfile. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutoUpgradeProfile. */ - AutoUpgradeProfile get(String resourceGroupName, String fleetName, String autoUpgradeProfileName); + void delete(String resourceGroupName, String fleetName, String autoUpgradeProfileName, String ifMatch, + Context context); /** - * Delete a AutoUpgradeProfile. + * List AutoUpgradeProfile resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String autoUpgradeProfileName); + PagedIterable listByFleet(String resourceGroupName, String fleetName); /** - * Delete a AutoUpgradeProfile. + * List AutoUpgradeProfile resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param autoUpgradeProfileName The name of the AutoUpgradeProfile resource. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutoUpgradeProfile list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String autoUpgradeProfileName, String ifMatch, - Context context); + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); /** * Get a AutoUpgradeProfile. 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 b4ee352f77bd..b92bb1f76aff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -88,6 +88,13 @@ public interface Fleet { */ FleetHubProfile hubProfile(); + /** + * Gets the status property: Status information for the fleet. + * + * @return the status value. + */ + FleetStatus status(); + /** * Gets the region of the resource. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java index f5e02f61bf05..d9432aea1e5f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetCredentialResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -30,7 +30,7 @@ public final class FleetCredentialResult implements JsonSerializable labels(); + + /** + * Gets the status property: Status information of the last operation for fleet member. + * + * @return the status value. + */ + FleetMemberStatus status(); + /** * Gets the name of the resource group. * @@ -123,7 +138,7 @@ interface WithParentResource { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithClusterResourceId, DefinitionStages.WithGroup, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { + DefinitionStages.WithLabels, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { /** * Executes the create request. * @@ -170,6 +185,19 @@ interface WithGroup { WithCreate withGroup(String group); } + /** + * The stage of the FleetMember definition allowing to specify labels. + */ + interface WithLabels { + /** + * Specifies the labels property: The labels for the fleet member.. + * + * @param labels The labels for the fleet member. + * @return the next definition stage. + */ + WithCreate withLabels(Map labels); + } + /** * The stage of the FleetMember definition allowing to specify ifMatch. */ @@ -207,7 +235,7 @@ interface WithIfNoneMatch { /** * The template for FleetMember update. */ - interface Update extends UpdateStages.WithGroup, UpdateStages.WithIfMatch { + interface Update extends UpdateStages.WithGroup, UpdateStages.WithLabels, UpdateStages.WithIfMatch { /** * Executes the update request. * @@ -241,6 +269,19 @@ interface WithGroup { Update withGroup(String group); } + /** + * The stage of the FleetMember update allowing to specify labels. + */ + interface WithLabels { + /** + * Specifies the labels property: The labels for the fleet member.. + * + * @param labels The labels for the fleet member. + * @return the next definition stage. + */ + Update withLabels(Map labels); + } + /** * The stage of the FleetMember update allowing to specify ifMatch. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java index fa2f421589bd..9eda3ee6b47c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,32 +12,32 @@ */ public final class FleetMemberProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for FleetMemberProvisioningState. + * Resource has been created. */ public static final FleetMemberProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for FleetMemberProvisioningState. + * Resource creation failed. */ public static final FleetMemberProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for FleetMemberProvisioningState. + * Resource creation was canceled. */ public static final FleetMemberProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Joining for FleetMemberProvisioningState. + * The provisioning state of a member joining a fleet. */ public static final FleetMemberProvisioningState JOINING = fromString("Joining"); /** - * Static value Leaving for FleetMemberProvisioningState. + * The provisioning state of a member leaving a fleet. */ public static final FleetMemberProvisioningState LEAVING = fromString("Leaving"); /** - * Static value Updating for FleetMemberProvisioningState. + * The provisioning state of a member being updated. */ public static final FleetMemberProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberStatus.java new file mode 100644 index 000000000000..9115e71d84c8 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberStatus.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status information for the fleet member. + */ +@Immutable +public final class FleetMemberStatus implements JsonSerializable { + /* + * The last operation ID for the fleet member + */ + private String lastOperationId; + + /* + * The last operation error of the fleet member + */ + private ManagementError lastOperationError; + + /** + * Creates an instance of FleetMemberStatus class. + */ + private FleetMemberStatus() { + } + + /** + * Get the lastOperationId property: The last operation ID for the fleet member. + * + * @return the lastOperationId value. + */ + public String lastOperationId() { + return this.lastOperationId; + } + + /** + * Get the lastOperationError property: The last operation error of the fleet member. + * + * @return the lastOperationError value. + */ + public ManagementError lastOperationError() { + return this.lastOperationError; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetMemberStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetMemberStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FleetMemberStatus. + */ + public static FleetMemberStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetMemberStatus deserializedFleetMemberStatus = new FleetMemberStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastOperationId".equals(fieldName)) { + deserializedFleetMemberStatus.lastOperationId = reader.getString(); + } else if ("lastOperationError".equals(fieldName)) { + deserializedFleetMemberStatus.lastOperationError = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetMemberStatus; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java index 11d3a6eb3245..5fbe81072d5b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMemberUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -11,6 +11,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties; import java.io.IOException; +import java.util.Map; /** * The type used for update operations of the FleetMember. @@ -60,6 +61,29 @@ public FleetMemberUpdate withGroup(String group) { return this; } + /** + * Get the labels property: The labels for the fleet member. + * + * @return the labels value. + */ + public Map labels() { + return this.innerProperties() == null ? null : this.innerProperties().labels(); + } + + /** + * Set the labels property: The labels for the fleet member. + * + * @param labels the labels value to set. + * @return the FleetMemberUpdate object itself. + */ + public FleetMemberUpdate withLabels(Map labels) { + if (this.innerProperties() == null) { + this.innerProperties = new FleetMemberUpdateProperties(); + } + this.innerProperties().withLabels(labels); + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java index 91c22d148f6e..427da4b65599 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetMembers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,83 +13,83 @@ */ public interface FleetMembers { /** - * List FleetMember resources by Fleet. + * Get a FleetMember. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. + * @param fleetMemberName The name of the Fleet member resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + * @return a FleetMember along with {@link Response}. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName); + Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, + Context context); /** - * List FleetMember resources by Fleet. + * Get a FleetMember. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. + * @param fleetMemberName The name of the Fleet member resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. + * @return a FleetMember. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); + FleetMember get(String resourceGroupName, String fleetName, String fleetMemberName); /** - * Get a FleetMember. + * Delete a FleetMember. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a FleetMember along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String fleetName, String fleetMemberName, - Context context); + void delete(String resourceGroupName, String fleetName, String fleetMemberName); /** - * Get a FleetMember. + * Delete a FleetMember. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param fleetMemberName The name of the Fleet member resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a FleetMember. */ - FleetMember get(String resourceGroupName, String fleetName, String fleetMemberName); + void delete(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context); /** - * Delete a FleetMember. + * List FleetMember resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param fleetMemberName The name of the Fleet member resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String fleetMemberName); + PagedIterable listByFleet(String resourceGroupName, String fleetName); /** - * Delete a FleetMember. + * List FleetMember resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param fleetMemberName The name of the Fleet member resource. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context); + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); /** * Get a FleetMember. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java index 599286218fee..be2a3b53bacd 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java index ab57bf91969a..539520af567d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,32 +12,32 @@ */ public final class FleetProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for FleetProvisioningState. + * Resource has been created. */ public static final FleetProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for FleetProvisioningState. + * Resource creation failed. */ public static final FleetProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for FleetProvisioningState. + * Resource creation was canceled. */ public static final FleetProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Creating for FleetProvisioningState. + * The provisioning state of a fleet being created. */ public static final FleetProvisioningState CREATING = fromString("Creating"); /** - * Static value Updating for FleetProvisioningState. + * The provisioning state of a fleet being updated. */ public static final FleetProvisioningState UPDATING = fromString("Updating"); /** - * Static value Deleting for FleetProvisioningState. + * The provisioning state of a fleet being deleted. */ public static final FleetProvisioningState DELETING = fromString("Deleting"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetStatus.java new file mode 100644 index 000000000000..9d7fbeb690d6 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetStatus.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservicefleet.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status information for the fleet. + */ +@Immutable +public final class FleetStatus implements JsonSerializable { + /* + * The last operation ID for the fleet. + */ + private String lastOperationId; + + /* + * The last operation error for the fleet. + */ + private ManagementError lastOperationError; + + /** + * Creates an instance of FleetStatus class. + */ + private FleetStatus() { + } + + /** + * Get the lastOperationId property: The last operation ID for the fleet. + * + * @return the lastOperationId value. + */ + public String lastOperationId() { + return this.lastOperationId; + } + + /** + * Get the lastOperationError property: The last operation error for the fleet. + * + * @return the lastOperationError value. + */ + public ManagementError lastOperationError() { + return this.lastOperationError; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FleetStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FleetStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FleetStatus. + */ + public static FleetStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FleetStatus deserializedFleetStatus = new FleetStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lastOperationId".equals(fieldName)) { + deserializedFleetStatus.lastOperationId = reader.getString(); + } else if ("lastOperationError".equals(fieldName)) { + deserializedFleetStatus.lastOperationError = ManagementError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFleetStatus; + }); + } +} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java index f01f4b42010f..cbe0e251f2f9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,83 +13,83 @@ */ public interface FleetUpdateStrategies { /** - * List FleetUpdateStrategy resources by Fleet. + * Get a FleetUpdateStrategy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. + * @param updateStrategyName The name of the UpdateStrategy resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + * @return a FleetUpdateStrategy along with {@link Response}. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName); + Response getWithResponse(String resourceGroupName, String fleetName, String updateStrategyName, + Context context); /** - * List FleetUpdateStrategy resources by Fleet. + * Get a FleetUpdateStrategy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. + * @param updateStrategyName The name of the UpdateStrategy resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. + * @return a FleetUpdateStrategy. */ - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); + FleetUpdateStrategy get(String resourceGroupName, String fleetName, String updateStrategyName); /** - * Get a FleetUpdateStrategy. + * Delete a FleetUpdateStrategy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a FleetUpdateStrategy along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String fleetName, String updateStrategyName, - Context context); + void delete(String resourceGroupName, String fleetName, String updateStrategyName); /** - * Get a FleetUpdateStrategy. + * Delete a FleetUpdateStrategy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. * @param updateStrategyName The name of the UpdateStrategy resource. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a FleetUpdateStrategy. */ - FleetUpdateStrategy get(String resourceGroupName, String fleetName, String updateStrategyName); + void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context); /** - * Delete a FleetUpdateStrategy. + * List FleetUpdateStrategy resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateStrategyName The name of the UpdateStrategy resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String updateStrategyName); + PagedIterable listByFleet(String resourceGroupName, String fleetName); /** - * Delete a FleetUpdateStrategy. + * List FleetUpdateStrategy resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateStrategyName The name of the UpdateStrategy resource. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FleetUpdateStrategy list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String updateStrategyName, String ifMatch, Context context); + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); /** * Get a FleetUpdateStrategy. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java index b7d301a9825a..65642c7c9bd4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java index 09576d964a78..7caa1d8fdf9e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/FleetUpdateStrategyProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,17 +13,17 @@ public final class FleetUpdateStrategyProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for FleetUpdateStrategyProvisioningState. + * Resource has been created. */ public static final FleetUpdateStrategyProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for FleetUpdateStrategyProvisioningState. + * Resource creation failed. */ public static final FleetUpdateStrategyProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for FleetUpdateStrategyProvisioningState. + * Resource creation was canceled. */ public static final FleetUpdateStrategyProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java index 69a517775512..3645623ca5b8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Fleets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -13,96 +13,96 @@ */ public interface Fleets { /** - * Lists fleets in the specified subscription. + * Gets a Fleet. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + * @return a Fleet along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context); /** - * Lists fleets in the specified subscription. + * Gets a Fleet. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. + * @return a Fleet. */ - PagedIterable list(Context context); + Fleet getByResourceGroup(String resourceGroupName, String fleetName); /** - * Lists fleets in the specified subscription and resource group. + * Delete a Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void delete(String resourceGroupName, String fleetName); /** - * Lists fleets in the specified subscription and resource group. + * Delete a Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String fleetName, String ifMatch, Context context); /** - * Gets a Fleet. + * Lists fleets in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Fleet along with {@link Response}. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets a Fleet. + * Lists fleets in the specified subscription and resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Fleet. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - Fleet getByResourceGroup(String resourceGroupName, String fleetName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Delete a Fleet. + * Lists fleets in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName); + PagedIterable list(); /** - * Delete a Fleet. + * Lists fleets in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String fleetName, String ifMatch, Context context); + PagedIterable list(Context context); /** * Lists the user credentials of a Fleet. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java index b3d8a5fce38c..e80e385c018a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java index 32fbd75f93c6..d2d4aa69dcd5 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeSpec.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java index 0292f8bfa867..6e389d52ed8f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedClusterUpgradeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,17 +12,20 @@ */ public final class ManagedClusterUpgradeType extends ExpandableStringEnum { /** - * Static value Full for ManagedClusterUpgradeType. + * Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the + * ManagedClusterUpgradeSpec.KubernetesVersion property to be set. */ public static final ManagedClusterUpgradeType FULL = fromString("Full"); /** - * Static value NodeImageOnly for ManagedClusterUpgradeType. + * NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the + * ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set. */ public static final ManagedClusterUpgradeType NODE_IMAGE_ONLY = fromString("NodeImageOnly"); /** - * Static value ControlPlaneOnly for ManagedClusterUpgradeType. + * ControlPlaneOnly upgrades only targets the KubernetesVersion of the ManagedClusters and will not be applied to + * the AgentPool. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set. */ public static final ManagedClusterUpgradeType CONTROL_PLANE_ONLY = fromString("ControlPlaneOnly"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java index bcf61a13dd3b..073121bf80d0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,7 +12,6 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -23,24 +22,21 @@ public final class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -56,7 +52,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -66,13 +62,12 @@ public UUID principalId() { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -81,8 +76,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -93,10 +87,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -105,10 +96,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -170,11 +158,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java index eed500ad0f56..dbf57056f1ff 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,24 +12,24 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + public static final ManagedServiceIdentityType SYSTEM_AND_USER_ASSIGNED = fromString("SystemAssigned, UserAssigned"); /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java index 72ec116e2d26..173e0e9d8c88 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/MemberUpdateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -44,7 +44,7 @@ public final class MemberUpdateStatus implements JsonSerializable { /** - * Static value Latest for NodeImageSelectionType. + * Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., + * 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, + * the latest available version is different in different regions. */ public static final NodeImageSelectionType LATEST = fromString("Latest"); /** - * Static value Consistent for NodeImageSelectionType. + * The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters + * affected by the update run, the system selects the latest image version such that it is available across all + * other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image + * type will be upgraded to the same image version. For example, if the latest image version for image type + * 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in + * region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system + * will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. */ public static final NodeImageSelectionType CONSISTENT = fromString("Consistent"); /** - * Static value Custom for NodeImageSelectionType. + * Upgrade the nodes to the custom image versions. When set, update run will use node image versions provided in + * customNodeImageVersions to upgrade the nodes. If set, customNodeImageVersions must not be empty. */ public static final NodeImageSelectionType CUSTOM = fromString("Custom"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java index dab1b431f04b..f9d23e9eb515 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/NodeImageVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java index 7ec0fad04342..74ec88ad7a2b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java index 3798850293d4..a8c766b55f4f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for and operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java index 47d6c481ab64..236bc3be0dbb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java index bf5764713ccb..9522e89bcc1f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/SkipTarget.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java index 64cfc7cabed4..570bb816e81f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/TargetType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,22 +12,22 @@ */ public final class TargetType extends ExpandableStringEnum { /** - * Static value Member for TargetType. + * Skip the update of a member. */ public static final TargetType MEMBER = fromString("Member"); /** - * Static value Group for TargetType. + * Skip the update of a group. */ public static final TargetType GROUP = fromString("Group"); /** - * Static value Stage for TargetType. + * Skip the update of an entire stage including the after stage wait. */ public static final TargetType STAGE = fromString("Stage"); /** - * Static value AfterStageWait for TargetType. + * Skip the update of the after stage wait of a certain stage. */ public static final TargetType AFTER_STAGE_WAIT = fromString("AfterStageWait"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java index 42c693388a10..b98b8db11c63 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroup.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java index a76c6920123a..619fdacd1506 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateGroupStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -35,7 +35,7 @@ public final class UpdateGroupStatus implements JsonSerializable { /** - * Static value Succeeded for UpdateRunProvisioningState. + * Resource has been created. */ public static final UpdateRunProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for UpdateRunProvisioningState. + * Resource creation failed. */ public static final UpdateRunProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for UpdateRunProvisioningState. + * Resource creation was canceled. */ public static final UpdateRunProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java index b25b779385b4..24a6227e3a48 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -36,7 +36,7 @@ public final class UpdateRunStatus implements JsonSerializable /** * Creates an instance of UpdateRunStatus class. */ - public UpdateRunStatus() { + private UpdateRunStatus() { } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java index 8c4a7aeaae17..55801916cd75 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRunStrategy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java index 67fdcc470b05..0c1d21b1c5f1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateRuns.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,31 +12,6 @@ * Resource collection API of UpdateRuns. */ public interface UpdateRuns { - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByFleet(String resourceGroupName, String fleetName); - - /** - * List UpdateRun resources by Fleet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param fleetName The name of the Fleet resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); - /** * Get a UpdateRun. * @@ -92,35 +67,29 @@ Response getWithResponse(String resourceGroupName, String fleetName, void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. */ - UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); + PagedIterable listByFleet(String resourceGroupName, String fleetName); /** - * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * List UpdateRun resources by Fleet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fleetName The name of the Fleet resource. - * @param updateRunName The name of the UpdateRun resource. - * @param body The content of the action request. - * @param ifMatch The request should only proceed if an entity matches this string. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}. */ - UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, - String ifMatch, Context context); + PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context); /** * Starts an UpdateRun. @@ -131,7 +100,7 @@ UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ UpdateRun start(String resourceGroupName, String fleetName, String updateRunName); @@ -146,7 +115,7 @@ UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ UpdateRun start(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); @@ -159,7 +128,7 @@ UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName); @@ -174,10 +143,41 @@ UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a multi-stage process to perform update operations across members of a Fleet. + * @return the response. */ UpdateRun stop(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context); + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body); + + /** + * Skips one or a combination of member/group/stage/afterStageWait(s) of an update run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fleetName The name of the Fleet resource. + * @param updateRunName The name of the UpdateRun resource. + * @param body The content of the action request. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + UpdateRun skip(String resourceGroupName, String fleetName, String updateRunName, SkipProperties body, + String ifMatch, Context context); + /** * Get a UpdateRun. * diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java index 6c409569414e..d4f25fd5960e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java index 64727b4688c3..3369d7551ae9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStageStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -40,7 +40,7 @@ public final class UpdateStageStatus implements JsonSerializable { /** - * Static value NotStarted for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has not been started. */ public static final UpdateState NOT_STARTED = fromString("NotStarted"); /** - * Static value Running for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is running. */ public static final UpdateState RUNNING = fromString("Running"); /** - * Static value Stopping for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that is being stopped. */ public static final UpdateState STOPPING = fromString("Stopping"); /** - * Static value Stopped for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has stopped. */ public static final UpdateState STOPPED = fromString("Stopped"); /** - * Static value Skipped for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has been skipped. */ public static final UpdateState SKIPPED = fromString("Skipped"); /** - * Static value Failed for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has failed. */ public static final UpdateState FAILED = fromString("Failed"); /** - * Static value Completed for UpdateState. + * The state of an UpdateRun/UpdateStage/UpdateGroup/MemberUpdate that has completed. */ public static final UpdateState COMPLETED = fromString("Completed"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java index 7cf18b2d41a0..8e894cb1961d 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpdateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -42,7 +42,7 @@ public final class UpdateStatus implements JsonSerializable { /** * Creates an instance of UpdateStatus class. */ - public UpdateStatus() { + private UpdateStatus() { } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java index 847deb1448b6..93ee4f2baa8b 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UpgradeChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -12,17 +12,21 @@ */ public final class UpgradeChannel extends ExpandableStringEnum { /** - * Static value Stable for UpgradeChannel. + * Upgrades the clusters kubernetes version to the latest supported patch release on minor version N-1, where N is + * the latest supported minor version. + * For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, the + * cluster upgrades to 1.18.6. */ public static final UpgradeChannel STABLE = fromString("Stable"); /** - * Static value Rapid for UpgradeChannel. + * Upgrades the clusters kubernetes version to the latest supported patch release on the latest supported minor + * version. */ public static final UpgradeChannel RAPID = fromString("Rapid"); /** - * Static value NodeImage for UpgradeChannel. + * Upgrade node image version of the clusters. */ public static final UpgradeChannel NODE_IMAGE = fromString("NodeImage"); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java index 9711455cf91c..fb0ba50fe3e8 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -18,14 +17,14 @@ @Immutable public final class UserAssignedIdentity implements JsonSerializable { /* - * The principal ID of the assigned identity. + * The client ID of the assigned identity. */ - private UUID principalId; + private String clientId; /* - * The client ID of the assigned identity. + * The principal ID of the assigned identity. */ - private UUID clientId; + private String principalId; /** * Creates an instance of UserAssignedIdentity class. @@ -34,21 +33,21 @@ public UserAssignedIdentity() { } /** - * Get the principalId property: The principal ID of the assigned identity. + * Get the clientId property: The client ID of the assigned identity. * - * @return the principalId value. + * @return the clientId value. */ - public UUID principalId() { - return this.principalId; + public String clientId() { + return this.clientId; } /** - * Get the clientId property: The client ID of the assigned identity. + * Get the principalId property: The principal ID of the assigned identity. * - * @return the clientId value. + * @return the principalId value. */ - public UUID clientId() { - return this.clientId; + public String principalId() { + return this.principalId; } /** @@ -83,12 +82,10 @@ public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("principalId".equals(fieldName)) { - deserializedUserAssignedIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId = reader.getString(); + } else if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java index 92e19dd56d1f..ae6faba9a054 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/WaitStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.models; @@ -29,7 +29,7 @@ public final class WaitStatus implements JsonSerializable { /** * Creates an instance of WaitStatus class. */ - public WaitStatus() { + private WaitStatus() { } /** diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java index 04475e3b5b05..47f0bbf5499f 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for ContainerServiceFleetManagementClient. - * Azure Kubernetes Fleet Manager Client. + * Package containing the data models for ContainerServiceFleet. + * Azure Kubernetes Fleet Manager api client. */ package com.azure.resourcemanager.containerservicefleet.models; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java index 5c2636bd7855..5baad4c84b39 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for ContainerServiceFleetManagementClient. - * Azure Kubernetes Fleet Manager Client. + * Package containing the classes for ContainerServiceFleet. + * Azure Kubernetes Fleet Manager api client. */ package com.azure.resourcemanager.containerservicefleet; diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java index 6ffb2ea91340..d2efe3ab69a1 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.containerservicefleet { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.containerservicefleet.fluent.models to com.azure.core; opens com.azure.resourcemanager.containerservicefleet.models to com.azure.core; + opens com.azure.resourcemanager.containerservicefleet.implementation.models to com.azure.core; } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/azure-resourcemanager-containerservicefleet.properties b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/azure-resourcemanager-containerservicefleet.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/resources/azure-resourcemanager-containerservicefleet.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java index 3f3342cdb0e9..ac3c2cda5b68 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -11,9 +11,7 @@ */ public final class AutoUpgradeProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_CreateOrUpdate.json */ /** * Sample code: Create an AutoUpgradeProfile. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java index c8ad9a789da8..29b65dfa74d9 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class AutoUpgradeProfilesDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_Delete.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_Delete.json */ /** * Sample code: Delete an AutoUpgradeProfile resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java index 7d758cd36b75..8b6a31791e87 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class AutoUpgradeProfilesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_Get.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_Get.json */ /** * Sample code: Gets an AutoUpgradeProfile resource. diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java index 9e30ff64f5b0..6566957c4499 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class AutoUpgradeProfilesListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/AutoUpgradeProfiles_ListByFleet.json + * x-ms-original-file: 2025-03-01/AutoUpgradeProfiles_ListByFleet.json */ /** * Sample code: Lists the AutoUpgradeProfile resources by fleet. 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 81c4c4f1d389..ecc7560d77fc 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 @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; +import java.util.HashMap; +import java.util.Map; + /** * Samples for FleetMembers Create. */ public final class FleetMembersCreateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Create.json + * x-ms-original-file: 2025-03-01/FleetMembers_Create.json */ /** * Sample code: Creates a FleetMember resource with a long running operation. @@ -25,6 +26,19 @@ public static void createsAFleetMemberResourceWithALongRunningOperation( .withExistingFleet("rg1", "fleet1") .withClusterResourceId( "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster-1") + .withLabels(mapOf("environment", "production")) .create(); } + + // 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/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 d9c03f0a532d..8446cf47833e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetMembersDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Delete.json + * x-ms-original-file: 2025-03-01/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 32516700f61b..b5b5d45befab 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetMembersGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Get.json + * x-ms-original-file: 2025-03-01/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 99cabdf95b48..76e0b706c2da 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetMembersListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_ListByFleet.json + * x-ms-original-file: 2025-03-01/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/FleetMembersUpdateAsyncSamples.java similarity index 71% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateSamples.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersUpdateAsyncSamples.java index 6485f0d800b4..df0d98672c84 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/FleetMembersUpdateAsyncSamples.java @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.resourcemanager.containerservicefleet.models.FleetMember; /** - * Samples for FleetMembers Update. + * Samples for FleetMembers UpdateAsync. */ -public final class FleetMembersUpdateSamples { +public final class FleetMembersUpdateAsyncSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/FleetMembers_Update.json + * x-ms-original-file: 2025-03-01/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 38faa15ee468..a9ba877f2bb0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -14,9 +14,7 @@ */ public final class FleetUpdateStrategiesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/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 8c329ba7335e..31d6d31cc32a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetUpdateStrategiesDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_Delete.json + * x-ms-original-file: 2025-03-01/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 c3eb31b7d2f8..5970cc2274d6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetUpdateStrategiesGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_Get.json + * x-ms-original-file: 2025-03-01/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 aa82afce310c..f23cf887726f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetUpdateStrategiesListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateStrategies_ListByFleet.json + * x-ms-original-file: 2025-03-01/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/FleetsCreateSamples.java similarity index 78% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateSamples.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateSamples.java index ffaf53822859..e60b9d038599 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/FleetsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -10,13 +10,11 @@ import java.util.Map; /** - * Samples for Fleets CreateOrUpdate. + * Samples for Fleets Create. */ -public final class FleetsCreateOrUpdateSamples { +public final class FleetsCreateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/Fleets_CreateOrUpdate.json */ /** * Sample code: Creates a Fleet resource with a long running operation. @@ -29,7 +27,7 @@ public static void createsAFleetResourceWithALongRunningOperation( .define("fleet1") .withRegion("East US") .withExistingResourceGroup("rg1") - .withTags(mapOf("archv2", "", "tier", "production")) + .withTags(mapOf("tier", "production", "archv2", "")) .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 99143766ab0d..9dde47c62a12 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_Delete.json + * x-ms-original-file: 2025-03-01/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 b3e809ae214c..6c58688f7dd5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_Get.json + * x-ms-original-file: 2025-03-01/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 c34531f3ac8f..512cfeeb67e1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListByResourceGroup.json + * x-ms-original-file: 2025-03-01/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 de208e7c26fe..e73b0cc36ae1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetsListCredentialsSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListCredentialsResult.json + * x-ms-original-file: 2025-03-01/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 79488ab6d410..270b65a0b849 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class FleetsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_ListBySub.json + * x-ms-original-file: 2025-03-01/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/FleetsUpdateAsyncSamples.java similarity index 72% rename from sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateSamples.java rename to sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsUpdateAsyncSamples.java index 09d06085f846..dcfa7c0700f0 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/FleetsUpdateAsyncSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,13 +9,11 @@ import java.util.Map; /** - * Samples for Fleets Update. + * Samples for Fleets UpdateAsync. */ -public final class FleetsUpdateSamples { +public final class FleetsUpdateAsyncSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Fleets_PatchTags.json + * x-ms-original-file: 2025-03-01/Fleets_PatchTags.json */ /** * Sample code: Update a Fleet. @@ -27,7 +25,7 @@ public final class FleetsUpdateSamples { Fleet resource = manager.fleets() .getByResourceGroupWithResponse("rg1", "fleet1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("env", "prod", "tier", "secure")).withIfMatch("dfjkwelr7384").apply(); + resource.update().withTags(mapOf("tier", "secure", "env", "prod")).withIfMatch("dfjkwelr7384").apply(); } // Use "Map.of" if available 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 c3ff4837607a..8b3936a3bc4d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/Operations_List.json + * x-ms-original-file: 2025-03-01/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 02f80fea67ca..adb27eff2b5e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -19,9 +19,7 @@ */ public final class UpdateRunsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01/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 e8a937706cf9..cd4b81da7531 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Delete.json + * x-ms-original-file: 2025-03-01/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 c629a525b579..de67e55f539d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsGetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Get.json + * x-ms-original-file: 2025-03-01/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 d676414b7570..58a7872afab6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsListByFleetSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_ListByFleet.json + * x-ms-original-file: 2025-03-01/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/UpdateRunsSkipSamples.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java index 8bcdff94e1c0..a7c48556ffeb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/samples/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsSkipSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -14,9 +14,7 @@ */ public final class UpdateRunsSkipSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Skip.json + * x-ms-original-file: 2025-03-01/UpdateRuns_Skip.json */ /** * Sample code: Skips one or more member/group/stage/afterStageWait(s) of an UpdateRun. 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 0f19cedbf5c5..84b9364dfb94 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsStartSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Start.json + * x-ms-original-file: 2025-03-01/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 fdeaddf3ddff..d018b1edede3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -9,9 +9,7 @@ */ public final class UpdateRunsStopSamples { /* - * x-ms-original-file: - * specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2024-05-02-preview/ - * examples/UpdateRuns_Stop.json + * x-ms-original-file: 2025-03-01/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 index 4fe4c487d4b4..59781030193b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -11,17 +11,17 @@ 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()); + AgentProfile model = BinaryData.fromString("{\"subnetId\":\"fsinzgvfcjrwzoxx\",\"vmSize\":\"felluwfzitonpe\"}") + .toObject(AgentProfile.class); + Assertions.assertEquals("fsinzgvfcjrwzoxx", model.subnetId()); + Assertions.assertEquals("felluwfzitonpe", model.vmSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentProfile model = new AgentProfile().withSubnetId("ot").withVmSize("qgoulznd"); + AgentProfile model = new AgentProfile().withSubnetId("fsinzgvfcjrwzoxx").withVmSize("felluwfzitonpe"); model = BinaryData.fromObject(model).toObject(AgentProfile.class); - Assertions.assertEquals("ot", model.subnetId()); - Assertions.assertEquals("qgoulznd", model.vmSize()); + Assertions.assertEquals("fsinzgvfcjrwzoxx", model.subnetId()); + Assertions.assertEquals("felluwfzitonpe", 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 index 05f1c4d62df9..c4a0364ed013 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -12,22 +12,21 @@ public final class ApiServerAccessProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApiServerAccessProfile model = BinaryData - .fromString( - "{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"yypnddhsgcbacphe\"}") + .fromString("{\"enablePrivateCluster\":false,\"enableVnetIntegration\":true,\"subnetId\":\"jbp\"}") .toObject(ApiServerAccessProfile.class); Assertions.assertEquals(false, model.enablePrivateCluster()); - Assertions.assertEquals(false, model.enableVnetIntegration()); - Assertions.assertEquals("yypnddhsgcbacphe", model.subnetId()); + Assertions.assertEquals(true, model.enableVnetIntegration()); + Assertions.assertEquals("jbp", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApiServerAccessProfile model = new ApiServerAccessProfile().withEnablePrivateCluster(false) - .withEnableVnetIntegration(false) - .withSubnetId("yypnddhsgcbacphe"); + .withEnableVnetIntegration(true) + .withSubnetId("jbp"); model = BinaryData.fromObject(model).toObject(ApiServerAccessProfile.class); Assertions.assertEquals(false, model.enablePrivateCluster()); - Assertions.assertEquals(false, model.enableVnetIntegration()); - Assertions.assertEquals("yypnddhsgcbacphe", model.subnetId()); + Assertions.assertEquals(true, model.enableVnetIntegration()); + Assertions.assertEquals("jbp", model.subnetId()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java index 9d29f2f53ba9..81fe1429b136 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeNodeImageSelectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -13,15 +13,15 @@ public final class AutoUpgradeNodeImageSelectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeNodeImageSelection model - = BinaryData.fromString("{\"type\":\"Consistent\"}").toObject(AutoUpgradeNodeImageSelection.class); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.type()); + = BinaryData.fromString("{\"type\":\"Latest\"}").toObject(AutoUpgradeNodeImageSelection.class); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutoUpgradeNodeImageSelection model - = new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.CONSISTENT); + = new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.LATEST); model = BinaryData.fromObject(model).toObject(AutoUpgradeNodeImageSelection.class); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.type()); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.type()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileInnerTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileInnerTests.java index 57e56774a98c..7bf00e31ff8a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileInnerTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -15,24 +15,24 @@ public final class AutoUpgradeProfileInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeProfileInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"uizga\",\"channel\":\"NodeImage\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":false},\"eTag\":\"ckyfih\",\"id\":\"idf\",\"name\":\"zwdzuh\",\"type\":\"ymwisdkft\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"eaxib\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":false},\"eTag\":\"walm\",\"id\":\"yoxa\",\"name\":\"pdkzjancuxr\",\"type\":\"d\"}") .toObject(AutoUpgradeProfileInner.class); - Assertions.assertEquals("uizga", model.updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.NODE_IMAGE, model.channel()); + Assertions.assertEquals("eaxib", model.updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, model.channel()); Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.nodeImageSelection().type()); Assertions.assertEquals(false, model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoUpgradeProfileInner model = new AutoUpgradeProfileInner().withUpdateStrategyId("uizga") - .withChannel(UpgradeChannel.NODE_IMAGE) + AutoUpgradeProfileInner model = new AutoUpgradeProfileInner().withUpdateStrategyId("eaxib") + .withChannel(UpgradeChannel.RAPID) .withNodeImageSelection( new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.LATEST)) .withDisabled(false); model = BinaryData.fromObject(model).toObject(AutoUpgradeProfileInner.class); - Assertions.assertEquals("uizga", model.updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.NODE_IMAGE, model.channel()); + Assertions.assertEquals("eaxib", model.updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, model.channel()); Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.nodeImageSelection().type()); Assertions.assertEquals(false, model.disabled()); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileListResultTests.java index 8336e4a8a59f..ce91a6024f37 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileListResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfileListResultTests.java @@ -1,56 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.AutoUpgradeProfileInner; -import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelection; +import com.azure.resourcemanager.containerservicefleet.implementation.models.AutoUpgradeProfileListResult; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType; -import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeProfileListResult; import com.azure.resourcemanager.containerservicefleet.models.UpgradeChannel; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class AutoUpgradeProfileListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeProfileListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"bhtqqrolfpfpsa\",\"channel\":\"Stable\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":true},\"eTag\":\"gjyjgzjaoyfhrtxi\",\"id\":\"erkujys\",\"name\":\"l\",\"type\":\"juvf\"},{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"yxwjkcp\",\"channel\":\"NodeImage\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":false},\"eTag\":\"jvtbvpyss\",\"id\":\"nruj\",\"name\":\"guhmuouqfpr\",\"type\":\"zw\"}],\"nextLink\":\"g\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"x\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":true},\"eTag\":\"fzab\",\"id\":\"cuh\",\"name\":\"wtctyqi\",\"type\":\"lbbovplw\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"yuguosvmkfssx\",\"channel\":\"Stable\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":true},\"eTag\":\"gmgsxnkjzkde\",\"id\":\"pvlopwiyighxpkd\",\"name\":\"zb\",\"type\":\"iuebbaumny\"},{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"eojnabc\",\"channel\":\"NodeImage\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":true},\"eTag\":\"siebtfhvpesapskr\",\"id\":\"mhjjdhtldwkyzx\",\"name\":\"utknc\",\"type\":\"scwsv\"}],\"nextLink\":\"otogtwrupqs\"}") .toObject(AutoUpgradeProfileListResult.class); - Assertions.assertEquals("bhtqqrolfpfpsa", model.value().get(0).updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.STABLE, model.value().get(0).channel()); + Assertions.assertEquals("x", model.value().get(0).updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, model.value().get(0).channel()); Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.value().get(0).nodeImageSelection().type()); Assertions.assertEquals(true, model.value().get(0).disabled()); - Assertions.assertEquals("g", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoUpgradeProfileListResult model - = new AutoUpgradeProfileListResult() - .withValue( - Arrays - .asList( - new AutoUpgradeProfileInner().withUpdateStrategyId("bhtqqrolfpfpsa") - .withChannel(UpgradeChannel.STABLE) - .withNodeImageSelection(new AutoUpgradeNodeImageSelection() - .withType(AutoUpgradeNodeImageSelectionType.LATEST)) - .withDisabled(true), - new AutoUpgradeProfileInner().withUpdateStrategyId("yxwjkcp") - .withChannel(UpgradeChannel.NODE_IMAGE) - .withNodeImageSelection(new AutoUpgradeNodeImageSelection() - .withType(AutoUpgradeNodeImageSelectionType.LATEST)) - .withDisabled(false))) - .withNextLink("g"); - model = BinaryData.fromObject(model).toObject(AutoUpgradeProfileListResult.class); - Assertions.assertEquals("bhtqqrolfpfpsa", model.value().get(0).updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.STABLE, model.value().get(0).channel()); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, - model.value().get(0).nodeImageSelection().type()); - Assertions.assertEquals(true, model.value().get(0).disabled()); - Assertions.assertEquals("g", model.nextLink()); + Assertions.assertEquals("otogtwrupqs", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilePropertiesTests.java index 4dd1db6234b1..26435530e3d0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilePropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -15,25 +15,25 @@ public final class AutoUpgradeProfilePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeProfileProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"nteiwaopv\",\"channel\":\"Stable\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false}") + "{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"xbniwdjs\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":false}") .toObject(AutoUpgradeProfileProperties.class); - Assertions.assertEquals("nteiwaopv", model.updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.STABLE, model.channel()); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.nodeImageSelection().type()); + Assertions.assertEquals("xbniwdjs", model.updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, model.channel()); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.nodeImageSelection().type()); Assertions.assertEquals(false, model.disabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoUpgradeProfileProperties model = new AutoUpgradeProfileProperties().withUpdateStrategyId("nteiwaopv") - .withChannel(UpgradeChannel.STABLE) + AutoUpgradeProfileProperties model = new AutoUpgradeProfileProperties().withUpdateStrategyId("xbniwdjs") + .withChannel(UpgradeChannel.RAPID) .withNodeImageSelection( - new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.CONSISTENT)) + new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.LATEST)) .withDisabled(false); model = BinaryData.fromObject(model).toObject(AutoUpgradeProfileProperties.class); - Assertions.assertEquals("nteiwaopv", model.updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.STABLE, model.channel()); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, model.nodeImageSelection().type()); + Assertions.assertEquals("xbniwdjs", model.updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, model.channel()); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, model.nodeImageSelection().type()); Assertions.assertEquals(false, model.disabled()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateMockTests.java index 5bd4057f89f2..d2c1675f9e8e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelection; @@ -24,28 +24,28 @@ public final class AutoUpgradeProfilesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"oqmcbxvwvxyslq\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false},\"eTag\":\"lyt\",\"id\":\"lmpewwwfbkr\",\"name\":\"rn\",\"type\":\"vshqjohxcr\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"zuempsbzkf\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false},\"eTag\":\"qi\",\"id\":\"invkjjxdxrbuu\",\"name\":\"zclewyhmlw\",\"type\":\"aztz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AutoUpgradeProfile response = manager.autoUpgradeProfiles() - .define("izpost") - .withExistingFleet("rhhuaopppcqeqx", "lzdahzxctobgbkdm") - .withUpdateStrategyId("bunrmfqjhhk") + .define("tdooaoj") + .withExistingFleet("tramxjez", "lwnwxuqlcvydyp") + .withUpdateStrategyId("kooebwnu") .withChannel(UpgradeChannel.STABLE) .withNodeImageSelection( new AutoUpgradeNodeImageSelection().withType(AutoUpgradeNodeImageSelectionType.CONSISTENT)) .withDisabled(true) - .withIfMatch("dxxiv") - .withIfNoneMatch("tvtc") + .withIfMatch("gaowpulpqblylsyx") + .withIfNoneMatch("qjnsjervtia") .create(); - Assertions.assertEquals("oqmcbxvwvxyslq", response.updateStrategyId()); + Assertions.assertEquals("zuempsbzkf", response.updateStrategyId()); Assertions.assertEquals(UpgradeChannel.RAPID, response.channel()); Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, response.nodeImageSelection().type()); Assertions.assertEquals(false, response.disabled()); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetWithResponseMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetWithResponseMockTests.java index 7b185954399a..762880189175 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetWithResponseMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType; @@ -23,22 +23,22 @@ public final class AutoUpgradeProfilesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"ylgqgitxmedjvcsl\",\"channel\":\"NodeImage\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false},\"eTag\":\"wzz\",\"id\":\"gktrmgucnapkte\",\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"wqm\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Latest\"},\"disabled\":false},\"eTag\":\"njijpxacqqudf\",\"id\":\"yxbaaabjyvayf\",\"name\":\"imrzrtuzqog\",\"type\":\"exn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AutoUpgradeProfile response = manager.autoUpgradeProfiles() - .getWithResponse("hnrztfol", "bnxknalaulppg", "dtpnapnyiropuhp", com.azure.core.util.Context.NONE) + .getWithResponse("yxxrwlycoduh", "kxkgymareqna", "xqugjhkycubedd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ylgqgitxmedjvcsl", response.updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.NODE_IMAGE, response.channel()); - Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, response.nodeImageSelection().type()); + Assertions.assertEquals("wqm", response.updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.RAPID, response.channel()); + Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.LATEST, response.nodeImageSelection().type()); Assertions.assertEquals(false, response.disabled()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetMockTests.java index 1cf57c827517..7c903c45a0e0 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/AutoUpgradeProfilesListByFleetMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.AutoUpgradeNodeImageSelectionType; @@ -24,20 +24,20 @@ public final class AutoUpgradeProfilesListByFleetMockTests { @Test public void testListByFleet() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"updateStrategyId\":\"v\",\"channel\":\"Rapid\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false},\"eTag\":\"bxwyjsflhhcaa\",\"id\":\"jixisxyawjoyaqcs\",\"name\":\"yjpkiidzyexz\",\"type\":\"eli\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"ytdw\",\"channel\":\"NodeImage\",\"nodeImageSelection\":{\"type\":\"Consistent\"},\"disabled\":false},\"eTag\":\"paxh\",\"id\":\"iilivpdtiirqtd\",\"name\":\"oaxoruzfgsqu\",\"type\":\"fxrxxle\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.autoUpgradeProfiles().listByFleet("bsjyofdx", "uusdttouwa", com.azure.core.util.Context.NONE); + PagedIterable response = manager.autoUpgradeProfiles() + .listByFleet("vfdnwnwmewzsyyce", "zsoibjudpfrxtr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("v", response.iterator().next().updateStrategyId()); - Assertions.assertEquals(UpgradeChannel.RAPID, response.iterator().next().channel()); + Assertions.assertEquals("ytdw", response.iterator().next().updateStrategyId()); + Assertions.assertEquals(UpgradeChannel.NODE_IMAGE, response.iterator().next().channel()); Assertions.assertEquals(AutoUpgradeNodeImageSelectionType.CONSISTENT, response.iterator().next().nodeImageSelection().type()); Assertions.assertEquals(false, response.iterator().next().disabled()); diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java index 3417e4901935..bd2563f253b7 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -10,13 +10,6 @@ public final class FleetCredentialResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FleetCredentialResult model - = BinaryData.fromString("{\"name\":\"idnsezcxtb\"}").toObject(FleetCredentialResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetCredentialResult model = new FleetCredentialResult(); - model = BinaryData.fromObject(model).toObject(FleetCredentialResult.class); + FleetCredentialResult model = BinaryData.fromString("{\"name\":\"o\"}").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 index 16b333af684d..4a3f0896ae09 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetCredentialResultsInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -10,13 +10,8 @@ public final class FleetCredentialResultsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FleetCredentialResultsInner model = BinaryData.fromString("{\"kubeconfigs\":[{\"name\":\"ufufsrp\"}]}") + FleetCredentialResultsInner model = BinaryData + .fromString("{\"kubeconfigs\":[{\"name\":\"dmgloug\"},{\"name\":\"wtmutduq\"},{\"name\":\"pspwgcuertu\"}]}") .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 index da2bb8b04724..5b3b97c8e6e2 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetHubProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -14,29 +14,29 @@ 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\"}") + "{\"dnsPrefix\":\"lsuuvmkjozkrwfnd\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":true,\"subnetId\":\"w\"},\"agentProfile\":{\"subnetId\":\"pvwryoqpsoacc\",\"vmSize\":\"zakljlahbc\"},\"fqdn\":\"ffdfdosygexpa\",\"kubernetesVersion\":\"akhmsbzjhcrz\",\"portalFqdn\":\"dphlxaolt\"}") .toObject(FleetHubProfile.class); - Assertions.assertEquals("nhutjeltmrldhugj", model.dnsPrefix()); + Assertions.assertEquals("lsuuvmkjozkrwfnd", 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()); + Assertions.assertEquals("w", model.apiServerAccessProfile().subnetId()); + Assertions.assertEquals("pvwryoqpsoacc", model.agentProfile().subnetId()); + Assertions.assertEquals("zakljlahbc", model.agentProfile().vmSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetHubProfile model = new FleetHubProfile().withDnsPrefix("nhutjeltmrldhugj") + FleetHubProfile model = new FleetHubProfile().withDnsPrefix("lsuuvmkjozkrwfnd") .withApiServerAccessProfile(new ApiServerAccessProfile().withEnablePrivateCluster(false) .withEnableVnetIntegration(true) - .withSubnetId("hocdgeab")) - .withAgentProfile(new AgentProfile().withSubnetId("huticndvkao").withVmSize("yiftyhxhuro")); + .withSubnetId("w")) + .withAgentProfile(new AgentProfile().withSubnetId("pvwryoqpsoacc").withVmSize("zakljlahbc")); model = BinaryData.fromObject(model).toObject(FleetHubProfile.class); - Assertions.assertEquals("nhutjeltmrldhugj", model.dnsPrefix()); + Assertions.assertEquals("lsuuvmkjozkrwfnd", 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()); + Assertions.assertEquals("w", model.apiServerAccessProfile().subnetId()); + Assertions.assertEquals("pvwryoqpsoacc", model.agentProfile().subnetId()); + Assertions.assertEquals("zakljlahbc", 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 af07292e89c9..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetInnerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.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\":\"9692346c-65ce-4176-ada3-fc04bdbfd513\",\"tenantId\":\"927043b8-de0a-4154-a6c3-227ad26fc29f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"narxzxtheotus\":{\"principalId\":\"1dfc8253-4500-4726-bc40-556711687ed2\",\"clientId\":\"124bbb31-b14c-4b1e-8a54-9266056d532a\"},\"evcciqihnhun\":{\"principalId\":\"b21d9281-0a40-4f42-94e4-b632b7e03eef\",\"clientId\":\"e4279161-a871-453c-a8e0-20c630c74aa4\"},\"jzrnf\":{\"principalId\":\"74e7f65b-2aa8-4fae-9442-d70c72daaa1d\",\"clientId\":\"5558d8cb-8e56-4a60-8930-09aabcf57398\"},\"gispemvtzfkufubl\":{\"principalId\":\"9abd19e9-d5f3-423e-af71-33776ea7362c\",\"clientId\":\"a40e863a-b1b4-4ce7-9570-960ae9746439\"}}},\"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 d97a06d94372..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetListResultTests.java +++ /dev/null @@ -1,81 +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\":\"9129709b-b1c6-4d07-8aed-9118fbbd221e\",\"tenantId\":\"f900dab4-8d8c-4265-8181-bde62eb3e9c1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mkkvnip\":{\"principalId\":\"8d8d28f4-cb24-4154-910a-e49e8c25945a\",\"clientId\":\"13a0dec1-d80d-4237-b503-5ffc5f429ee2\"}}},\"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 68f15a5b68fd..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberInnerTests.java +++ /dev/null @@ -1,28 +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\":\"bqidtqaj\",\"group\":\"ulpkudjkrl\",\"provisioningState\":\"Updating\"},\"eTag\":\"hfepgzgqex\",\"id\":\"ocxscpaierhhbcs\",\"name\":\"l\",\"type\":\"mmajtjaodx\"}") - .toObject(FleetMemberInner.class); - Assertions.assertEquals("bqidtqaj", model.clusterResourceId()); - Assertions.assertEquals("ulpkudjkrl", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberInner model = new FleetMemberInner().withClusterResourceId("bqidtqaj").withGroup("ulpkudjkrl"); - model = BinaryData.fromObject(model).toObject(FleetMemberInner.class); - Assertions.assertEquals("bqidtqaj", model.clusterResourceId()); - Assertions.assertEquals("ulpkudjkrl", 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 f7dca45617f5..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberListResultTests.java +++ /dev/null @@ -1,35 +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\":\"yc\",\"group\":\"newmdwzjeiachbo\",\"provisioningState\":\"Canceled\"},\"eTag\":\"nrosfqpte\",\"id\":\"zzvypyqrimzinp\",\"name\":\"swjdkirso\",\"type\":\"dqxhcrmnohjtckwh\"},{\"properties\":{\"clusterResourceId\":\"oifiyipjxsqwpgr\",\"group\":\"znorcj\",\"provisioningState\":\"Joining\"},\"eTag\":\"byxqabn\",\"id\":\"cpc\",\"name\":\"shurzafbljjgpbto\",\"type\":\"c\"}],\"nextLink\":\"klj\"}") - .toObject(FleetMemberListResult.class); - Assertions.assertEquals("yc", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("newmdwzjeiachbo", model.value().get(0).group()); - Assertions.assertEquals("klj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberListResult model = new FleetMemberListResult() - .withValue(Arrays.asList(new FleetMemberInner().withClusterResourceId("yc").withGroup("newmdwzjeiachbo"), - new FleetMemberInner().withClusterResourceId("oifiyipjxsqwpgr").withGroup("znorcj"))) - .withNextLink("klj"); - model = BinaryData.fromObject(model).toObject(FleetMemberListResult.class); - Assertions.assertEquals("yc", model.value().get(0).clusterResourceId()); - Assertions.assertEquals("newmdwzjeiachbo", model.value().get(0).group()); - Assertions.assertEquals("klj", 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 7ea88d764138..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.containerservicefleet.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberProperties; -import org.junit.jupiter.api.Assertions; - -public final class FleetMemberPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FleetMemberProperties model = BinaryData.fromString( - "{\"clusterResourceId\":\"bnbdxkqpxokajion\",\"group\":\"mexgstxgcp\",\"provisioningState\":\"Failed\"}") - .toObject(FleetMemberProperties.class); - Assertions.assertEquals("bnbdxkqpxokajion", model.clusterResourceId()); - Assertions.assertEquals("mexgstxgcp", model.group()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FleetMemberProperties model - = new FleetMemberProperties().withClusterResourceId("bnbdxkqpxokajion").withGroup("mexgstxgcp"); - model = BinaryData.fromObject(model).toObject(FleetMemberProperties.class); - Assertions.assertEquals("bnbdxkqpxokajion", model.clusterResourceId()); - Assertions.assertEquals("mexgstxgcp", model.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java index 0b05ebf45e9f..03d9b5ded87a 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdatePropertiesTests.java @@ -1,25 +1,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberUpdateProperties; +import java.util.HashMap; +import java.util.Map; 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\":\"hijco\"}").toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("hijco", model.group()); + FleetMemberUpdateProperties model = BinaryData.fromString( + "{\"group\":\"qxhcrmn\",\"labels\":{\"kwh\":\"t\",\"gr\":\"soifiyipjxsqw\",\"qabnmoc\":\"bznorcjxvsnby\"}}") + .toObject(FleetMemberUpdateProperties.class); + Assertions.assertEquals("qxhcrmn", model.group()); + Assertions.assertEquals("t", model.labels().get("kwh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("hijco"); + FleetMemberUpdateProperties model = new FleetMemberUpdateProperties().withGroup("qxhcrmn") + .withLabels(mapOf("kwh", "t", "gr", "soifiyipjxsqw", "qabnmoc", "bznorcjxvsnby")); model = BinaryData.fromObject(model).toObject(FleetMemberUpdateProperties.class); - Assertions.assertEquals("hijco", model.group()); + Assertions.assertEquals("qxhcrmn", model.group()); + Assertions.assertEquals("t", model.labels().get("kwh")); + } + + // 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/FleetMemberUpdateTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java index fb6d726d533d..215df45e68cb 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMemberUpdateTests.java @@ -1,25 +1,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate; +import java.util.HashMap; +import java.util.Map; 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\":\"ajrmvdjwzrlovmc\"}}") + FleetMemberUpdate model = BinaryData.fromString( + "{\"properties\":{\"group\":\"fycc\",\"labels\":{\"flnrosfqpteehzz\":\"wmdwzjeiachboo\",\"swjdkirso\":\"ypyqrimzinp\"}}}") .toObject(FleetMemberUpdate.class); - Assertions.assertEquals("ajrmvdjwzrlovmc", model.group()); + Assertions.assertEquals("fycc", model.group()); + Assertions.assertEquals("wmdwzjeiachboo", model.labels().get("flnrosfqpteehzz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FleetMemberUpdate model = new FleetMemberUpdate().withGroup("ajrmvdjwzrlovmc"); + FleetMemberUpdate model = new FleetMemberUpdate().withGroup("fycc") + .withLabels(mapOf("flnrosfqpteehzz", "wmdwzjeiachboo", "swjdkirso", "ypyqrimzinp")); model = BinaryData.fromObject(model).toObject(FleetMemberUpdate.class); - Assertions.assertEquals("ajrmvdjwzrlovmc", model.group()); + Assertions.assertEquals("fycc", model.group()); + Assertions.assertEquals("wmdwzjeiachboo", model.labels().get("flnrosfqpteehzz")); + } + + // 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/FleetMembersCreateMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java deleted file mode 100644 index e08791f43949..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersCreateMockTests.java +++ /dev/null @@ -1,45 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetMembersCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"clusterResourceId\":\"plvwiwubmwmbes\",\"group\":\"nkww\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"flcxoga\",\"id\":\"onz\",\"name\":\"nsikvmkqzeqqkdl\",\"type\":\"fzxmhhvhgureodkw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("od") - .withExistingFleet("iydmcwyhzdxs", "adbzmnvdfznud") - .withClusterResourceId("zbn") - .withGroup("lylpstdb") - .withIfMatch("emwabnet") - .withIfNoneMatch("hhszh") - .create(); - - Assertions.assertEquals("plvwiwubmwmbes", response.clusterResourceId()); - Assertions.assertEquals("nkww", response.group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java index bf81dc23e765..b5a2c51455be 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.fleetMembers() - .delete("bgycduiertgccym", "aolps", "lqlfm", "dnbbglzps", com.azure.core.util.Context.NONE); + manager.fleetMembers().delete("oekqvk", "lns", "vbxwyjsflhh", "aalnjixi", 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 2c7d8d5587e8..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetMembersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"clusterResourceId\":\"hin\",\"group\":\"ygmi\",\"provisioningState\":\"Failed\"},\"eTag\":\"zdnds\",\"id\":\"nayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bnw", "ewgdrjervn", "enq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hin", response.clusterResourceId()); - Assertions.assertEquals("ygmi", 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 907c208b6073..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetMembersListByFleetMockTests.java +++ /dev/null @@ -1,40 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.FleetMember; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetMembersListByFleetMockTests { - @Test - public void testListByFleet() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterResourceId\":\"jbi\",\"group\":\"bpybsrfbjf\",\"provisioningState\":\"Updating\"},\"eTag\":\"sotftpvj\",\"id\":\"exilzznfqqnvwpmq\",\"name\":\"aruoujmkcjhwqyt\",\"type\":\"r\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bfovasrruvwbhsq", "sub", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jbi", response.iterator().next().clusterResourceId()); - Assertions.assertEquals("bpybsrfbjf", response.iterator().next().group()); - } -} diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java index 0602ae00fcd2..c57922203b8c 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -17,22 +17,26 @@ 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\":\"b72393e3-ca16-48ad-98e2-41ffac14035d\",\"tenantId\":\"9114159d-6552-492d-923b-36324e429dbf\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"ddgmb\":{\"principalId\":\"952e663c-b45b-4c31-89dd-6881ea650c5d\",\"clientId\":\"55be8e48-df08-4c0a-9219-c3fcd42a2282\"}}}}") + "{\"tags\":{\"ofx\":\"gispemvtzfkufubl\",\"jbasvmsmjqulngs\":\"eofjaeqjh\",\"bkzgcwrwclx\":\"tnb\",\"vkocrcjdkwtn\":\"wrljdouskc\"},\"identity\":{\"principalId\":\"njbiksqrglssain\",\"tenantId\":\"jwnzlljfmp\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vndhkrwpdapp\":{\"clientId\":\"mgxsab\",\"principalId\":\"qduujitcjczdz\"},\"je\":{\"clientId\":\"bdkvwrwjf\",\"principalId\":\"snhu\"},\"tqxhocdgeab\":{\"clientId\":\"mrldhu\",\"principalId\":\"zzd\"},\"aozwyiftyhxhu\":{\"clientId\":\"phut\",\"principalId\":\"ndv\"}}}}") .toObject(FleetPatch.class); - Assertions.assertEquals("ciqfou", model.tags().get("lmmnkzsmodmglo")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("gispemvtzfkufubl", model.tags().get("ofx")); + Assertions.assertEquals(ManagedServiceIdentityType.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()))); + FleetPatch model + = new FleetPatch() + .withTags(mapOf("ofx", "gispemvtzfkufubl", "jbasvmsmjqulngs", "eofjaeqjh", "bkzgcwrwclx", "tnb", + "vkocrcjdkwtn", "wrljdouskc")) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("vndhkrwpdapp", new UserAssignedIdentity(), "je", + new UserAssignedIdentity(), "tqxhocdgeab", new UserAssignedIdentity(), "aozwyiftyhxhu", + 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()); + Assertions.assertEquals("gispemvtzfkufubl", model.tags().get("ofx")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } // Use "Map.of" if available 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 761d81ecf882..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetPropertiesTests.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.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 index d78e405a53f7..11299eee3eef 100644 --- 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 @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; @@ -25,38 +25,37 @@ public final class FleetUpdateStrategiesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"cofudflvkgjub\",\"groups\":[{\"name\":\"nnqvsa\"},{\"name\":\"nqntorudsgsahm\"},{\"name\":\"yc\"}],\"afterStageWaitInSeconds\":698533794},{\"name\":\"uwjuetaeburuvdmo\",\"groups\":[{\"name\":\"zlxwabmqoefkifr\"}],\"afterStageWaitInSeconds\":1599154818}]}},\"eTag\":\"qujmqlgkf\",\"id\":\"ndo\",\"name\":\"ongbjcnt\",\"type\":\"jitcjedftwwaez\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"oulpjrv\",\"groups\":[{\"name\":\"l\"},{\"name\":\"vimjwos\"},{\"name\":\"tx\"},{\"name\":\"tcs\"}],\"afterStageWaitInSeconds\":1365275067},{\"name\":\"k\",\"groups\":[{\"name\":\"miekkezzikhlyfjh\"},{\"name\":\"gqggebdunygae\"},{\"name\":\"idb\"}],\"afterStageWaitInSeconds\":1233334035}]}},\"eTag\":\"pxllrx\",\"id\":\"jmoadsuv\",\"name\":\"r\",\"type\":\"ywdmjsjqbjh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FleetUpdateStrategy response = manager.fleetUpdateStrategies() - .define("kdlfoa") - .withExistingFleet("ujhemmsbvdkcrodt", "infwjlfltkacjve") + .define("melwuipiccjz") + .withExistingFleet("gxk", "lla") .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( - new UpdateStage().withName("pagao") - .withGroups(Arrays.asList(new UpdateGroup().withName("lpqblylsyxk"), - new UpdateGroup().withName("jnsjervtiagxsd"), new UpdateGroup().withName("zuempsbzkf"), - new UpdateGroup().withName("beyvpnqicvinvkjj"))) - .withAfterStageWaitInSeconds(602936654), - new UpdateStage().withName("rbuukzclewyhmlwp") - .withGroups( - Arrays.asList(new UpdateGroup().withName("zpof"), new UpdateGroup().withName("cckwyfzqwhxxbu"), - new UpdateGroup().withName("qa"), new UpdateGroup().withName("zfeqztppri"))) - .withAfterStageWaitInSeconds(2094175875), - new UpdateStage().withName("or") - .withGroups(Arrays.asList(new UpdateGroup().withName("tolmncwsobqw"))) - .withAfterStageWaitInSeconds(1051180868)))) - .withIfMatch("udutnco") - .withIfNoneMatch("mr") + new UpdateStage().withName("vvcnayr") + .withGroups(Arrays.asList(new UpdateGroup().withName("nxxmueedndrdv"), + new UpdateGroup().withName("tkwqqtchealm"), new UpdateGroup().withName("mtdaa"))) + .withAfterStageWaitInSeconds(2035762000), + new UpdateStage().withName("v") + .withGroups(Arrays.asList(new UpdateGroup().withName("piohgwxrtfu"), + new UpdateGroup().withName("xepxgyqagvrvmn"), new UpdateGroup().withName("k"), + new UpdateGroup().withName("kghimdblxgwimfnj"))) + .withAfterStageWaitInSeconds(44093722), + new UpdateStage().withName("xw") + .withGroups(Arrays.asList(new UpdateGroup().withName("kkfoqr"))) + .withAfterStageWaitInSeconds(1631223460)))) + .withIfMatch("abfatkl") + .withIfNoneMatch("dxbjhwuaanozj") .create(); - Assertions.assertEquals("cofudflvkgjub", response.strategy().stages().get(0).name()); - Assertions.assertEquals("nnqvsa", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(698533794, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("oulpjrv", response.strategy().stages().get(0).name()); + Assertions.assertEquals("l", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1365275067, 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 index 760400adb4fd..4d3c7515175b 100644 --- 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 @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,10 @@ public void testDelete() throws Exception { ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.fleetUpdateStrategies().delete("dy", "atdooaojkniod", "oo", "bw", com.azure.core.util.Context.NONE); + manager.fleetUpdateStrategies() + .delete("bwwift", "hqkvpuvksgplsak", "ynfs", "n", 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 index df2814f6e3cf..216c069078e1 100644 --- 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 @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; @@ -21,21 +21,21 @@ public final class FleetUpdateStrategiesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"zqogse\",\"groups\":[{\"name\":\"vfdnwnwmewzsyyce\"},{\"name\":\"zsoibjudpfrxtr\"},{\"name\":\"hzv\"}],\"afterStageWaitInSeconds\":1946200201},{\"name\":\"dwkqbrq\",\"groups\":[{\"name\":\"axhexiilivp\"}],\"afterStageWaitInSeconds\":1539937555},{\"name\":\"irqtdqoa\",\"groups\":[{\"name\":\"uzf\"}],\"afterStageWaitInSeconds\":1294640448}]}},\"eTag\":\"yfxrx\",\"id\":\"eptra\",\"name\":\"xje\",\"type\":\"wlwnwxuqlcv\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"wcciuqgbdbu\",\"groups\":[{\"name\":\"vfbtkuwh\"},{\"name\":\"mhykojoxafnndl\"},{\"name\":\"ichkoymkcdyhb\"}],\"afterStageWaitInSeconds\":556339960},{\"name\":\"pwdreqnovvqf\",\"groups\":[{\"name\":\"jxywsuws\"},{\"name\":\"rsndsytgadgvra\"}],\"afterStageWaitInSeconds\":350666785}]}},\"eTag\":\"e\",\"id\":\"zar\",\"name\":\"wlquuijfqkace\",\"type\":\"iipfpubj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FleetUpdateStrategy response = manager.fleetUpdateStrategies() - .getWithResponse("cqqudf", "byxbaaabjy", "ayffim", com.azure.core.util.Context.NONE) + .getWithResponse("nqxwbp", "kulpiujwaasi", "qiiobyuqer", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zqogse", response.strategy().stages().get(0).name()); - Assertions.assertEquals("vfdnwnwmewzsyyce", response.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1946200201, response.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("wcciuqgbdbu", response.strategy().stages().get(0).name()); + Assertions.assertEquals("vfbtkuwh", response.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(556339960, 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 index 3b68c14bbbd7..3758e779fc0c 100644 --- 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 @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.FleetUpdateStrategy; @@ -22,22 +22,22 @@ public final class FleetUpdateStrategiesListByFleetMockTests { @Test public void testListByFleet() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"r\",\"groups\":[{\"name\":\"dmjsjqb\"},{\"name\":\"hhyxxrw\"},{\"name\":\"yc\"},{\"name\":\"duhpk\"}],\"afterStageWaitInSeconds\":1440361385}]}},\"eTag\":\"mareqnajxqugj\",\"id\":\"ycubeddgs\",\"name\":\"ofwq\",\"type\":\"zqalkrmnjijpx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"rpzbchckqqzqi\",\"groups\":[{\"name\":\"ysuiizynkedya\"},{\"name\":\"rwyhqmibzyhwitsm\"}],\"afterStageWaitInSeconds\":1679951474},{\"name\":\"ynpcdpumnzgmwznm\",\"groups\":[{\"name\":\"knso\"},{\"name\":\"gj\"},{\"name\":\"xbldtlwwrlkdmtn\"}],\"afterStageWaitInSeconds\":333571047}]}},\"eTag\":\"otllxdyhgsyo\",\"id\":\"gjltdtbnnhado\",\"name\":\"crkvcikhnv\",\"type\":\"amqgxqquezikyw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.fleetUpdateStrategies().listByFleet("db", "fatpxllrxcyjmoa", com.azure.core.util.Context.NONE); + PagedIterable response = manager.fleetUpdateStrategies() + .listByFleet("jphuopxodlqi", "ntorzihleosjswsr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("r", response.iterator().next().strategy().stages().get(0).name()); - Assertions.assertEquals("dmjsjqb", + Assertions.assertEquals("rpzbchckqqzqi", response.iterator().next().strategy().stages().get(0).name()); + Assertions.assertEquals("ysuiizynkedya", response.iterator().next().strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1440361385, + Assertions.assertEquals(1679951474, 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 index bf2a70be20f0..3d4f1c62c081 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -16,38 +16,27 @@ public final class FleetUpdateStrategyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetUpdateStrategyInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"v\",\"groups\":[{\"name\":\"sonpclhocohs\"},{\"name\":\"kevle\"},{\"name\":\"gz\"}],\"afterStageWaitInSeconds\":106316394},{\"name\":\"hfmvfaxkffe\",\"groups\":[{\"name\":\"hl\"}],\"afterStageWaitInSeconds\":504857780},{\"name\":\"zy\",\"groups\":[{\"name\":\"xmzsbbzogg\"},{\"name\":\"grxwbu\"},{\"name\":\"vjxxjnsp\"},{\"name\":\"dptkoenkouk\"}],\"afterStageWaitInSeconds\":73605186},{\"name\":\"dwtiukbldngkp\",\"groups\":[{\"name\":\"pazyxoegukg\"},{\"name\":\"npiucgygevqznty\"},{\"name\":\"mrbpizcdrqj\"},{\"name\":\"dpydn\"}],\"afterStageWaitInSeconds\":1880549577}]}},\"eTag\":\"de\",\"id\":\"jzicwifsjt\",\"name\":\"gzfbishcbk\",\"type\":\"ajdeyeamdphaga\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"strategy\":{\"stages\":[{\"name\":\"nmmqhgyxzkon\",\"groups\":[{\"name\":\"koklya\"}],\"afterStageWaitInSeconds\":1609170177},{\"name\":\"onuq\",\"groups\":[{\"name\":\"kbeype\"},{\"name\":\"rmjmwvvjektc\"}],\"afterStageWaitInSeconds\":1803945661}]}},\"eTag\":\"hwlrsf\",\"id\":\"zpwv\",\"name\":\"qdqgbi\",\"type\":\"ylihkaetckt\"}") .toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("v", model.strategy().stages().get(0).name()); - Assertions.assertEquals("sonpclhocohs", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(106316394, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("nmmqhgyxzkon", model.strategy().stages().get(0).name()); + Assertions.assertEquals("koklya", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1609170177, 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("v") - .withGroups(Arrays.asList(new UpdateGroup().withName("sonpclhocohs"), - new UpdateGroup().withName("kevle"), new UpdateGroup().withName("gz"))) - .withAfterStageWaitInSeconds(106316394), - new UpdateStage().withName("hfmvfaxkffe") - .withGroups(Arrays.asList(new UpdateGroup().withName("hl"))) - .withAfterStageWaitInSeconds(504857780), - new UpdateStage().withName("zy") - .withGroups(Arrays.asList(new UpdateGroup().withName("xmzsbbzogg"), - new UpdateGroup().withName("grxwbu"), new UpdateGroup().withName("vjxxjnsp"), - new UpdateGroup().withName("dptkoenkouk"))) - .withAfterStageWaitInSeconds(73605186), - new UpdateStage().withName("dwtiukbldngkp") - .withGroups(Arrays.asList(new UpdateGroup().withName("pazyxoegukg"), - new UpdateGroup().withName("npiucgygevqznty"), new UpdateGroup().withName("mrbpizcdrqj"), - new UpdateGroup().withName("dpydn"))) - .withAfterStageWaitInSeconds(1880549577)))); + = new FleetUpdateStrategyInner().withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("nmmqhgyxzkon") + .withGroups(Arrays.asList(new UpdateGroup().withName("koklya"))) + .withAfterStageWaitInSeconds(1609170177), + new UpdateStage().withName("onuq") + .withGroups( + Arrays.asList(new UpdateGroup().withName("kbeype"), new UpdateGroup().withName("rmjmwvvjektc"))) + .withAfterStageWaitInSeconds(1803945661)))); model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyInner.class); - Assertions.assertEquals("v", model.strategy().stages().get(0).name()); - Assertions.assertEquals("sonpclhocohs", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(106316394, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("nmmqhgyxzkon", model.strategy().stages().get(0).name()); + Assertions.assertEquals("koklya", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(1609170177, 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 index b7dfc478cb86..38f4385de169 100644 --- 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 @@ -1,38 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.containerservicefleet.implementation.models.FleetUpdateStrategyListResult; 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\":\"fqrvkdvjsllrmvvd\"}]}},\"eTag\":\"atkpnp\",\"id\":\"exxbczwtr\",\"name\":\"wiqzbqjvsovmyo\",\"type\":\"acspkwl\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"pxjmflbvvnchr\"},{\"name\":\"cciw\"}]}},\"eTag\":\"juqk\",\"id\":\"sa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}],\"nextLink\":\"gidyjrrf\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"ebfqkkrbm\"},{\"name\":\"ukgri\"},{\"name\":\"flz\"},{\"name\":\"fbxzpuzycisp\"}]}},\"eTag\":\"zahmgkbrpyydhibn\",\"id\":\"qkpikadrgvtqagnb\",\"name\":\"ynhijggme\",\"type\":\"fsiarbutr\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"zzmhjrunmpxttd\"},{\"name\":\"hrbnlankxmyskpbh\"},{\"name\":\"nbtkcxywnytnr\"},{\"name\":\"yn\"}]}},\"eTag\":\"idybyxczf\",\"id\":\"haaxdbabphl\",\"name\":\"rqlfktsthsucocmn\",\"type\":\"yazttbtwwrqpue\"}],\"nextLink\":\"kzywbiex\"}") .toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("fqrvkdvjsllrmvvd", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("gidyjrrf", 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("fqrvkdvjsllrmvvd")))), - new FleetUpdateStrategyInner().withStrategy(new UpdateRunStrategy().withStages( - Arrays.asList(new UpdateStage().withName("pxjmflbvvnchr"), new UpdateStage().withName("cciw")))))) - .withNextLink("gidyjrrf"); - model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyListResult.class); - Assertions.assertEquals("fqrvkdvjsllrmvvd", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals("gidyjrrf", model.nextLink()); + Assertions.assertEquals("ebfqkkrbm", model.value().get(0).strategy().stages().get(0).name()); + Assertions.assertEquals("kzywbiex", 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 index 026ce2fef211..e1090044bb7e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -16,33 +16,30 @@ public final class FleetUpdateStrategyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FleetUpdateStrategyProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"strategy\":{\"stages\":[{\"name\":\"xw\",\"groups\":[{\"name\":\"whonowk\"},{\"name\":\"shwankixzbinje\"},{\"name\":\"uttmrywnuzoqft\"}],\"afterStageWaitInSeconds\":1348586485},{\"name\":\"zrnkcqvyxlwh\",\"groups\":[{\"name\":\"icohoqqnwvl\"},{\"name\":\"yav\"},{\"name\":\"hheunmmqhgyx\"},{\"name\":\"konocu\"}],\"afterStageWaitInSeconds\":470359400},{\"name\":\"lyaxuc\",\"groups\":[{\"name\":\"qszf\"},{\"name\":\"beypewrmjmw\"}],\"afterStageWaitInSeconds\":341479391}]}}") + "{\"provisioningState\":\"Canceled\",\"strategy\":{\"stages\":[{\"name\":\"vf\",\"groups\":[{\"name\":\"ymuctqhjfbebrj\"},{\"name\":\"xerf\"},{\"name\":\"wutttxfvjrbi\"},{\"name\":\"phxepcyvahf\"}],\"afterStageWaitInSeconds\":573812586},{\"name\":\"kyqxjvuujqgidokg\",\"groups\":[{\"name\":\"yoxgvcltbgsnc\"},{\"name\":\"hkjeszzhbi\"},{\"name\":\"htxfvgxbfsmxnehm\"}],\"afterStageWaitInSeconds\":288392251}]}}") .toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("xw", model.strategy().stages().get(0).name()); - Assertions.assertEquals("whonowk", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1348586485, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("vf", model.strategy().stages().get(0).name()); + Assertions.assertEquals("ymuctqhjfbebrj", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(573812586, 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("xw") - .withGroups(Arrays.asList(new UpdateGroup().withName("whonowk"), - new UpdateGroup().withName("shwankixzbinje"), new UpdateGroup().withName("uttmrywnuzoqft"))) - .withAfterStageWaitInSeconds(1348586485), - new UpdateStage().withName("zrnkcqvyxlwh") - .withGroups( - Arrays.asList(new UpdateGroup().withName("icohoqqnwvl"), new UpdateGroup().withName("yav"), - new UpdateGroup().withName("hheunmmqhgyx"), new UpdateGroup().withName("konocu"))) - .withAfterStageWaitInSeconds(470359400), - new UpdateStage().withName("lyaxuc") - .withGroups( - Arrays.asList(new UpdateGroup().withName("qszf"), new UpdateGroup().withName("beypewrmjmw"))) - .withAfterStageWaitInSeconds(341479391)))); + = new FleetUpdateStrategyProperties() + .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("vf") + .withGroups(Arrays.asList(new UpdateGroup().withName("ymuctqhjfbebrj"), + new UpdateGroup().withName("xerf"), new UpdateGroup().withName("wutttxfvjrbi"), + new UpdateGroup().withName("phxepcyvahf"))) + .withAfterStageWaitInSeconds(573812586), + new UpdateStage().withName("kyqxjvuujqgidokg") + .withGroups(Arrays.asList(new UpdateGroup().withName("yoxgvcltbgsnc"), + new UpdateGroup().withName("hkjeszzhbi"), new UpdateGroup().withName("htxfvgxbfsmxnehm"))) + .withAfterStageWaitInSeconds(288392251)))); model = BinaryData.fromObject(model).toObject(FleetUpdateStrategyProperties.class); - Assertions.assertEquals("xw", model.strategy().stages().get(0).name()); - Assertions.assertEquals("whonowk", model.strategy().stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1348586485, model.strategy().stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("vf", model.strategy().stages().get(0).name()); + Assertions.assertEquals("ymuctqhjfbebrj", model.strategy().stages().get(0).groups().get(0).name()); + Assertions.assertEquals(573812586, 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 b7ec7f6482bf..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.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 reactor.core.publisher.Mono; - -public final class FleetsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"khfxobbcswsrt\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"pbewtghfgblcgwx\"},\"agentProfile\":{\"subnetId\":\"v\",\"vmSize\":\"jkbegibtnmxiebww\"},\"fqdn\":\"oayqc\",\"kubernetesVersion\":\"rtzju\",\"portalFqdn\":\"wyzmhtxon\"}},\"eTag\":\"ts\",\"identity\":{\"principalId\":\"65620d2e-ee7e-4495-96b8-eae86e5e34dd\",\"tenantId\":\"913b5639-5f19-45ad-8f1b-055e411c8598\",\"type\":\"None\",\"userAssignedIdentities\":{\"p\":{\"principalId\":\"8c8c964c-88f1-4858-a093-8cd04594ff46\",\"clientId\":\"fe03f9f0-c184-4723-8857-f4b4f39e3b6f\"},\"nftguvriuhpr\":{\"principalId\":\"0bffe560-81b8-4b1b-b785-3468e85107cb\",\"clientId\":\"89710c0a-2153-4106-8c8a-d9e7b6764584\"},\"yvxqtayriwwroy\":{\"principalId\":\"63fcb7cc-004e-4898-84f8-935f5d60187f\",\"clientId\":\"9c4cb0d1-0c2d-412c-8dc9-b7b494f09d7f\"},\"xrmcqibycnojvk\":{\"principalId\":\"900dc570-cabd-4dba-b8d4-e8681b3a80a2\",\"clientId\":\"3109917e-ec88-4f77-b488-6ff8b69a1a75\"}}},\"location\":\"e\",\"tags\":{\"apj\":\"gzva\",\"zlmwlxkvugfhz\":\"zhpvgqzcjrvxd\",\"hnnpr\":\"vawjvzunlu\",\"ultskzbbtdz\":\"xipeilpjzuaejx\"},\"id\":\"mv\",\"name\":\"ekg\",\"type\":\"wozuhkf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("mqkrhahvljuahaqu") - .withRegion("uecivyhz") - .withExistingResourceGroup("eemaofmxagkvtme") - .withTags(mapOf("ytdxwit", "ojgjrwjueiotwmc", "hniskxfbkpyc", "nrjawgqwg")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("wpucwwfvovbv", new UserAssignedIdentity()))) - .withHubProfile(new FleetHubProfile().withDnsPrefix("ualaexqpvfadmw") - .withApiServerAccessProfile(new ApiServerAccessProfile().withEnablePrivateCluster(false) - .withEnableVnetIntegration(false) - .withSubnetId("pv")) - .withAgentProfile(new AgentProfile().withSubnetId("zlfmisgwbnbbeld").withVmSize("k"))) - .withIfMatch("xujznbmpowu") - .withIfNoneMatch("przqlveu") - .create(); - - Assertions.assertEquals("e", response.location()); - Assertions.assertEquals("gzva", response.tags().get("apj")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("khfxobbcswsrt", response.hubProfile().dnsPrefix()); - Assertions.assertEquals(true, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("pbewtghfgblcgwx", response.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("v", response.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("jkbegibtnmxiebww", 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 index 66244363725c..8e1381c25884 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.fleets().delete("qj", "hckfrlhrx", "bkyvp", com.azure.core.util.Context.NONE); + manager.fleets().delete("hdzhlrqj", "hckfrlhrx", "bkyvp", 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 352fc94ee53d..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsGetByResourceGroupWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"hubProfile\":{\"dnsPrefix\":\"aiuebbaumnyqu\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"a\"},\"agentProfile\":{\"subnetId\":\"hsmtxpsiebtfhvp\",\"vmSize\":\"apskrdqm\"},\"fqdn\":\"jdhtldwkyzxu\",\"kubernetesVersion\":\"kn\",\"portalFqdn\":\"scwsv\"}},\"eTag\":\"otogtwrupqs\",\"identity\":{\"principalId\":\"08affe05-dd27-4db1-bb60-ae694628ca0e\",\"tenantId\":\"83bbd9d3-1540-4ca3-b56b-4fd17b33b26d\",\"type\":\"None\",\"userAssignedIdentities\":{\"ceoveilovno\":{\"principalId\":\"98a939e9-2d34-4670-885f-df64540f4386\",\"clientId\":\"65c2f880-a9c7-406b-a888-2efb356ea1ee\"},\"jfcn\":{\"principalId\":\"349ffd98-a59f-41a9-955a-00f6e95ae44b\",\"clientId\":\"85f9b098-1765-41be-bef5-85bfddd0efa1\"},\"cn\":{\"principalId\":\"fa923b07-a814-46fd-a300-d4b027190c10\",\"clientId\":\"67b31335-8c80-4ef9-a530-2c023842e03b\"}}},\"location\":\"hbttkphyw\",\"tags\":{\"mclfplphoxuscr\":\"jtoqne\",\"psbjta\":\"abgy\",\"kqujidsuyono\":\"qugxywpmueefjzwf\",\"tcc\":\"glaocq\"},\"id\":\"g\",\"name\":\"udxytlmoyrx\",\"type\":\"wfudwpzntxhdzhl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("xnkjzkdesl", "vlopwiyighx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hbttkphyw", response.location()); - Assertions.assertEquals("jtoqne", response.tags().get("mclfplphoxuscr")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("aiuebbaumnyqu", response.hubProfile().dnsPrefix()); - Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(false, response.hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("a", response.hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("hsmtxpsiebtfhvp", response.hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("apskrdqm", 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 36d78f575981..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListByResourceGroupMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"hubProfile\":{\"dnsPrefix\":\"skpbhenbtkcxywn\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":false,\"enableVnetIntegration\":false,\"subnetId\":\"lqidyby\"},\"agentProfile\":{\"subnetId\":\"fclhaaxdbabphlwr\",\"vmSize\":\"fkts\"},\"fqdn\":\"sucocmnyyazttbtw\",\"kubernetesVersion\":\"qpuedckzywbiex\",\"portalFqdn\":\"eyueaxibxujwb\"}},\"eTag\":\"walm\",\"identity\":{\"principalId\":\"37faf1a4-cb99-4356-81c9-392decdeaab8\",\"tenantId\":\"dbe4e03a-d261-417f-8bf2-2a16c27f6aca\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"kzjancuxrhdwbav\":{\"principalId\":\"b4755be6-db49-4363-ba40-78618bc6ec63\",\"clientId\":\"2e8c1b73-e97d-4360-beb4-33e138e8a9cc\"},\"iwdjswztsdbpgn\":{\"principalId\":\"03d7355d-73f1-444a-84b8-0a5a856f8395\",\"clientId\":\"8729ac28-401d-4714-bc40-51e77fb051d8\"}}},\"location\":\"txhp\",\"tags\":{\"hxw\":\"zpfzabglc\",\"bbovplwzbhvgyugu\":\"ctyqik\"},\"id\":\"svmkfssxquk\",\"name\":\"fpl\",\"type\":\"mg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ttdbhrbnl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("txhp", response.iterator().next().location()); - Assertions.assertEquals("zpfzabglc", response.iterator().next().tags().get("hxw")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("skpbhenbtkcxywn", response.iterator().next().hubProfile().dnsPrefix()); - Assertions.assertEquals(false, - response.iterator().next().hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(false, - response.iterator().next().hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("lqidyby", response.iterator().next().hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("fclhaaxdbabphlwr", response.iterator().next().hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("fkts", 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 index 1bab5a8629ea..300d926dd109 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListCredentialsWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults; @@ -19,17 +19,17 @@ public final class FleetsListCredentialsWithResponseMockTests { @Test public void testListCredentialsWithResponse() throws Exception { - String responseStr = "{\"kubeconfigs\":[{\"name\":\"nwbmeh\"},{\"name\":\"yvjusrtslhsp\"}]}"; + String responseStr = "{\"kubeconfigs\":[{\"name\":\"ndnhj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FleetCredentialResults response = manager.fleets() - .listCredentialsWithResponse("ca", "uzbpzkafku", com.azure.core.util.Context.NONE) + .listCredentialsWithResponse("qwgxhniskx", "bkpyc", 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 f9b7b44ff469..000000000000 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/FleetsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; -import com.azure.resourcemanager.containerservicefleet.models.Fleet; -import com.azure.resourcemanager.containerservicefleet.models.ManagedServiceIdentityType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FleetsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"hubProfile\":{\"dnsPrefix\":\"cxerf\",\"apiServerAccessProfile\":{\"enablePrivateCluster\":true,\"enableVnetIntegration\":true,\"subnetId\":\"fvjrbirphxepcy\"},\"agentProfile\":{\"subnetId\":\"fnljky\",\"vmSize\":\"j\"},\"fqdn\":\"ujqgidok\",\"kubernetesVersion\":\"ljyoxgvcltb\",\"portalFqdn\":\"ncghkje\"}},\"eTag\":\"zhbijhtxfv\",\"identity\":{\"principalId\":\"cae6bae7-50d1-48b1-8592-ee23d4b8b31f\",\"tenantId\":\"c944707c-41d9-4ebd-abb8-3160ee711cee\",\"type\":\"None\",\"userAssignedIdentities\":{\"hmpvecx\":{\"principalId\":\"c33c162a-79f0-47c0-aeaa-d2b41358ae3d\",\"clientId\":\"1534acd6-d57b-4c58-92f9-7af4a2a3a8d4\"},\"ebfqkkrbm\":{\"principalId\":\"e4085f7c-65aa-4e56-a157-821655ac6da9\",\"clientId\":\"2d5a268e-942d-46a1-8758-c3f06fe4c7a8\"},\"gr\":{\"principalId\":\"7e49b65d-097d-42d9-aac6-9b069a5a8247\",\"clientId\":\"c6848af8-7a32-449b-bed0-8f8500318659\"}}},\"location\":\"flz\",\"tags\":{\"qzahmgkbrp\":\"xzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"},\"id\":\"bfs\",\"name\":\"arbu\",\"type\":\"rcvpnazzmhjrunmp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("flz", response.iterator().next().location()); - Assertions.assertEquals("xzpuzycisp", response.iterator().next().tags().get("qzahmgkbrp")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("cxerf", response.iterator().next().hubProfile().dnsPrefix()); - Assertions.assertEquals(true, - response.iterator().next().hubProfile().apiServerAccessProfile().enablePrivateCluster()); - Assertions.assertEquals(true, - response.iterator().next().hubProfile().apiServerAccessProfile().enableVnetIntegration()); - Assertions.assertEquals("fvjrbirphxepcy", - response.iterator().next().hubProfile().apiServerAccessProfile().subnetId()); - Assertions.assertEquals("fnljky", response.iterator().next().hubProfile().agentProfile().subnetId()); - Assertions.assertEquals("j", 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 index 99e89336c056..124ff4adff06 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -18,23 +18,23 @@ public final class ManagedClusterUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedClusterUpdate model = BinaryData.fromString( - "{\"upgrade\":{\"type\":\"ControlPlaneOnly\",\"kubernetesVersion\":\"enevfyexfwhybci\"},\"nodeImageSelection\":{\"type\":\"Custom\",\"customNodeImageVersions\":[{\"version\":\"sit\"}]}}") + "{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"vdcsitynn\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{\"version\":\"tehfiqscjeypvh\"},{\"version\":\"rkgqhcjrefo\"}]}}") .toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.upgrade().type()); - Assertions.assertEquals("enevfyexfwhybci", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.nodeImageSelection().type()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("vdcsitynn", 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.CONTROL_PLANE_ONLY) - .withKubernetesVersion("enevfyexfwhybci")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CUSTOM) - .withCustomNodeImageVersions(Arrays.asList(new NodeImageVersion()))); + .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) + .withKubernetesVersion("vdcsitynn")) + .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.LATEST) + .withCustomNodeImageVersions(Arrays.asList(new NodeImageVersion(), new NodeImageVersion()))); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdate.class); - Assertions.assertEquals(ManagedClusterUpgradeType.CONTROL_PLANE_ONLY, model.upgrade().type()); - Assertions.assertEquals("enevfyexfwhybci", model.upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.nodeImageSelection().type()); + Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.upgrade().type()); + Assertions.assertEquals("vdcsitynn", 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 index 1ab60ba31ed6..45bfad3cb258 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/ManagedClusterUpgradeSpecTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -13,19 +13,18 @@ public final class ManagedClusterUpgradeSpecTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedClusterUpgradeSpec model - = BinaryData.fromString("{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"aamdect\"}") + = BinaryData.fromString("{\"type\":\"Full\",\"kubernetesVersion\":\"kqsleyyvxy\"}") .toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("aamdect", model.kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.type()); + Assertions.assertEquals("kqsleyyvxy", model.kubernetesVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedClusterUpgradeSpec model - = new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.NODE_IMAGE_ONLY) - .withKubernetesVersion("aamdect"); + ManagedClusterUpgradeSpec model = new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.FULL) + .withKubernetesVersion("kqsleyyvxy"); model = BinaryData.fromObject(model).toObject(ManagedClusterUpgradeSpec.class); - Assertions.assertEquals(ManagedClusterUpgradeType.NODE_IMAGE_ONLY, model.type()); - Assertions.assertEquals("aamdect", model.kubernetesVersion()); + Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.type()); + Assertions.assertEquals("kqsleyyvxy", 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 index a99e3fa5d5bb..49cf16cb5fd1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -16,18 +16,17 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"544f9530-cafd-4d6f-a19f-59ceacb9808f\",\"tenantId\":\"14642c9b-eeaf-4aea-817c-a543cab2d328\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"fgibmadgakeq\":{\"principalId\":\"ccff1ea4-6f6a-418d-b6c7-4c15ac1ca666\",\"clientId\":\"1fb07c13-6b00-43fb-adc8-fd17dc2b8ccf\"},\"yb\":{\"principalId\":\"9a92b13d-acd1-4b1b-a23a-d5ac9b352e9b\",\"clientId\":\"0fb785d3-f21d-4dbb-bb19-d190eff3dfa5\"},\"e\":{\"principalId\":\"38c35251-0576-472d-84b5-fa370f63bdf8\",\"clientId\":\"673ec36b-4857-464c-a869-bef0d989a8e7\"}}}") + "{\"principalId\":\"ybb\",\"tenantId\":\"odepoogin\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"yevc\":{\"clientId\":\"heognarxzxtheo\",\"principalId\":\"si\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_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())); + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("yevc", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } // Use "Map.of" if available 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 index 724acf0008ca..4314fe2a4d0b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -11,13 +11,7 @@ public final class NodeImageSelectionStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeImageSelectionStatus model - = BinaryData.fromString("{\"selectedNodeImageVersions\":[{\"version\":\"cfsf\"}]}") + = BinaryData.fromString("{\"selectedNodeImageVersions\":[{\"version\":\"uxh\"}]}") .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 index 442da1e37345..66e189d5047c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -14,8 +14,8 @@ public final class NodeImageSelectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeImageSelection model = BinaryData.fromString( - "{\"type\":\"Custom\",\"customNodeImageVersions\":[{\"version\":\"scjeypv\"},{\"version\":\"zrkgqhcjrefovg\"},{\"version\":\"qsl\"}]}") + NodeImageSelection model = BinaryData + .fromString("{\"type\":\"Custom\",\"customNodeImageVersions\":[{\"version\":\"attpngjcrcczsq\"}]}") .toObject(NodeImageSelection.class); Assertions.assertEquals(NodeImageSelectionType.CUSTOM, model.type()); } @@ -23,8 +23,7 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NodeImageSelection model = new NodeImageSelection().withType(NodeImageSelectionType.CUSTOM) - .withCustomNodeImageVersions( - Arrays.asList(new NodeImageVersion(), new NodeImageVersion(), new NodeImageVersion())); + .withCustomNodeImageVersions(Arrays.asList(new NodeImageVersion())); model = BinaryData.fromObject(model).toObject(NodeImageSelection.class); Assertions.assertEquals(NodeImageSelectionType.CUSTOM, 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 index 45e380769315..913c3045852c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -10,7 +10,8 @@ public final class NodeImageVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeImageVersion model = BinaryData.fromString("{\"version\":\"yvxyqjp\"}").toObject(NodeImageVersion.class); + NodeImageVersion model + = BinaryData.fromString("{\"version\":\"hvmdajvnysounq\"}").toObject(NodeImageVersion.class); } @org.junit.jupiter.api.Test 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 index 3f5e3b0a3ed9..f3c81c61627b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -11,13 +11,7 @@ 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\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .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 index c889646464d0..4b79bbb1fd53 100644 --- 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 @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"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 index e830cc7b4b3d..c3cf443392e4 100644 --- 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 @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.containerservicefleet.models.OperationListResult; +import com.azure.resourcemanager.containerservicefleet.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; 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\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java index 47bc868bcacb..74b9bc12aa3e 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import com.azure.resourcemanager.containerservicefleet.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"kt\",\"isDataAction\":false,\"display\":{\"provider\":\"hwlrsf\",\"resource\":\"zpwv\",\"operation\":\"dqgbiqylihkaetc\",\"description\":\"vfcivfsnkymuc\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"nmic\",\"isDataAction\":false,\"display\":{\"provider\":\"o\",\"resource\":\"ilovnot\",\"operation\":\"jfcn\",\"description\":\"k\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); 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/SkipPropertiesTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java index 9f90a1585328..5a9f1c5ced12 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -14,18 +14,22 @@ public final class SkipPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SkipProperties model = BinaryData.fromString("{\"targets\":[{\"type\":\"Group\",\"name\":\"mddystkiiux\"}]}") + SkipProperties model = BinaryData.fromString( + "{\"targets\":[{\"type\":\"AfterStageWait\",\"name\":\"wankixzbi\"},{\"type\":\"Stage\",\"name\":\"eputtmrywnuzoqf\"},{\"type\":\"Group\",\"name\":\"yqzrnkcqvyxlw\"},{\"type\":\"Group\",\"name\":\"lsicohoqqnwv\"}]}") .toObject(SkipProperties.class); - Assertions.assertEquals(TargetType.GROUP, model.targets().get(0).type()); - Assertions.assertEquals("mddystkiiux", model.targets().get(0).name()); + Assertions.assertEquals(TargetType.AFTER_STAGE_WAIT, model.targets().get(0).type()); + Assertions.assertEquals("wankixzbi", model.targets().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SkipProperties model = new SkipProperties() - .withTargets(Arrays.asList(new SkipTarget().withType(TargetType.GROUP).withName("mddystkiiux"))); + .withTargets(Arrays.asList(new SkipTarget().withType(TargetType.AFTER_STAGE_WAIT).withName("wankixzbi"), + new SkipTarget().withType(TargetType.STAGE).withName("eputtmrywnuzoqf"), + new SkipTarget().withType(TargetType.GROUP).withName("yqzrnkcqvyxlw"), + new SkipTarget().withType(TargetType.GROUP).withName("lsicohoqqnwv"))); model = BinaryData.fromObject(model).toObject(SkipProperties.class); - Assertions.assertEquals(TargetType.GROUP, model.targets().get(0).type()); - Assertions.assertEquals("mddystkiiux", model.targets().get(0).name()); + Assertions.assertEquals(TargetType.AFTER_STAGE_WAIT, model.targets().get(0).type()); + Assertions.assertEquals("wankixzbi", model.targets().get(0).name()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java index 020e5c7b019e..6e5bfae052ad 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/SkipTargetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -13,16 +13,16 @@ public final class SkipTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkipTarget model - = BinaryData.fromString("{\"type\":\"Member\",\"name\":\"yudxorrqnbp\"}").toObject(SkipTarget.class); - Assertions.assertEquals(TargetType.MEMBER, model.type()); - Assertions.assertEquals("yudxorrqnbp", model.name()); + = BinaryData.fromString("{\"type\":\"AfterStageWait\",\"name\":\"yav\"}").toObject(SkipTarget.class); + Assertions.assertEquals(TargetType.AFTER_STAGE_WAIT, model.type()); + Assertions.assertEquals("yav", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkipTarget model = new SkipTarget().withType(TargetType.MEMBER).withName("yudxorrqnbp"); + SkipTarget model = new SkipTarget().withType(TargetType.AFTER_STAGE_WAIT).withName("yav"); model = BinaryData.fromObject(model).toObject(SkipTarget.class); - Assertions.assertEquals(TargetType.MEMBER, model.type()); - Assertions.assertEquals("yudxorrqnbp", model.name()); + Assertions.assertEquals(TargetType.AFTER_STAGE_WAIT, model.type()); + Assertions.assertEquals("yav", model.name()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java index d00d06355a79..7b3e1a9557e4 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateGroupTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -11,14 +11,14 @@ public final class UpdateGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateGroup model = BinaryData.fromString("{\"name\":\"wey\"}").toObject(UpdateGroup.class); - Assertions.assertEquals("wey", model.name()); + UpdateGroup model = BinaryData.fromString("{\"name\":\"enevfyexfwhybci\"}").toObject(UpdateGroup.class); + Assertions.assertEquals("enevfyexfwhybci", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateGroup model = new UpdateGroup().withName("wey"); + UpdateGroup model = new UpdateGroup().withName("enevfyexfwhybci"); model = BinaryData.fromObject(model).toObject(UpdateGroup.class); - Assertions.assertEquals("wey", model.name()); + Assertions.assertEquals("enevfyexfwhybci", model.name()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java index 0792018dbcb6..79205dffac98 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunListResultTests.java @@ -1,72 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.implementation.models.UpdateRunListResult; 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.NodeImageVersion; -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\":\"Canceled\",\"updateStrategyId\":\"aqsqsycbkbfk\",\"strategy\":{\"stages\":[{\"name\":\"dkexxppofm\"},{\"name\":\"axcfjpgddtocjjx\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"mouexhdzx\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-11-06T03:25:01Z\",\"completedTime\":\"2021-07-16T10:06:47Z\",\"state\":\"Stopping\",\"error\":{}},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"icbtwnpzao\",\"id\":\"uhrhcffcyddgl\",\"name\":\"jthjqkwpyei\",\"type\":\"xmqci\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"hix\",\"strategy\":{\"stages\":[{\"name\":\"dtopbob\"},{\"name\":\"og\"},{\"name\":\"m\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"a\"},\"nodeImageSelection\":{\"type\":\"Consistent\",\"customNodeImageVersions\":[{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-11-07T09:03:56Z\",\"completedTime\":\"2021-04-13T09:02:55Z\",\"state\":\"Skipped\",\"error\":{}},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}}},\"eTag\":\"kftutqxlngxlefg\",\"id\":\"nxkrx\",\"name\":\"qmi\",\"type\":\"tthzrvqd\"}],\"nextLink\":\"bhj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"rrqnbpoczvyifqrv\",\"strategy\":{\"stages\":[{\"name\":\"jsllrmv\"},{\"name\":\"d\"},{\"name\":\"watkpnpulexxb\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"Full\",\"kubernetesVersion\":\"truwiqzb\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{}]}},\"status\":{\"status\":{\"startTime\":\"2020-12-29T19:47:48Z\",\"completedTime\":\"2021-11-07T20:31:54Z\",\"state\":\"Failed\",\"error\":{}},\"stages\":[{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{},{}]}}},\"eTag\":\"obpxjmflbvvn\",\"id\":\"rkcciwwzjuqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"updateStrategyId\":\"uuimjmvxieduug\",\"strategy\":{\"stages\":[{\"name\":\"jrrfbyaosve\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"ControlPlaneOnly\",\"kubernetesVersion\":\"onpc\"},\"nodeImageSelection\":{\"type\":\"Latest\",\"customNodeImageVersions\":[{},{},{}]}},\"status\":{\"status\":{\"startTime\":\"2021-02-22T17:02:03Z\",\"completedTime\":\"2021-07-17T21:27:24Z\",\"state\":\"Skipped\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{}]}}},\"eTag\":\"fmvfaxkffeiit\",\"id\":\"vmezy\",\"name\":\"shxmzsbbzoggigrx\",\"type\":\"burvjxxjnspy\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"updateStrategyId\":\"enkouknvudw\",\"strategy\":{\"stages\":[{\"name\":\"kbldngkpocipa\"},{\"name\":\"yxoegukgjnp\"},{\"name\":\"ucgygevqz\"}]},\"managedClusterUpdate\":{\"upgrade\":{\"type\":\"NodeImageOnly\",\"kubernetesVersion\":\"pmr\"},\"nodeImageSelection\":{\"type\":\"Custom\",\"customNodeImageVersions\":[{}]}},\"status\":{\"status\":{\"startTime\":\"2021-10-24T19:51:12Z\",\"completedTime\":\"2021-01-09T04:48:22Z\",\"state\":\"Skipped\",\"error\":{}},\"stages\":[{},{}],\"nodeImageSelection\":{\"selectedNodeImageVersions\":[{},{},{}]}}},\"eTag\":\"eoejzic\",\"id\":\"fsj\",\"name\":\"tgzfbishcbkh\",\"type\":\"jdeyeamdpha\"}],\"nextLink\":\"lpbuxwgipwhonowk\"}") .toObject(UpdateRunListResult.class); - Assertions.assertEquals("aqsqsycbkbfk", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("dkexxppofm", model.value().get(0).strategy().stages().get(0).name()); + Assertions.assertEquals("rrqnbpoczvyifqrv", model.value().get(0).updateStrategyId()); + Assertions.assertEquals("jsllrmv", model.value().get(0).strategy().stages().get(0).name()); Assertions.assertEquals(ManagedClusterUpgradeType.FULL, model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("mouexhdzx", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); + Assertions.assertEquals("truwiqzb", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); Assertions.assertEquals(NodeImageSelectionType.LATEST, model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("bhj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateRunListResult model - = new UpdateRunListResult() - .withValue(Arrays.asList(new UpdateRunInner().withUpdateStrategyId("aqsqsycbkbfk") - .withStrategy(new UpdateRunStrategy().withStages(Arrays.asList( - new UpdateStage().withName("dkexxppofm"), new UpdateStage().withName("axcfjpgddtocjjx")))) - .withManagedClusterUpdate(new ManagedClusterUpdate() - .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("mouexhdzx")) - .withNodeImageSelection(new NodeImageSelection() - .withType(NodeImageSelectionType.LATEST) - .withCustomNodeImageVersions(Arrays.asList(new NodeImageVersion(), new NodeImageVersion(), - new NodeImageVersion())))), - new UpdateRunInner().withUpdateStrategyId("hix") - .withStrategy(new UpdateRunStrategy().withStages( - Arrays.asList(new UpdateStage().withName("dtopbob"), new UpdateStage().withName("og"), - new UpdateStage().withName("m")))) - .withManagedClusterUpdate(new ManagedClusterUpdate() - .withUpgrade(new ManagedClusterUpgradeSpec().withType(ManagedClusterUpgradeType.FULL) - .withKubernetesVersion("a")) - .withNodeImageSelection(new NodeImageSelection().withType(NodeImageSelectionType.CONSISTENT) - .withCustomNodeImageVersions( - Arrays.asList(new NodeImageVersion(), new NodeImageVersion())))))) - .withNextLink("bhj"); - model = BinaryData.fromObject(model).toObject(UpdateRunListResult.class); - Assertions.assertEquals("aqsqsycbkbfk", model.value().get(0).updateStrategyId()); - Assertions.assertEquals("dkexxppofm", model.value().get(0).strategy().stages().get(0).name()); - Assertions.assertEquals(ManagedClusterUpgradeType.FULL, - model.value().get(0).managedClusterUpdate().upgrade().type()); - Assertions.assertEquals("mouexhdzx", model.value().get(0).managedClusterUpdate().upgrade().kubernetesVersion()); - Assertions.assertEquals(NodeImageSelectionType.LATEST, - model.value().get(0).managedClusterUpdate().nodeImageSelection().type()); - Assertions.assertEquals("bhj", model.nextLink()); + Assertions.assertEquals("lpbuxwgipwhonowk", model.nextLink()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java index a86457204311..3b26415ace02 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunStrategyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -15,22 +15,34 @@ public final class UpdateRunStrategyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateRunStrategy model = BinaryData.fromString( - "{\"stages\":[{\"name\":\"suesnzw\",\"groups\":[{\"name\":\"bavo\"},{\"name\":\"xzdmohctb\"},{\"name\":\"vudwx\"}],\"afterStageWaitInSeconds\":1492638603}]}") + "{\"stages\":[{\"name\":\"hcbonqvpkvlr\",\"groups\":[{\"name\":\"ea\"},{\"name\":\"eipheoflokeyy\"}],\"afterStageWaitInSeconds\":354708232},{\"name\":\"jbdlwtgrhpdjpju\",\"groups\":[{\"name\":\"xazjpqyegual\"},{\"name\":\"b\"}],\"afterStageWaitInSeconds\":1163750271},{\"name\":\"e\",\"groups\":[{\"name\":\"zvdudgwdslfhotwm\"},{\"name\":\"ynpwlbj\"},{\"name\":\"pgacftadehxnlty\"}],\"afterStageWaitInSeconds\":737203180},{\"name\":\"ppusuesnzwdejba\",\"groups\":[{\"name\":\"xzdmohctb\"},{\"name\":\"vudwx\"},{\"name\":\"ndnvo\"},{\"name\":\"gujjugwdkcglh\"}],\"afterStageWaitInSeconds\":1950035591}]}") .toObject(UpdateRunStrategy.class); - Assertions.assertEquals("suesnzw", model.stages().get(0).name()); - Assertions.assertEquals("bavo", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1492638603, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("hcbonqvpkvlr", model.stages().get(0).name()); + Assertions.assertEquals("ea", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals(354708232, 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("suesnzw") - .withGroups(Arrays.asList(new UpdateGroup().withName("bavo"), new UpdateGroup().withName("xzdmohctb"), - new UpdateGroup().withName("vudwx"))) - .withAfterStageWaitInSeconds(1492638603))); + UpdateRunStrategy model = new UpdateRunStrategy().withStages(Arrays.asList( + new UpdateStage().withName("hcbonqvpkvlr") + .withGroups( + Arrays.asList(new UpdateGroup().withName("ea"), new UpdateGroup().withName("eipheoflokeyy"))) + .withAfterStageWaitInSeconds(354708232), + new UpdateStage().withName("jbdlwtgrhpdjpju") + .withGroups(Arrays.asList(new UpdateGroup().withName("xazjpqyegual"), new UpdateGroup().withName("b"))) + .withAfterStageWaitInSeconds(1163750271), + new UpdateStage().withName("e") + .withGroups(Arrays.asList(new UpdateGroup().withName("zvdudgwdslfhotwm"), + new UpdateGroup().withName("ynpwlbj"), new UpdateGroup().withName("pgacftadehxnlty"))) + .withAfterStageWaitInSeconds(737203180), + new UpdateStage().withName("ppusuesnzwdejba") + .withGroups(Arrays.asList(new UpdateGroup().withName("xzdmohctb"), new UpdateGroup().withName("vudwx"), + new UpdateGroup().withName("ndnvo"), new UpdateGroup().withName("gujjugwdkcglh"))) + .withAfterStageWaitInSeconds(1950035591))); model = BinaryData.fromObject(model).toObject(UpdateRunStrategy.class); - Assertions.assertEquals("suesnzw", model.stages().get(0).name()); - Assertions.assertEquals("bavo", model.stages().get(0).groups().get(0).name()); - Assertions.assertEquals(1492638603, model.stages().get(0).afterStageWaitInSeconds()); + Assertions.assertEquals("hcbonqvpkvlr", model.stages().get(0).name()); + Assertions.assertEquals("ea", model.stages().get(0).groups().get(0).name()); + Assertions.assertEquals(354708232, model.stages().get(0).afterStageWaitInSeconds()); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java index ff2631801422..2367a4a308ad 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateRunsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { ContainerServiceFleetManager manager = ContainerServiceFleetManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.updateRuns().delete("yhrfouyftaakcpw", "yzvqt", "nubexk", "zksmondj", com.azure.core.util.Context.NONE); + manager.updateRuns().delete("wbhsqfsub", "gjb", "rxbpyb", "rfbjf", com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java index 10e9d68b1faa..a17b391c9686 100644 --- a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/test/java/com/azure/resourcemanager/containerservicefleet/generated/UpdateStageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -13,23 +13,23 @@ public final class UpdateStageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UpdateStage model = BinaryData.fromString( - "{\"name\":\"nvowgujju\",\"groups\":[{\"name\":\"kcglhslaz\"},{\"name\":\"dyggdtjixhbku\"}],\"afterStageWaitInSeconds\":621346946}") + UpdateStage model = BinaryData + .fromString( + "{\"name\":\"zj\",\"groups\":[{\"name\":\"gdtjixhbkuofqwey\"}],\"afterStageWaitInSeconds\":1047075786}") .toObject(UpdateStage.class); - Assertions.assertEquals("nvowgujju", model.name()); - Assertions.assertEquals("kcglhslaz", model.groups().get(0).name()); - Assertions.assertEquals(621346946, model.afterStageWaitInSeconds()); + Assertions.assertEquals("zj", model.name()); + Assertions.assertEquals("gdtjixhbkuofqwey", model.groups().get(0).name()); + Assertions.assertEquals(1047075786, model.afterStageWaitInSeconds()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateStage model = new UpdateStage().withName("nvowgujju") - .withGroups( - Arrays.asList(new UpdateGroup().withName("kcglhslaz"), new UpdateGroup().withName("dyggdtjixhbku"))) - .withAfterStageWaitInSeconds(621346946); + UpdateStage model = new UpdateStage().withName("zj") + .withGroups(Arrays.asList(new UpdateGroup().withName("gdtjixhbkuofqwey"))) + .withAfterStageWaitInSeconds(1047075786); model = BinaryData.fromObject(model).toObject(UpdateStage.class); - Assertions.assertEquals("nvowgujju", model.name()); - Assertions.assertEquals("kcglhslaz", model.groups().get(0).name()); - Assertions.assertEquals(621346946, model.afterStageWaitInSeconds()); + Assertions.assertEquals("zj", model.name()); + Assertions.assertEquals("gdtjixhbkuofqwey", model.groups().get(0).name()); + Assertions.assertEquals(1047075786, model.afterStageWaitInSeconds()); } } 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 index 8c270804b7db..6f1c2c7bf120 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.containerservicefleet.generated; @@ -10,8 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2b89d5da-e878-4dba-bd88-28cdb8ab2437\",\"clientId\":\"bafa37ed-c1cf-4a53-928e-0ff4866bf454\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"clientId\":\"qi\",\"principalId\":\"hungbwjzrnf\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml new file mode 100644 index 000000000000..3c81f1639aa6 --- /dev/null +++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/containerservice/Fleet.Management +commit: b51a49c600f5b12cecf263ae583a00e3f51c1af1 +repo: Azure/azure-rest-api-specs +additionalDirectories: