diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md index acefde76397e..9ff61dababdb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/CHANGELOG.md @@ -1,14 +1,307 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-04-14) -### Features Added +- Azure Resource Manager servicefabricmanagedclusters client library for Java. This package contains Microsoft Azure SDK for servicefabricmanagedclusters Management SDK. Service Fabric Managed Clusters Management 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.ManagedProxyResource` was removed -### Other Changes +#### `models.NodeTypeListSkuResult` was removed + +#### `ServiceFabricManagedClustersManager$Configurable` was removed + +#### `models.PublicIpAddressVersion` was removed + +#### `ServiceFabricManagedClustersManager` was removed + +#### `models.NodeTypeListResult` was removed + +#### `models.PrivateIpAddressVersion` was removed + +#### `models.ApplicationTypeResourceList` was removed + +#### `models.ServiceResourceList` was removed + +#### `models.ApplicationResourceList` was removed + +#### `models.OperationResultsGetResponse` was removed + +#### `models.ManagedVMSizesResult` was removed + +#### `models.ApplicationTypeVersionResourceList` was removed + +#### `models.OperationResultsGetHeaders` was removed + +#### `models.ManagedClusterListResult` was removed + +#### `models.OperationListResult` was removed + +#### `models.VmssExtension` was removed + +#### `models.IpConfigurationPublicIpAddressConfiguration` was removed + +#### `models.IpAddressType` was removed + +#### `models.ApplicationTypeResource$DefinitionStages` was modified + +* `withExistingManagedcluster(java.lang.String,java.lang.String)` was removed in stage 1 + +#### `models.ApplicationResource$DefinitionStages` was modified + +* `withExistingManagedcluster(java.lang.String,java.lang.String)` was removed in stage 1 + +#### `models.ManagedCluster$Definition` was modified + +* `withEnableServicePublicIp(java.lang.Boolean)` was removed +* `withPublicIpPrefixId(java.lang.String)` was removed +* `withAdminUsername(java.lang.String)` was removed + +#### `models.IpConfiguration` was modified + +* `withPrivateIpAddressVersion(models.PrivateIpAddressVersion)` was removed +* `withPublicIpAddressConfiguration(models.IpConfigurationPublicIpAddressConfiguration)` was removed +* `publicIpAddressConfiguration()` was removed +* `privateIpAddressVersion()` was removed + +#### `models.NodeType$Definition` was modified + +* `withEnableNodePublicIp(java.lang.Boolean)` was removed + +#### `models.AvailableOperationDisplay` was modified + +* `withOperation(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed + +#### `models.OperationResults` was modified + +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.ManagedClusterCodeVersionResult` was modified + +* `java.lang.String supportExpiryUtc()` -> `java.time.OffsetDateTime supportExpiryUtc()` + +#### `models.NodeType` was modified + +* `enableNodePublicIp()` was removed + +#### `models.ManagedMaintenanceWindowStatus` was modified + +* `lastWindowEndTimeUtc()` was removed +* `lastWindowStartTimeUtc()` was removed +* `lastWindowStatusUpdateAtUtc()` was removed + +#### `models.ApplicationTypeResource$Definition` was modified + +* `withExistingManagedcluster(java.lang.String,java.lang.String)` was removed + +#### `models.FrontendConfiguration` was modified + +* `models.IpAddressType ipAddressType()` -> `models.IPAddressType ipAddressType()` +* `withIpAddressType(models.IpAddressType)` was removed + +#### `models.ManagedCluster` was modified + +* `enableServicePublicIp()` was removed +* `adminUsername()` was removed +* `publicIpPrefixId()` was removed + +#### `models.LongRunningOperationResult` was modified + +* `com.azure.core.management.exception.ManagementError error()` -> `models.ErrorModelError error()` + +#### `models.ApplicationResource$Definition` was modified + +* `withExistingManagedcluster(java.lang.String,java.lang.String)` was removed + +### Features Added + +* `implementation.models.NodeTypeListSkuResult` was added + +* `implementation.models.ApplicationTypeVersionResourceList` was added + +* `models.SfmcOperationStatus` was added + +* `models.FaultSimulationContentWrapper` was added + +* `implementation.models.NodeTypeListResult` was added + +* `implementation.models.ApplicationResourceList` was added + +* `ServicefabricmanagedclustersManager` was added + +* `models.FaultSimulationStatus` was added + +* `models.ZoneFaultSimulationContent` was added + +* `implementation.models.FaultSimulationListResult` was added + +* `implementation.models.OperationListResult` was added + +* `models.FaultSimulationDetails` was added + +* `models.VmApplication` was added + +* `models.FaultSimulation` was added + +* `models.VMSSExtensionPropertiesSettings` was added + +* `models.PrivateIPAddressVersion` was added + +* `models.VMSSExtensionPropertiesProtectedSettings` was added + +* `implementation.models.ManagedVMSizesResult` was added + +* `models.PublicIPAddressVersion` was added + +* `models.NodeTypeFaultSimulation` was added + +* `models.AutoGeneratedDomainNameLabelScope` was added + +* `implementation.models.ApplicationTypeResourceList` was added + +* `ServicefabricmanagedclustersManager$Configurable` was added + +* `implementation.models.ServiceResourceList` was added + +* `models.ErrorModelError` was added + +* `models.FaultKind` was added + +* `models.FaultSimulationContent` was added + +* `models.FaultSimulationIdContent` was added + +* `implementation.models.ManagedClusterListResult` was added + +* `models.IPAddressType` was added + +* `models.FaultSimulationConstraints` was added + +* `models.VMSSExtension` was added + +* `models.IPConfigurationPublicIPAddressConfiguration` was added + +#### `models.ManagedCluster$Definition` was modified + +* `withAdminUserName(java.lang.String)` was added +* `withAllocatedOutboundPorts(java.lang.Integer)` was added +* `withPublicIPPrefixId(java.lang.String)` was added +* `withEnableServicePublicIP(java.lang.Boolean)` was added +* `withAutoGeneratedDomainNameLabelScope(models.AutoGeneratedDomainNameLabelScope)` was added +* `withVMImage(java.lang.String)` was added + +#### `models.IpConfiguration` was modified + +* `withPublicIPAddressConfiguration(models.IPConfigurationPublicIPAddressConfiguration)` was added +* `privateIPAddressVersion()` was added +* `publicIPAddressConfiguration()` was added +* `withPrivateIPAddressVersion(models.PrivateIPAddressVersion)` was added + +#### `models.NodeType$Definition` was modified + +* `withEnableNodePublicIP(java.lang.Boolean)` was added +* `withZoneBalance(java.lang.Boolean)` was added +* `withVmApplications(java.util.List)` was added + +#### `models.ApplicationResource` was modified + +* `readUpgrade(com.azure.core.util.Context)` was added +* `startRollback()` was added +* `resumeUpgrade(models.RuntimeResumeApplicationUpgradeParameters,com.azure.core.util.Context)` was added +* `startRollback(com.azure.core.util.Context)` was added +* `resumeUpgrade(models.RuntimeResumeApplicationUpgradeParameters)` was added +* `readUpgrade()` was added + +#### `models.NodeTypes` was modified + +* `startFaultSimulation(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationContentWrapper,com.azure.core.util.Context)` was added +* `deallocate(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `getFaultSimulationWithResponse(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `stopFaultSimulation(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationIdContent)` was added +* `startFaultSimulation(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationContentWrapper)` was added +* `listFaultSimulation(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `start(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters)` was added +* `listFaultSimulation(java.lang.String,java.lang.String,java.lang.String)` was added +* `start(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `redeploy(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters)` was added +* `deallocate(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters)` was added +* `stopFaultSimulation(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `redeploy(java.lang.String,java.lang.String,java.lang.String,models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `getFaultSimulation(java.lang.String,java.lang.String,java.lang.String,models.FaultSimulationIdContent)` was added + +#### `models.OperationResults` was modified + +* `get(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.ManagedClusters` was modified + +* `getFaultSimulation(java.lang.String,java.lang.String,models.FaultSimulationIdContent)` was added +* `startFaultSimulation(java.lang.String,java.lang.String,models.FaultSimulationContentWrapper)` was added +* `listFaultSimulation(java.lang.String,java.lang.String)` was added +* `listFaultSimulation(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `stopFaultSimulation(java.lang.String,java.lang.String,models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `startFaultSimulation(java.lang.String,java.lang.String,models.FaultSimulationContentWrapper,com.azure.core.util.Context)` was added +* `getFaultSimulationWithResponse(java.lang.String,java.lang.String,models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `stopFaultSimulation(java.lang.String,java.lang.String,models.FaultSimulationIdContent)` was added + +#### `models.NodeType` was modified + +* `startFaultSimulation(models.FaultSimulationContentWrapper)` was added +* `deallocate(models.NodeTypeActionParameters)` was added +* `start(models.NodeTypeActionParameters)` was added +* `enableNodePublicIP()` was added +* `listFaultSimulation()` was added +* `getFaultSimulationWithResponse(models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `start(models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `deallocate(models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `zoneBalance()` was added +* `redeploy(models.NodeTypeActionParameters)` was added +* `redeploy(models.NodeTypeActionParameters,com.azure.core.util.Context)` was added +* `startFaultSimulation(models.FaultSimulationContentWrapper,com.azure.core.util.Context)` was added +* `stopFaultSimulation(models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `stopFaultSimulation(models.FaultSimulationIdContent)` was added +* `vmApplications()` was added +* `getFaultSimulation(models.FaultSimulationIdContent)` was added +* `listFaultSimulation(com.azure.core.util.Context)` was added + +#### `models.ManagedMaintenanceWindowStatus` was modified + +* `lastWindowStartTimeUTC()` was added +* `lastWindowStatusUpdateAtUTC()` was added +* `lastWindowEndTimeUTC()` was added + +#### `models.ApplicationTypeResource$Definition` was modified + +* `withExistingManagedCluster(java.lang.String,java.lang.String)` was added + +#### `models.FrontendConfiguration` was modified + +* `withIpAddressType(models.IPAddressType)` was added + +#### `models.ManagedCluster` was modified + +* `getFaultSimulation(models.FaultSimulationIdContent)` was added +* `getFaultSimulationWithResponse(models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `startFaultSimulation(models.FaultSimulationContentWrapper)` was added +* `autoGeneratedDomainNameLabelScope()` was added +* `listFaultSimulation()` was added +* `allocatedOutboundPorts()` was added +* `adminUserName()` was added +* `stopFaultSimulation(models.FaultSimulationIdContent,com.azure.core.util.Context)` was added +* `startFaultSimulation(models.FaultSimulationContentWrapper,com.azure.core.util.Context)` was added +* `publicIPPrefixId()` was added +* `listFaultSimulation(com.azure.core.util.Context)` was added +* `vMImage()` was added +* `enableServicePublicIP()` was added +* `stopFaultSimulation(models.FaultSimulationIdContent)` was added + +#### `models.ApplicationResource$Definition` was modified + +* `withExistingManagedCluster(java.lang.String,java.lang.String)` was added ## 1.0.0 (2024-12-25) diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md index d994bbd5e9e2..efc373e9ad02 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager Service Fabric Managed Clusters client library for Java +# Azure Resource Manager servicefabricmanagedclusters client library for Java -Azure Resource Manager Service Fabric Managed Clusters client library for Java. +Azure Resource Manager servicefabricmanagedclusters client library for Java. -This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. Service Fabric Managed Clusters Management Client. Package tag package-2024-04. 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 servicefabricmanagedclusters Management SDK. Service Fabric Managed Clusters Management 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 @@ -52,15 +52,15 @@ 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(); -ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager +ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager .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. @@ -113,5 +113,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/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md index abdf731ffea2..0f829c4df84c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/SAMPLE.md @@ -68,12 +68,15 @@ ## NodeTypes - [CreateOrUpdate](#nodetypes_createorupdate) +- [Deallocate](#nodetypes_deallocate) - [Delete](#nodetypes_delete) - [DeleteNode](#nodetypes_deletenode) - [Get](#nodetypes_get) - [ListByManagedClusters](#nodetypes_listbymanagedclusters) +- [Redeploy](#nodetypes_redeploy) - [Reimage](#nodetypes_reimage) - [Restart](#nodetypes_restart) +- [Start](#nodetypes_start) - [Update](#nodetypes_update) ## OperationResults @@ -97,23 +100,43 @@ - [Update](#services_update) ### ApplicationTypeVersions_CreateOrUpdate +```java +/** + * Samples for ManagedClusters List. + */ +public final class ManagedClustersListSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + */ + /** + * Sample code: List managed clusters. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void listManagedClusters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationTypeVersions_Delete + ```java /** * Samples for ApplicationTypeVersions CreateOrUpdate. */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .define("1.0") .withExistingApplicationType("resRg", "myCluster", "myAppType") @@ -124,7 +147,57 @@ public final class ApplicationTypeVersionsCreateOrUpdateSamples { } ``` -### ApplicationTypeVersions_Delete +### ApplicationTypeVersions_Get + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import java.util.Arrays; + +/** + * Samples for NodeTypes Restart. + */ +public final class NodeTypesRestartSamples { + /* + * x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json + */ + /** + * Sample code: Restart nodes. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void restartNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .restart("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), + com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationTypeVersions_ListByApplicationTypes + +```java +/** + * Samples for Services ListByApplications. + */ +public final class ServicesListByApplicationsSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json + */ + /** + * Sample code: Get a list of service resources. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void getAListOfServiceResources( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.services().listByApplications("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); + } +} +``` + +### ApplicationTypeVersions_Update ```java /** @@ -132,24 +205,22 @@ public final class ApplicationTypeVersionsCreateOrUpdateSamples { */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .delete("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE); } } ``` -### ApplicationTypeVersions_Get +### ApplicationTypes_CreateOrUpdate ```java /** @@ -157,49 +228,205 @@ public final class ApplicationTypeVersionsDeleteSamples { */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .getWithResponse("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE); } } ``` -### ApplicationTypeVersions_ListByApplicationTypes +### ApplicationTypes_Delete ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.Access; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for ApplicationTypeVersions ListByApplicationTypes. + * Samples for ManagedClusters CreateOrUpdate. */ -public final class ApplicationTypeVersionsListByApplicationTypesSa { +public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json */ /** - * Sample code: Get a list of application type version resources. + * Sample code: Put a cluster with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAListOfApplicationTypeVersionResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applicationTypeVersions() - .listByApplicationTypes("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); + public static void putAClusterWithMaximumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters() + .define("mycluster") + .withRegion("eastus") + .withExistingResourceGroup("resRg") + .withSku(new Sku().withName(SkuName.BASIC)) + .withTags(mapOf()) + .withDnsName("mycluster") + .withClientConnectionPort(19000) + .withHttpGatewayConnectionPort(19080) + .withAdminUserName("vmadmin") + .withAdminPassword("{vm-password}") + .withLoadBalancingRules(Arrays.asList( + new LoadBalancingRule().withFrontendPort(80) + .withBackendPort(80) + .withProtocol(Protocol.fromString("http")) + .withProbePort(80) + .withProbeProtocol(ProbeProtocol.HTTP), + new LoadBalancingRule().withFrontendPort(443) + .withBackendPort(443) + .withProtocol(Protocol.fromString("http")) + .withProbePort(443) + .withProbeProtocol(ProbeProtocol.HTTP), + new LoadBalancingRule().withFrontendPort(10000) + .withBackendPort(10000) + .withProtocol(Protocol.TCP) + .withProbePort(10000) + .withProbeProtocol(ProbeProtocol.HTTP) + .withLoadDistribution("Default"))) + .withAllowRdpAccess(true) + .withNetworkSecurityRules(Arrays.asList( + new NetworkSecurityRule().withName("TestName") + .withDescription("Test description") + .withProtocol(NsgProtocol.TCP) + .withSourceAddressPrefixes(Arrays.asList("*")) + .withDestinationAddressPrefixes(Arrays.asList("*")) + .withSourcePortRanges(Arrays.asList("*")) + .withDestinationPortRanges(Arrays.asList("*")) + .withAccess(Access.ALLOW) + .withPriority(1010) + .withDirection(Direction.INBOUND), + new NetworkSecurityRule().withName("AllowARM") + .withProtocol(NsgProtocol.fromString("*")) + .withSourceAddressPrefix("AzureResourceManager") + .withDestinationAddressPrefix("*") + .withSourcePortRange("*") + .withDestinationPortRange("33500-33699") + .withAccess(Access.ALLOW) + .withPriority(2002) + .withDirection(Direction.INBOUND))) + .withFabricSettings(Arrays.asList(new SettingsSectionDescription().withName("ManagedIdentityTokenService") + .withParameters( + Arrays.asList(new SettingsParameterDescription().withName("IsEnabled").withValue("true"))))) + .withClusterCodeVersion("7.1.168.9494") + .withClusterUpgradeMode(ClusterUpgradeMode.MANUAL) + .withAddonFeatures(Arrays.asList(ManagedClusterAddOnFeature.DNS_SERVICE, + ManagedClusterAddOnFeature.BACKUP_RESTORE_SERVICE, ManagedClusterAddOnFeature.RESOURCE_MONITOR_SERVICE)) + .withEnableAutoOSUpgrade(true) + .withZonalResiliency(true) + .withApplicationTypeVersionsCleanupPolicy( + new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(3)) + .withEnableIpv6(true) + .withIpTags(Arrays.asList(new IpTag().withIpTagType("FirstPartyUsage").withTag("SQL"))) + .withAuxiliarySubnets(Arrays.asList(new Subnet().withName("testSubnet1") + .withEnableIpv6(true) + .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.ENABLED) + .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.ENABLED) + .withNetworkSecurityGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"))) + .withServiceEndpoints(Arrays.asList(new ServiceEndpoint().withService("Microsoft.Storage") + .withLocations(Arrays.asList("eastus2", "usnorth")))) + .withZonalUpdateMode(ZonalUpdateMode.FAST) + .withUseCustomVnet(true) + .withPublicIPPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix") + .withPublicIPv6PrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix") + .withDdosProtectionPlanId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan") + .withUpgradeDescription(new ClusterUpgradePolicy().withForceRestart(false) + .withHealthPolicy( + new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(10).withMaxPercentUnhealthyApplications(30)) + .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(20) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(40) + .withMaxPercentDeltaUnhealthyApplications(40)) + .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("00:05:00") + .withHealthCheckStableDuration("00:45:00") + .withHealthCheckRetryTimeout("00:55:00") + .withUpgradeTimeout("12:00:00") + .withUpgradeDomainTimeout("03:00:00"))) + .withHttpGatewayTokenAuthConnectionPort(19081) + .withEnableHttpGatewayExclusiveAuthMode(true) + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.SUBSCRIPTION_REUSE) + .withAllocatedOutboundPorts(0) + .create(); + } + + /* + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + */ + /** + * Sample code: Put a cluster with minimum parameters. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void putAClusterWithMinimumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters() + .define("myCluster") + .withRegion("eastus") + .withExistingResourceGroup("resRg") + .withSku(new Sku().withName(SkuName.BASIC)) + .withDnsName("myCluster") + .withAdminUserName("vmadmin") + .withAdminPassword("{vm-password}") + .withFabricSettings(Arrays.asList(new SettingsSectionDescription().withName("ManagedIdentityTokenService") + .withParameters( + Arrays.asList(new SettingsParameterDescription().withName("IsEnabled").withValue("true"))))) + .withClusterUpgradeMode(ClusterUpgradeMode.AUTOMATIC) + .withClusterUpgradeCadence(ClusterUpgradeCadence.WAVE1) + .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; } } ``` -### ApplicationTypeVersions_Update +### ApplicationTypes_Get ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResource; @@ -211,17 +438,15 @@ import java.util.Map; */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ApplicationTypeVersionResource resource = manager.applicationTypeVersions() .getWithResponse("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE) .getValue(); @@ -242,229 +467,167 @@ public final class ApplicationTypeVersionsUpdateSamples { } ``` -### ApplicationTypes_CreateOrUpdate +### ApplicationTypes_List ```java /** - * Samples for ApplicationTypes CreateOrUpdate. + * Samples for Applications StartRollback. */ -public final class ApplicationTypesCreateOrUpdateSamples { +public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json */ /** - * Sample code: Put an application type. + * Sample code: Start an application upgrade rollback. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applicationTypes() - .define("myAppType") - .withExistingManagedcluster("resRg", "myCluster") - .withRegion("eastus") - .create(); + public static void startAnApplicationUpgradeRollback( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications().startRollback("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } ``` -### ApplicationTypes_Delete +### ApplicationTypes_Update ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; +import java.util.Arrays; + /** - * Samples for ApplicationTypes Delete. + * Samples for NodeTypes Redeploy. */ -public final class ApplicationTypesDeleteSamples { +public final class NodeTypesRedeploySamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json */ /** - * Sample code: Delete an application type. + * Sample code: Redeploy all nodes by upgrade domain. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void deleteAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applicationTypes().delete("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); + public static void redeployAllNodesByUpgradeDomain( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .redeploy("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), + com.azure.core.util.Context.NONE); } -} -``` - -### ApplicationTypes_Get -```java -/** - * Samples for ApplicationTypes Get. - */ -public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/RedeployNodes_example.json */ /** - * Sample code: Get an application type. + * Sample code: Redeploy nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applicationTypes().getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); + public static void redeployNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .redeploy("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), + com.azure.core.util.Context.NONE); } } ``` -### ApplicationTypes_List +### Applications_CreateOrUpdate ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment; + /** - * Samples for ApplicationTypes List. + * Samples for ManagedClusterVersion GetByEnvironment. */ -public final class ApplicationTypesListSamples { +public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** - * Sample code: Get a list of application type name resources. + * Sample code: Get cluster version by environment. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAListOfApplicationTypeNameResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applicationTypes().list("resRg", "myCluster", com.azure.core.util.Context.NONE); + public static void getClusterVersionByEnvironment( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusterVersions() + .getByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, "7.2.477.9590", + com.azure.core.util.Context.NONE); } } ``` -### ApplicationTypes_Update +### Applications_Delete ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResource; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for ApplicationTypes Update. + * Samples for ManagedApplyMaintenanceWindow Post. */ -public final class ApplicationTypesUpdateSamples { +public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** - * Sample code: Patch an application type. + * Sample code: Apply Maintenance Window Status. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void patchAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - ApplicationTypeResource resource = manager.applicationTypes() - .getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); - } - - // 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; + public static void applyMaintenanceWindowStatus( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedApplyMaintenanceWindows() + .postWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } } ``` -### Applications_CreateOrUpdate +### Applications_Get ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku; import java.util.HashMap; import java.util.Map; /** - * Samples for Applications CreateOrUpdate. + * Samples for NodeTypes Update. */ -public final class ApplicationsCreateOrUpdateSamples { +public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperation_example.json */ /** - * Sample code: Put an application with maximum parameters. + * Sample code: Patch a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAnApplicationWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications() - .define("myApp") - .withExistingManagedcluster("resRg", "myCluster") - .withRegion("eastus") - .withTags(mapOf("a", "b")) - .withVersion( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0") - .withParameters(mapOf("param1", "value1")) - .withUpgradePolicy(new ApplicationUpgradePolicy() - .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(0) - .withDefaultServiceTypeHealthPolicy(new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(0) - .withMaxPercentUnhealthyPartitionsPerService(0) - .withMaxPercentUnhealthyReplicasPerPartition(0)) - .withServiceTypeHealthPolicyMap(mapOf("service1", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(30) - .withMaxPercentUnhealthyPartitionsPerService(30) - .withMaxPercentUnhealthyReplicasPerPartition(30)))) - .withForceRestart(false) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("00:02:00") - .withHealthCheckStableDuration("00:05:00") - .withHealthCheckRetryTimeout("00:10:00") - .withUpgradeTimeout("01:00:00") - .withUpgradeDomainTimeout("00:15:00")) - .withInstanceCloseDelayDuration(600L) - .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) - .withUpgradeReplicaSetCheckTimeout(3600L) - .withRecreateApplication(false)) - .create(); + public static void patchANodeType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + NodeType resource = manager.nodeTypes() + .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("a", "b")).apply(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** - * Sample code: Put an application with minimum parameters. + * Sample code: Patch a node type while auto-scaling. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAnApplicationWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications() - .define("myApp") - .withExistingManagedcluster("resRg", "myCluster") - .withRegion("eastus") - .withVersion( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0") - .create(); + public static void patchANodeTypeWhileAutoScaling( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + NodeType resource = manager.nodeTypes() + .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("a", "b")) + .withSku(new NodeTypeSku().withName("Standard_S0").withTier("Standard").withCapacity(10)) + .apply(); } // Use "Map.of" if available @@ -481,74 +644,43 @@ public final class ApplicationsCreateOrUpdateSamples { } ``` -### Applications_Delete +### Applications_List ```java -/** - * Samples for Applications Delete. - */ -public final class ApplicationsDeleteSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationDeleteOperation_example.json - */ - /** - * Sample code: Delete an application. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void deleteAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications().delete("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); - } -} -``` - -### Applications_Get +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResource; +import java.util.HashMap; +import java.util.Map; -```java /** - * Samples for Applications Get. + * Samples for ApplicationTypes Update. */ -public final class ApplicationsGetSamples { +public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** - * Sample code: Get an application. + * Sample code: Patch an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications().getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); + public static void patchAnApplicationType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + ApplicationTypeResource resource = manager.applicationTypes() + .getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("a", "b")).apply(); } -} -``` -### Applications_List - -```java -/** - * Samples for Applications List. - */ -public final class ApplicationsListSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationListOperation_example.json - */ - /** - * Sample code: Get a list of application resources. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void getAListOfApplicationResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications().list("resRg", "myCluster", com.azure.core.util.Context.NONE); + // 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; } } ``` @@ -557,22 +689,21 @@ public final class ApplicationsListSamples { ```java /** - * Samples for Applications ReadUpgrade. + * Samples for OperationResults Get. */ -public final class ApplicationsReadUpgradeSamples { +public final class OperationResultsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json */ /** - * Sample code: Get an application upgrade. + * Sample code: Get long running operation result. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAnApplicationUpgrade( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications().readUpgrade("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); + public static void getLongRunningOperationResult( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.operationResults() + .get("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); } } ``` @@ -580,58 +711,27 @@ public final class ApplicationsReadUpgradeSamples { ### Applications_ResumeUpgrade ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; - /** - * Samples for Applications ResumeUpgrade. + * Samples for Services Delete. */ -public final class ApplicationsResumeUpgradeSamples { +public final class ServicesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json */ /** - * Sample code: Resume upgrade. + * Sample code: Delete a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void resumeUpgrade( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications() - .resumeUpgrade("resRg", "myCluster", "myApp", - new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("UD1"), - com.azure.core.util.Context.NONE); + public static void deleteAService( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.services().delete("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); } } ``` ### Applications_StartRollback -```java -/** - * Samples for Applications StartRollback. - */ -public final class ApplicationsStartRollbackSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionStartRollback_example.json - */ - /** - * Sample code: Start an application upgrade rollback. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void startAnApplicationUpgradeRollback( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.applications().startRollback("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); - } -} -``` - -### Applications_Update - ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import java.util.HashMap; @@ -642,17 +742,15 @@ import java.util.Map; */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); @@ -673,940 +771,632 @@ public final class ApplicationsUpdateSamples { } ``` -### ManagedApplyMaintenanceWindow_Post +### Applications_Update ```java /** - * Samples for ManagedApplyMaintenanceWindow Post. + * Samples for ApplicationTypes List. */ -public final class ManagedApplyMaintenanceWindowPostSamples { +public final class ApplicationTypesListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json */ /** - * Sample code: Maintenance Window Status. + * Sample code: Get a list of application type name resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void maintenanceWindowStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedApplyMaintenanceWindows() - .postWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); + public static void getAListOfApplicationTypeNameResources( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applicationTypes().list("resRg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### ManagedAzResiliencyStatuses_Get +### ManagedApplyMaintenanceWindow_Post ```java /** - * Samples for ManagedAzResiliencyStatuses Get. + * Samples for NodeTypes Get. */ -public final class ManagedAzResiliencyStatusesGetSamples { +public final class NodeTypesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json */ /** - * Sample code: Az Resiliency status of Base Resources. + * Sample code: Get a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void azResiliencyStatusOfBaseResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedAzResiliencyStatuses() - .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); + public static void getANodeType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes().getWithResponse("resRg", "myCluster", "FE", com.azure.core.util.Context.NONE); } } ``` -### ManagedClusterVersion_Get +### ManagedAzResiliencyStatuses_Get ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for ManagedClusterVersion Get. + * Samples for Services CreateOrUpdate. */ -public final class ManagedClusterVersionGetSamples { +public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_min.json */ /** - * Sample code: Get cluster version. + * Sample code: Put a service with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getClusterVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusterVersions().getWithResponse("eastus", "7.2.477.9590", com.azure.core.util.Context.NONE); + public static void putAServiceWithMinimumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.services() + .define("myService") + .withExistingApplication("resRg", "myCluster", "myApp") + .withRegion("eastus") + .withProperties(new StatelessServiceProperties().withServiceTypeName("myServiceType") + .withPartitionDescription(new SingletonPartitionScheme()) + .withInstanceCount(1)) + .create(); } -} -``` - -### ManagedClusterVersion_GetByEnvironment -```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment; - -/** - * Samples for ManagedClusterVersion GetByEnvironment. - */ -public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json */ /** - * Sample code: Get cluster version by environment. + * Sample code: Put a service with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getClusterVersionByEnvironment( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusterVersions() - .getByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, "7.2.477.9590", - com.azure.core.util.Context.NONE); + public static void putAServiceWithMaximumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.services() + .define("myService") + .withExistingApplication("resRg", "myCluster", "myApp") + .withRegion("eastus") + .withTags(mapOf("a", "b")) + .withProperties(new StatelessServiceProperties().withPlacementConstraints("NodeType==frontend") + .withCorrelationScheme(Arrays.asList(new ServiceCorrelation() + .withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("metric1") + .withWeight(ServiceLoadMetricWeight.LOW) + .withDefaultLoad(3))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementNonPartiallyPlaceServicePolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) + .withScalingPolicies(Arrays.asList(new ScalingPolicy() + .withScalingMechanism(new PartitionInstanceCountScaleMechanism().withMinInstanceCount(3) + .withMaxInstanceCount(9) + .withScaleIncrement(2)) + .withScalingTrigger(new AveragePartitionLoadScalingTrigger().withMetricName("metricName") + .withLowerLoadThreshold(2.0) + .withUpperLoadThreshold(8.0) + .withScaleInterval("00:01:00")))) + .withServiceTypeName("myServiceType") + .withPartitionDescription(new SingletonPartitionScheme()) + .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) + .withServiceDnsName("myservicednsname.myApp") + .withInstanceCount(5) + .withMinInstanceCount(3) + .withMinInstancePercentage(30)) + .create(); } -} -``` - -### ManagedClusterVersion_List -```java -/** - * Samples for ManagedClusterVersion List. - */ -public final class ManagedClusterVersionListSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionList_example.json - */ - /** - * Sample code: List cluster versions. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void listClusterVersions( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusterVersions().listWithResponse("eastus", com.azure.core.util.Context.NONE); + // 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; } } ``` -### ManagedClusterVersion_ListByEnvironment +### ManagedClusterVersion_Get ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; /** - * Samples for ManagedClusterVersion ListByEnvironment. + * Samples for Applications ResumeUpgrade. */ -public final class ManagedClusterVersionListByEnvironmentSamples { +public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json */ /** - * Sample code: List cluster versions by environment. + * Sample code: Resume upgrade. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listClusterVersionsByEnvironment( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusterVersions() - .listByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, + public static void resumeUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications() + .resumeUpgrade("resRg", "myCluster", "myApp", + new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("UD1"), com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_CreateOrUpdate +### ManagedClusterVersion_GetByEnvironment ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Access; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeDeltaHealthPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Direction; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterAddOnFeature; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NsgProtocol; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateEndpointNetworkPolicies; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateLinkServiceNetworkPolicies; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ProbeProtocol; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Protocol; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceEndpoint; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsParameterDescription; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.SettingsSectionDescription; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Sku; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.SkuName; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Subnet; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ZonalUpdateMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for ManagedClusters CreateOrUpdate. + * Samples for Applications Get. */ -public final class ManagedClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPutOperation_example_max.json - */ - /** - * Sample code: Put a cluster with maximum parameters. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void putAClusterWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters() - .define("myCluster") - .withRegion("eastus") - .withExistingResourceGroup("resRg") - .withSku(new Sku().withName(SkuName.BASIC)) - .withTags(mapOf()) - .withDnsName("myCluster") - .withClientConnectionPort(19000) - .withHttpGatewayConnectionPort(19080) - .withAdminUsername("vmadmin") - .withAdminPassword("{vm-password}") - .withLoadBalancingRules(Arrays.asList( - new LoadBalancingRule().withFrontendPort(80) - .withBackendPort(80) - .withProtocol(Protocol.fromString("http")) - .withProbePort(80) - .withProbeProtocol(ProbeProtocol.HTTP), - new LoadBalancingRule().withFrontendPort(443) - .withBackendPort(443) - .withProtocol(Protocol.fromString("http")) - .withProbePort(443) - .withProbeProtocol(ProbeProtocol.HTTP), - new LoadBalancingRule().withFrontendPort(10000) - .withBackendPort(10000) - .withProtocol(Protocol.TCP) - .withProbePort(10000) - .withProbeProtocol(ProbeProtocol.HTTP) - .withLoadDistribution("Default"))) - .withAllowRdpAccess(true) - .withNetworkSecurityRules(Arrays.asList( - new NetworkSecurityRule().withName("TestName") - .withDescription("Test description") - .withProtocol(NsgProtocol.TCP) - .withSourceAddressPrefixes(Arrays.asList("*")) - .withDestinationAddressPrefixes(Arrays.asList("*")) - .withSourcePortRanges(Arrays.asList("*")) - .withDestinationPortRanges(Arrays.asList("*")) - .withAccess(Access.ALLOW) - .withPriority(1010) - .withDirection(Direction.INBOUND), - new NetworkSecurityRule().withName("AllowARM") - .withProtocol(NsgProtocol.fromString("*")) - .withSourceAddressPrefix("AzureResourceManager") - .withDestinationAddressPrefix("*") - .withSourcePortRange("*") - .withDestinationPortRange("33500-33699") - .withAccess(Access.ALLOW) - .withPriority(2002) - .withDirection(Direction.INBOUND))) - .withFabricSettings(Arrays.asList(new SettingsSectionDescription().withName("ManagedIdentityTokenService") - .withParameters( - Arrays.asList(new SettingsParameterDescription().withName("IsEnabled").withValue("true"))))) - .withClusterCodeVersion("7.1.168.9494") - .withClusterUpgradeMode(ClusterUpgradeMode.MANUAL) - .withAddonFeatures(Arrays.asList(ManagedClusterAddOnFeature.DNS_SERVICE, - ManagedClusterAddOnFeature.BACKUP_RESTORE_SERVICE, ManagedClusterAddOnFeature.RESOURCE_MONITOR_SERVICE)) - .withEnableAutoOSUpgrade(true) - .withZonalResiliency(true) - .withApplicationTypeVersionsCleanupPolicy( - new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(3)) - .withEnableIpv6(true) - .withIpTags(Arrays.asList(new IpTag().withIpTagType("FirstPartyUsage").withTag("SQL"))) - .withAuxiliarySubnets(Arrays.asList(new Subnet().withName("testSubnet1") - .withEnableIpv6(true) - .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.ENABLED) - .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.ENABLED) - .withNetworkSecurityGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"))) - .withServiceEndpoints(Arrays.asList(new ServiceEndpoint().withService("Microsoft.Storage") - .withLocations(Arrays.asList("eastus2", "usnorth")))) - .withZonalUpdateMode(ZonalUpdateMode.FAST) - .withUseCustomVnet(true) - .withPublicIpPrefixId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix") - .withPublicIPv6PrefixId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix") - .withDdosProtectionPlanId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan") - .withUpgradeDescription(new ClusterUpgradePolicy().withForceRestart(false) - .withHealthPolicy( - new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(10).withMaxPercentUnhealthyApplications(30)) - .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(20) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(40) - .withMaxPercentDeltaUnhealthyApplications(40)) - .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("00:05:00") - .withHealthCheckStableDuration("00:45:00") - .withHealthCheckRetryTimeout("00:55:00") - .withUpgradeTimeout("12:00:00") - .withUpgradeDomainTimeout("03:00:00"))) - .withHttpGatewayTokenAuthConnectionPort(19081) - .withEnableHttpGatewayExclusiveAuthMode(true) - .create(); - } - +public final class ApplicationsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json */ /** - * Sample code: Put a cluster with minimum parameters. + * Sample code: Get an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAClusterWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters() - .define("myCluster") - .withRegion("eastus") - .withExistingResourceGroup("resRg") - .withSku(new Sku().withName(SkuName.BASIC)) - .withDnsName("myCluster") - .withAdminUsername("vmadmin") - .withAdminPassword("{vm-password}") - .withFabricSettings(Arrays.asList(new SettingsSectionDescription().withName("ManagedIdentityTokenService") - .withParameters( - Arrays.asList(new SettingsParameterDescription().withName("IsEnabled").withValue("true"))))) - .withClusterUpgradeMode(ClusterUpgradeMode.AUTOMATIC) - .withClusterUpgradeCadence(ClusterUpgradeCadence.WAVE1) - .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; + public static void getAnApplication( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications().getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_Delete +### ManagedClusterVersion_List ```java /** - * Samples for ManagedClusters Delete. + * Samples for ManagedClusterVersion List. */ -public final class ManagedClustersDeleteSamples { +public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json */ /** - * Sample code: Delete a cluster. + * Sample code: List cluster versions. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void deleteACluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters().delete("resRg", "myCluster", com.azure.core.util.Context.NONE); + public static void listClusterVersions( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusterVersions().listWithResponse("eastus", com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_GetByResourceGroup +### ManagedClusterVersion_ListByEnvironment ```java /** - * Samples for ManagedClusters GetByResourceGroup. + * Samples for ApplicationTypeVersions ListByApplicationTypes. */ -public final class ManagedClustersGetByResourceGroupSamples { +public final class ApplicationTypeVersionsListByApplicationTypesSa { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json */ /** - * Sample code: Get a cluster. + * Sample code: Get a list of application type version resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getACluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters() - .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE); + public static void getAListOfApplicationTypeVersionResources( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applicationTypeVersions() + .listByApplicationTypes("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_List +### ManagedClusters_CreateOrUpdate ```java /** - * Samples for ManagedClusters List. + * Samples for Operations List. */ -public final class ManagedClustersListSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-03-01-preview/OperationsList_example.json */ /** - * Sample code: List managed clusters. + * Sample code: List the operations for the provider. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listManagedClusters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters().list(com.azure.core.util.Context.NONE); + public static void listTheOperationsForTheProvider( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_ListByResourceGroup +### ManagedClusters_Delete ```java /** - * Samples for ManagedClusters ListByResourceGroup. + * Samples for ApplicationTypes Delete. */ -public final class ManagedClustersListByResourceGroupSamples { +public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** - * Sample code: List cluster by resource group. + * Sample code: Delete an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listClusterByResourceGroup( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedClusters().listByResourceGroup("resRg", com.azure.core.util.Context.NONE); + public static void deleteAnApplicationType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applicationTypes().delete("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } } ``` -### ManagedClusters_Update +### ManagedClusters_GetByResourceGroup ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedCluster; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for ManagedClusters Update. + * Samples for OperationStatus Get. */ -public final class ManagedClustersUpdateSamples { - /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPatchOperation_example.json - */ - /** - * Sample code: Patch a managed cluster. - * - * @param manager Entry point to ServiceFabricManagedClustersManager. - */ - public static void patchAManagedCluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - ManagedCluster resource = manager.managedClusters() - .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); - } - - // 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; +public final class OperationStatusGetSamples { + /* + * x-ms-original-file: 2025-03-01-preview/OperationStatusSucceeded_example.json + */ + /** + * Sample code: OK. The request has succeeded. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void okTheRequestHasSucceeded( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.operationStatus() + .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json + */ + /** + * Sample code: Error response describing why the operation failed. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void errorResponseDescribingWhyTheOperationFailed( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.operationStatus() + .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); } } ``` -### ManagedMaintenanceWindowStatuses_Get +### ManagedClusters_List ```java /** - * Samples for ManagedMaintenanceWindowStatuses Get. + * Samples for ManagedClusters Delete. */ -public final class ManagedMaintenanceWindowStatusesGetSamples { +public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json */ /** - * Sample code: Maintenance Window Status. + * Sample code: Delete a cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void maintenanceWindowStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedMaintenanceWindowStatuses() - .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); + public static void deleteACluster( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters().delete("resRg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### ManagedUnsupportedVMSizes_Get +### ManagedClusters_ListByResourceGroup ```java /** - * Samples for ManagedUnsupportedVMSizes Get. + * Samples for NodeTypes Delete. */ -public final class ManagedUnsupportedVMSizesGetSamples { +public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json */ /** - * Sample code: Get unsupported vm sizes. + * Sample code: Delete a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getUnsupportedVmSizes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedUnsupportedVMSizes() - .getWithResponse("eastus", "Standard_B1ls1", com.azure.core.util.Context.NONE); + public static void deleteANodeType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes().delete("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); } } ``` -### ManagedUnsupportedVMSizes_List +### ManagedClusters_Update ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import java.util.Arrays; + /** - * Samples for ManagedUnsupportedVMSizes List. + * Samples for NodeTypes Start. */ -public final class ManagedUnsupportedVMSizesListSamples { +public final class NodeTypesStartSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-03-01-preview/StartNodes_example.json */ /** - * Sample code: List unsupported vm sizes. + * Sample code: Start nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listUnsupportedVmSizes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.managedUnsupportedVMSizes().list("eastus", com.azure.core.util.Context.NONE); + public static void + startNodes(com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .start("resRg", "myCluster", "BE", new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), + com.azure.core.util.Context.NONE); } } ``` -### NodeTypeSkus_List +### ManagedMaintenanceWindowStatuses_Get ```java /** - * Samples for NodeTypeSkus List. + * Samples for ManagedMaintenanceWindowStatuses Get. */ -public final class NodeTypeSkusListSamples { +public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** - * Sample code: List a node type SKUs. + * Sample code: Get Maintenance Window Status. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listANodeTypeSKUs( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypeSkus().list("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); + public static void getMaintenanceWindowStatus( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedMaintenanceWindowStatuses() + .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_CreateOrUpdate +### ManagedUnsupportedVMSizes_Get ```java -import com.azure.core.management.SubResource; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for NodeTypes CreateOrUpdate. + * Samples for Services Get. */ -public final class NodeTypesCreateOrUpdateSamples { +public final class ServicesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json */ /** - * Sample code: Put an stateless node type with temporary disk for service fabric. + * Sample code: Get a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { - manager.nodeTypes() - .define("BE") - .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withVmSize("Standard_DS3") - .withVmImagePublisher("MicrosoftWindowsServer") - .withVmImageOffer("WindowsServer") - .withVmImageSku("2016-Datacenter-Server-Core") - .withVmImageVersion("latest") - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") - .withPublisher("Microsoft.Azure.Geneva") - .withType("GenevaMonitoring") - .withTypeHandlerVersion("2.0") - .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withIsStateless(true) - .withMultiplePlacementGroups(true) - .withEnableEncryptionAtHost(true) - .withUseTempDataDisk(true) - .create(); + public static void getAService( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.services() + .getWithResponse("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); } +} +``` + +### ManagedUnsupportedVMSizes_List +```java +/** + * Samples for ApplicationTypes CreateOrUpdate. + */ +public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json */ /** - * Sample code: Put a node type with maximum parameters. + * Sample code: Put an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putANodeTypeWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { - manager.nodeTypes() - .define("BE-testResourceGroup-testRegion-test") + public static void putAnApplicationType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applicationTypes() + .define("myAppType") .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withDataDiskType(DiskType.PREMIUM_LRS) - .withDataDiskLetter("S") - .withPlacementProperties(mapOf("HasSSD", "true", "NodeColor", "green", "SomeProperty", "5")) - .withCapacities(mapOf("ClientConnections", "65536")) - .withVmSize("Standard_DS3") - .withVmImagePublisher("MicrosoftWindowsServer") - .withVmImageOffer("WindowsServer") - .withVmImageSku("2016-Datacenter-Server-Core") - .withVmImageVersion("latest") - .withVmSecrets(Arrays.asList(new VaultSecretGroup().withSourceVault(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl( - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") - .withCertificateStore("My"))))) - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") - .withPublisher("Microsoft.Azure.Geneva") - .withType("GenevaMonitoring") - .withTypeHandlerVersion("2.0") - .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) - .withForceUpdateTag("v.1.0") - .withEnableAutomaticUpgrade(true) - .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME)))) - .withVmManagedIdentity(new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2"))) - .withIsStateless(true) - .withMultiplePlacementGroups(true) - .withFrontendConfigurations(Arrays.asList(new FrontendConfiguration().withLoadBalancerBackendAddressPoolId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool") - .withLoadBalancerInboundNatPoolId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool") - .withApplicationGatewayBackendAddressPoolId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"))) - .withAdditionalDataDisks(Arrays.asList( - new VmssDataDisk().withLun(1) - .withDiskSizeGB(256) - .withDiskType(DiskType.STANDARD_SSD_LRS) - .withDiskLetter("F"), - new VmssDataDisk().withLun(2) - .withDiskSizeGB(150) - .withDiskType(DiskType.PREMIUM_LRS) - .withDiskLetter("G"))) - .withEnableEncryptionAtHost(true) - .withEnableAcceleratedNetworking(true) - .withUseDefaultPublicLoadBalancer(true) - .withEnableOverProvisioning(false) - .withIsSpotVM(true) - .withUseEphemeralOSDisk(true) - .withSpotRestoreTimeout("PT30M") - .withEvictionPolicy(EvictionPolicyType.DEALLOCATE) - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVmSetupActions(Arrays.asList(VmSetupAction.ENABLE_CONTAINERS, VmSetupAction.ENABLE_HYPERV)) - .withSecurityType(SecurityType.TRUSTED_LAUNCH) - .withSecureBootEnabled(true) - .withEnableNodePublicIp(true) - .withEnableNodePublicIPv6(true) - .withNatGatewayId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway") - .withServiceArtifactReferenceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile") - .withDscpConfigurationId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig") - .withAdditionalNetworkInterfaceConfigurations(Arrays.asList(new AdditionalNetworkInterfaceConfiguration() - .withName("nic-1") - .withEnableAcceleratedNetworking(true) - .withDscpConfiguration(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig")) - .withIpConfigurations(Arrays.asList(new IpConfiguration().withName("ipconfig-1") - .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"))) - .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"))) - .withSubnet(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("publicip-1") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("RoutingPreference").withTag("Internet"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)))))) - .withComputerNamePrefix("BE") + .withRegion("eastus") .create(); } +} +``` + +### NodeTypeSkus_List +```java +/** + * Samples for Applications Delete. + */ +public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json */ /** - * Sample code: Put a node type with auto-scale parameters. + * Sample code: Delete an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putANodeTypeWithAutoScaleParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { - manager.nodeTypes() - .define("BE") - .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(-1) - .withDataDiskSizeGB(200) - .withDataDiskType(DiskType.PREMIUM_LRS) - .withPlacementProperties(mapOf("HasSSD", "true", "NodeColor", "green", "SomeProperty", "5")) - .withCapacities(mapOf("ClientConnections", "65536")) - .withVmSize("Standard_DS3") - .withVmImagePublisher("MicrosoftWindowsServer") - .withVmImageOffer("WindowsServer") - .withVmImageSku("2016-Datacenter-Server-Core") - .withVmImageVersion("latest") - .withVmSecrets(Arrays.asList(new VaultSecretGroup().withSourceVault(new SubResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl( - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") - .withCertificateStore("My"))))) - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") - .withPublisher("Microsoft.Azure.Geneva") - .withType("GenevaMonitoring") - .withTypeHandlerVersion("2.0") - .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withVmManagedIdentity(new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2"))) - .withIsStateless(true) - .withMultiplePlacementGroups(true) - .create(); + public static void deleteAnApplication( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications().delete("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } +} +``` + +### NodeTypes_CreateOrUpdate +```java +/** + * Samples for ManagedUnsupportedVMSizes List. + */ +public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json */ /** - * Sample code: Put a node type with minimum parameters. + * Sample code: List unsupported vm sizes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putANodeTypeWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .define("BE") - .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withVmSize("Standard_D3") - .withVmImagePublisher("MicrosoftWindowsServer") - .withVmImageOffer("WindowsServer") - .withVmImageSku("2016-Datacenter-Server-Core") - .withVmImageVersion("latest") - .create(); + public static void listUnsupportedVmSizes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedUnsupportedVMSizes().list("eastus", com.azure.core.util.Context.NONE); } +} +``` + +### NodeTypes_Deallocate + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; +import java.util.Arrays; +/** + * Samples for NodeTypes Reimage. + */ +public final class NodeTypesReimageSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-03-01-preview/ReimageNodes_example.json */ /** - * Sample code: Put node type with dedicated hosts. + * Sample code: Reimage nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putNodeTypeWithDedicatedHosts( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void reimageNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() - .define("BE") - .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withDataDiskType(DiskType.STANDARD_SSD_LRS) - .withPlacementProperties(mapOf()) - .withCapacities(mapOf()) - .withVmSize("Standard_D8s_v3") - .withVmImagePublisher("MicrosoftWindowsServer") - .withVmImageOffer("WindowsServer") - .withVmImageSku("2019-Datacenter") - .withVmImageVersion("latest") - .withZones(Arrays.asList("1")) - .withHostGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup") - .create(); + .reimage("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json */ /** - * Sample code: Put node type with vm image plan. + * Sample code: Reimage all nodes by upgrade domain. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putNodeTypeWithVmImagePlan( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void reimageAllNodesByUpgradeDomain( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() - .define("BE") - .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withVmSize("Standard_D3") - .withVmImagePublisher("testpublisher") - .withVmImageOffer("windows_2022_test") - .withVmImageSku("win_2022_test_20_10_gen2") - .withVmImageVersion("latest") - .withVmImagePlan(new VmImagePlan().withName("win_2022_test_20_10_gen2") - .withProduct("windows_2022_test") - .withPublisher("testpublisher")) - .create(); + .reimage("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), + com.azure.core.util.Context.NONE); } +} +``` + +### NodeTypes_Delete + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy; +import java.util.HashMap; +import java.util.Map; +/** + * Samples for Applications CreateOrUpdate. + */ +public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json */ /** - * Sample code: Put node type with shared galleries custom vm image. + * Sample code: Put an application with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putNodeTypeWithSharedGalleriesCustomVmImage( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .define("BE") + public static void putAnApplicationWithMaximumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications() + .define("myApp") .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withVmSize("Standard_D3") - .withVmSharedGalleryImageId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest") + .withRegion("eastus") + .withTags(mapOf("a", "b")) + .withVersion( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0") + .withParameters(mapOf("param1", "value1")) + .withUpgradePolicy(new ApplicationUpgradePolicy() + .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(0) + .withDefaultServiceTypeHealthPolicy(new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(0) + .withMaxPercentUnhealthyPartitionsPerService(0) + .withMaxPercentUnhealthyReplicasPerPartition(0)) + .withServiceTypeHealthPolicyMap(mapOf("service1", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(30) + .withMaxPercentUnhealthyPartitionsPerService(30) + .withMaxPercentUnhealthyReplicasPerPartition(30)))) + .withForceRestart(false) + .withRollingUpgradeMonitoringPolicy( + new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) + .withHealthCheckWaitDuration("00:02:00") + .withHealthCheckStableDuration("00:05:00") + .withHealthCheckRetryTimeout("00:10:00") + .withUpgradeTimeout("01:00:00") + .withUpgradeDomainTimeout("00:15:00")) + .withInstanceCloseDelayDuration(600L) + .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) + .withUpgradeReplicaSetCheckTimeout(3600L) + .withRecreateApplication(false)) .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_min.json */ /** - * Sample code: Put node type with custom vm image. + * Sample code: Put an application with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putNodeTypeWithCustomVmImage( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .define("BE") + public static void putAnApplicationWithMinimumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications() + .define("myApp") .withExistingManagedCluster("resRg", "myCluster") - .withIsPrimary(false) - .withVmInstanceCount(10) - .withDataDiskSizeGB(200) - .withVmSize("Standard_D3") - .withVmImageResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC") + .withRegion("eastus") + .withVersion( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0") .create(); } @@ -1624,429 +1414,602 @@ public final class NodeTypesCreateOrUpdateSamples { } ``` -### NodeTypes_Delete +### NodeTypes_DeleteNode ```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import java.util.Arrays; + /** - * Samples for NodeTypes Delete. + * Samples for NodeTypes DeleteNode. */ -public final class NodeTypesDeleteSamples { +public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json */ /** - * Sample code: Delete a node type. + * Sample code: Delete nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void deleteANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes().delete("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); + public static void deleteNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .deleteNode("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), + com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_DeleteNode +### NodeTypes_Get + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedCluster; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusters Update. + */ +public final class ManagedClustersUpdateSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + */ + /** + * Sample code: Patch a managed cluster. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void patchAManagedCluster( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + ManagedCluster resource = manager.managedClusters() + .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("a", "b")).apply(); + } + + // 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; + } +} +``` + +### NodeTypes_ListByManagedClusters ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; import java.util.Arrays; /** - * Samples for NodeTypes DeleteNode. + * Samples for NodeTypes Deallocate. */ -public final class NodeTypesDeleteNodeSamples { +public final class NodeTypesDeallocateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * DeleteNodes_example.json + * x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json */ /** - * Sample code: Delete nodes. + * Sample code: Deallocate nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void deleteNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void deallocateNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() - .deleteNode("resRg", "myCluster", "BE", - new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), + .deallocate("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_Get +### NodeTypes_Redeploy + +```java +/** + * Samples for ManagedClusters ListByResourceGroup. + */ +public final class ManagedClustersListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + */ + /** + * Sample code: List cluster by resource group. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void listClusterByResourceGroup( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters().listByResourceGroup("resRg", com.azure.core.util.Context.NONE); + } +} +``` + +### NodeTypes_Reimage + +```java +/** + * Samples for Applications ReadUpgrade. + */ +public final class ApplicationsReadUpgradeSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json + */ + /** + * Sample code: Get an application upgrade. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void getAnApplicationUpgrade( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications().readUpgrade("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); + } +} +``` + +### NodeTypes_Restart ```java /** - * Samples for NodeTypes Get. + * Samples for ManagedClusterVersion Get. */ -public final class NodeTypesGetSamples { +public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json */ /** - * Sample code: Get a node type. + * Sample code: Get cluster version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes().getWithResponse("resRg", "myCluster", "FE", com.azure.core.util.Context.NONE); + public static void getClusterVersion( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusterVersions().getWithResponse("eastus", "7.2.477.9590", com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_ListByManagedClusters +### NodeTypes_Start ```java /** - * Samples for NodeTypes ListByManagedClusters. + * Samples for NodeTypeSkus List. */ -public final class NodeTypesListByManagedClustersSamples { +public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json */ /** - * Sample code: List node type of the specified managed cluster. + * Sample code: List a node type SKUs. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listNodeTypeOfTheSpecifiedManagedCluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes().listByManagedClusters("resRg", "myCluster", com.azure.core.util.Context.NONE); + public static void listANodeTypeSKUs( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypeSkus().list("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_Reimage +### NodeTypes_Update ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; -import java.util.Arrays; - /** - * Samples for NodeTypes Reimage. + * Samples for ManagedUnsupportedVMSizes Get. */ -public final class NodeTypesReimageSamples { +public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ReimageNodes_example.json + * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json */ /** - * Sample code: Reimage nodes. + * Sample code: Get unsupported vm sizes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void reimageNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .reimage("resRg", "myCluster", "BE", - new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), - com.azure.core.util.Context.NONE); + public static void getUnsupportedVmSizes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedUnsupportedVMSizes() + .getWithResponse("eastus", "Standard_B1ls1", com.azure.core.util.Context.NONE); } +} +``` + +### OperationResults_Get +```java +/** + * Samples for ManagedClusters GetByResourceGroup. + */ +public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ReimageNodes_UD_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json */ /** - * Sample code: Reimage all nodes By upgrade domain. + * Sample code: Get a cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void reimageAllNodesByUpgradeDomain( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .reimage("resRg", "myCluster", "BE", - new NodeTypeActionParameters().withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), - com.azure.core.util.Context.NONE); + public static void getACluster( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusters() + .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_Restart +### OperationStatus_Get ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import java.util.Arrays; - /** - * Samples for NodeTypes Restart. + * Samples for Applications List. */ -public final class NodeTypesRestartSamples { +public final class ApplicationsListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * RestartNodes_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json */ /** - * Sample code: Restart nodes. + * Sample code: Get a list of application resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void restartNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.nodeTypes() - .restart("resRg", "myCluster", "BE", - new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), - com.azure.core.util.Context.NONE); + public static void getAListOfApplicationResources( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applications().list("resRg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### NodeTypes_Update +### Operations_List ```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeType; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku; +import com.azure.core.management.SubResource; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPConfigurationPublicIPAddressConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIPAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIPAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtension; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for NodeTypes Update. + * Samples for NodeTypes CreateOrUpdate. */ -public final class NodeTypesUpdateSamples { +public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationStateless_example.json */ /** - * Sample code: Patch a node type. + * Sample code: Put an stateless node type with temporary disk for service fabric. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void patchANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - NodeType resource = manager.nodeTypes() - .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("a", "b")).apply(); + public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withVmSize("Standard_DS3") + .withVmImagePublisher("MicrosoftWindowsServer") + .withVmImageOffer("WindowsServer") + .withVmImageSku("2016-Datacenter-Server-Core") + .withVmImageVersion("latest") + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withPublisher("Microsoft.Azure.Geneva") + .withType("GenevaMonitoring") + .withTypeHandlerVersion("2.0") + .withAutoUpgradeMinorVersion(true) + .withSettings(new VMSSExtensionPropertiesSettings()))) + .withIsStateless(true) + .withMultiplePlacementGroups(true) + .withEnableEncryptionAtHost(true) + .withUseTempDataDisk(true) + .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_max.json */ /** - * Sample code: Patch a node type while auto-scaling. + * Sample code: Put a node type with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void patchANodeTypeWhileAutoScaling( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - NodeType resource = manager.nodeTypes() - .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("a", "b")) - .withSku(new NodeTypeSku().withName("Standard_S0").withTier("Standard").withCapacity(10)) - .apply(); - } - - // 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; + public static void putANodeTypeWithMaximumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE-testResourceGroup-testRegion-test") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withDataDiskType(DiskType.PREMIUM_LRS) + .withDataDiskLetter("S") + .withPlacementProperties(mapOf("HasSSD", "true", "NodeColor", "green", "SomeProperty", "5")) + .withCapacities(mapOf("ClientConnections", "65536")) + .withVmSize("Standard_DS3") + .withVmImagePublisher("MicrosoftWindowsServer") + .withVmImageOffer("WindowsServer") + .withVmImageSku("2016-Datacenter-Server-Core") + .withVmImageVersion("latest") + .withVmSecrets(Arrays.asList(new VaultSecretGroup().withSourceVault(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault")) + .withVaultCertificates(Arrays.asList(new VaultCertificate() + .withCertificateUrl( + "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") + .withCertificateStore("My"))))) + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withPublisher("Microsoft.Azure.Geneva") + .withType("GenevaMonitoring") + .withTypeHandlerVersion("2.0") + .withAutoUpgradeMinorVersion(true) + .withSettings(new VMSSExtensionPropertiesSettings()) + .withForceUpdateTag("v.1.0") + .withEnableAutomaticUpgrade(true) + .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME)))) + .withVmManagedIdentity(new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2"))) + .withIsStateless(true) + .withMultiplePlacementGroups(true) + .withFrontendConfigurations(Arrays.asList(new FrontendConfiguration().withLoadBalancerBackendAddressPoolId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool") + .withLoadBalancerInboundNatPoolId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool") + .withApplicationGatewayBackendAddressPoolId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"))) + .withAdditionalDataDisks(Arrays.asList( + new VmssDataDisk().withLun(1) + .withDiskSizeGB(256) + .withDiskType(DiskType.STANDARD_SSD_LRS) + .withDiskLetter("F"), + new VmssDataDisk().withLun(2) + .withDiskSizeGB(150) + .withDiskType(DiskType.PREMIUM_LRS) + .withDiskLetter("G"))) + .withEnableEncryptionAtHost(true) + .withEnableAcceleratedNetworking(true) + .withUseDefaultPublicLoadBalancer(true) + .withEnableOverProvisioning(false) + .withIsSpotVM(true) + .withUseEphemeralOSDisk(true) + .withSpotRestoreTimeout("PT30M") + .withEvictionPolicy(EvictionPolicyType.DEALLOCATE) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVmSetupActions(Arrays.asList(VmSetupAction.ENABLE_CONTAINERS, VmSetupAction.ENABLE_HYPERV)) + .withSecurityType(SecurityType.TRUSTED_LAUNCH) + .withSecureBootEnabled(true) + .withEnableNodePublicIP(true) + .withEnableNodePublicIPv6(true) + .withNatGatewayId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway") + .withServiceArtifactReferenceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile") + .withDscpConfigurationId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig") + .withAdditionalNetworkInterfaceConfigurations(Arrays.asList(new AdditionalNetworkInterfaceConfiguration() + .withName("nic-1") + .withEnableAcceleratedNetworking(true) + .withDscpConfiguration(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig")) + .withIpConfigurations(Arrays.asList(new IpConfiguration().withName("ipconfig-1") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"))) + .withSubnet(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")) + .withPrivateIPAddressVersion(PrivateIPAddressVersion.IPV4) + .withPublicIPAddressConfiguration(new IPConfigurationPublicIPAddressConfiguration() + .withName("publicip-1") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("RoutingPreference").withTag("Internet"))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV4)))))) + .withComputerNamePrefix("BE") + .withVmApplications(Arrays.asList(new VmApplication() + .withConfigurationReference("https://mystorageaccount.blob.core.windows.net/containername/blobname") + .withEnableAutomaticUpgrade(true) + .withOrder(1) + .withPackageReferenceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0") + .withVmGalleryTags("{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}") + .withTreatFailureAsDeploymentFailure(false))) + .create(); } -} -``` - -### OperationResults_Get -```java -/** - * Samples for OperationResults Get. - */ -public final class OperationResultsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_result.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json */ /** - * Sample code: Get operation result. + * Sample code: Put a node type with auto-scale parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getOperationResult( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.operationResults() - .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); + public static void putANodeTypeWithAutoScaleParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(-1) + .withDataDiskSizeGB(200) + .withDataDiskType(DiskType.PREMIUM_LRS) + .withPlacementProperties(mapOf("HasSSD", "true", "NodeColor", "green", "SomeProperty", "5")) + .withCapacities(mapOf("ClientConnections", "65536")) + .withVmSize("Standard_DS3") + .withVmImagePublisher("MicrosoftWindowsServer") + .withVmImageOffer("WindowsServer") + .withVmImageSku("2016-Datacenter-Server-Core") + .withVmImageVersion("latest") + .withVmSecrets(Arrays.asList(new VaultSecretGroup().withSourceVault(new SubResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault")) + .withVaultCertificates(Arrays.asList(new VaultCertificate() + .withCertificateUrl( + "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") + .withCertificateStore("My"))))) + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withPublisher("Microsoft.Azure.Geneva") + .withType("GenevaMonitoring") + .withTypeHandlerVersion("2.0") + .withAutoUpgradeMinorVersion(true) + .withSettings(new VMSSExtensionPropertiesSettings()))) + .withVmManagedIdentity(new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2"))) + .withIsStateless(true) + .withMultiplePlacementGroups(true) + .create(); } -} -``` - -### OperationStatus_Get -```java -/** - * Samples for OperationStatus Get. - */ -public final class OperationStatusGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_status_succeeded.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_min.json */ /** - * Sample code: Get succeeded operation result. + * Sample code: Put a node type with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getSucceededOperationResult( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.operationStatus() - .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); + public static void putANodeTypeWithMinimumParameters( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withVmSize("Standard_D3") + .withVmImagePublisher("MicrosoftWindowsServer") + .withVmImageOffer("WindowsServer") + .withVmImageSku("2016-Datacenter-Server-Core") + .withVmImageVersion("latest") + .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_status_failed.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** - * Sample code: Get failed operation status. + * Sample code: Put node type with dedicated hosts. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getFailedOperationStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.operationStatus() - .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); + public static void putNodeTypeWithDedicatedHosts( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withDataDiskType(DiskType.STANDARD_SSD_LRS) + .withPlacementProperties(mapOf()) + .withCapacities(mapOf()) + .withVmSize("Standard_D8s_v3") + .withVmImagePublisher("MicrosoftWindowsServer") + .withVmImageOffer("WindowsServer") + .withVmImageSku("2019-Datacenter") + .withVmImageVersion("latest") + .withZones(Arrays.asList("1")) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup") + .create(); } -} -``` -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Operations_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** - * Sample code: List available operations. + * Sample code: Put node type with vm image plan. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listAvailableOperations( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void putNodeTypeWithVmImagePlan( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withVmSize("Standard_D3") + .withVmImagePublisher("testpublisher") + .withVmImageOffer("windows_2022_test") + .withVmImageSku("win_2022_test_20_10_gen2") + .withVmImageVersion("latest") + .withVmImagePlan(new VmImagePlan().withName("win_2022_test_20_10_gen2") + .withProduct("windows_2022_test") + .withPublisher("testpublisher")) + .create(); } -} -``` - -### Services_CreateOrUpdate - -```java -import com.azure.resourcemanager.servicefabricmanagedclusters.models.AveragePartitionLoadScalingTrigger; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PartitionInstanceCountScaleMechanism; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementNonPartiallyPlaceServicePolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.SingletonPartitionScheme; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.StatelessServiceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -/** - * Samples for Services CreateOrUpdate. - */ -public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** - * Sample code: Put a service with minimum parameters. + * Sample code: Put node type with shared galleries custom vm image. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAServiceWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.services() - .define("myService") - .withExistingApplication("resRg", "myCluster", "myApp") - .withRegion("eastus") - .withProperties(new StatelessServiceProperties().withServiceTypeName("myServiceType") - .withPartitionDescription(new SingletonPartitionScheme()) - .withInstanceCount(1)) + public static void putNodeTypeWithSharedGalleriesCustomVmImage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withVmSize("Standard_D3") + .withVmSharedGalleryImageId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest") .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json */ /** - * Sample code: Put a service with maximum parameters. + * Sample code: Put node type with custom vm image. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void putAServiceWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.services() - .define("myService") - .withExistingApplication("resRg", "myCluster", "myApp") - .withRegion("eastus") - .withTags(mapOf("a", "b")) - .withProperties(new StatelessServiceProperties().withPlacementConstraints("NodeType==frontend") - .withCorrelationScheme(Arrays.asList(new ServiceCorrelation() - .withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1"))) - .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("metric1") - .withWeight(ServiceLoadMetricWeight.LOW) - .withDefaultLoad(3))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementNonPartiallyPlaceServicePolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) - .withScalingPolicies(Arrays.asList(new ScalingPolicy() - .withScalingMechanism(new PartitionInstanceCountScaleMechanism().withMinInstanceCount(3) - .withMaxInstanceCount(9) - .withScaleIncrement(2)) - .withScalingTrigger(new AveragePartitionLoadScalingTrigger().withMetricName("metricName") - .withLowerLoadThreshold(2.0) - .withUpperLoadThreshold(8.0) - .withScaleInterval("00:01:00")))) - .withServiceTypeName("myServiceType") - .withPartitionDescription(new SingletonPartitionScheme()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("myservicednsname.myApp") - .withInstanceCount(5) - .withMinInstanceCount(3) - .withMinInstancePercentage(30)) + public static void putNodeTypeWithCustomVmImage( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .define("BE") + .withExistingManagedCluster("resRg", "myCluster") + .withIsPrimary(false) + .withVmInstanceCount(10) + .withDataDiskSizeGB(200) + .withVmSize("Standard_D3") + .withVmImageResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC") .create(); } @@ -2064,80 +2027,74 @@ public final class ServicesCreateOrUpdateSamples { } ``` -### Services_Delete +### Services_CreateOrUpdate ```java /** - * Samples for Services Delete. + * Samples for NodeTypes ListByManagedClusters. */ -public final class ServicesDeleteSamples { +public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json */ /** - * Sample code: Delete a service. + * Sample code: List node type of the specified managed cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void deleteAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.services().delete("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); + public static void listNodeTypeOfTheSpecifiedManagedCluster( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes().listByManagedClusters("resRg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### Services_Get +### Services_Delete ```java /** - * Samples for Services Get. + * Samples for ApplicationTypes Get. */ -public final class ServicesGetSamples { +public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json */ /** - * Sample code: Get a service. + * Sample code: Get an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.services() - .getWithResponse("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); + public static void getAnApplicationType( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.applicationTypes().getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } } ``` -### Services_ListByApplications +### Services_Get ```java /** - * Samples for Services ListByApplications. + * Samples for ManagedAzResiliencyStatuses Get. */ -public final class ServicesListByApplicationsSamples { +public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json */ /** - * Sample code: Get a list of service resources. + * Sample code: Az Resiliency status of Base Resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getAListOfServiceResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { - manager.services().listByApplications("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); + public static void azResiliencyStatusOfBaseResources( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedAzResiliencyStatuses() + .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } } ``` -### Services_Update +### Services_ListByApplications ```java import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResource; @@ -2149,17 +2106,15 @@ import java.util.Map; */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ServiceResource resource = manager.services() .getWithResponse("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE) .getValue(); @@ -2180,3 +2135,29 @@ public final class ServicesUpdateSamples { } ``` +### Services_Update + +```java +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterVersionEnvironment; + +/** + * Samples for ManagedClusterVersion ListByEnvironment. + */ +public final class ManagedClusterVersionListByEnvironmentSamples { + /* + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + */ + /** + * Sample code: List cluster versions by environment. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void listClusterVersionsByEnvironment( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.managedClusterVersions() + .listByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, + com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml index 34864c6943f1..a8ea9ddf6d28 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.1.0-beta.1 jar - Microsoft Azure SDK for Service Fabric Managed Clusters Management - This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package tag package-2024-04. + Microsoft Azure SDK for servicefabricmanagedclusters Management + This package contains Microsoft Azure SDK for servicefabricmanagedclusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServicefabricmanagedclustersManager.java similarity index 90% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServicefabricmanagedclustersManager.java index 0bbce1c7b350..ed7be634997d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServiceFabricManagedClustersManager.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/ServicefabricmanagedclustersManager.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.servicefabricmanagedclusters; @@ -22,8 +22,9 @@ import com.azure.core.http.policy.UserAgentPolicy; 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.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricClient; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ApplicationTypeVersionsImpl; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ApplicationTypesImpl; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ApplicationsImpl; @@ -38,7 +39,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.OperationResultsImpl; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.OperationStatusImpl; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.OperationsImpl; -import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricManagedClustersMgmtClientBuilder; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServiceFabricClientBuilder; import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.ServicesImpl; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersions; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypes; @@ -59,51 +60,52 @@ 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 ServiceFabricManagedClustersManager. + * Entry point to ServicefabricmanagedclustersManager. * Service Fabric Managed Clusters Management Client. */ -public final class ServiceFabricManagedClustersManager { +public final class ServicefabricmanagedclustersManager { + private Operations operations; + + private Applications applications; + private ApplicationTypes applicationTypes; private ApplicationTypeVersions applicationTypeVersions; - private Applications applications; - private Services services; + private ManagedClusterVersions managedClusterVersions; + + private ManagedUnsupportedVMSizes managedUnsupportedVMSizes; + private ManagedClusters managedClusters; private ManagedAzResiliencyStatuses managedAzResiliencyStatuses; - private ManagedMaintenanceWindowStatuses managedMaintenanceWindowStatuses; - private ManagedApplyMaintenanceWindows managedApplyMaintenanceWindows; - private ManagedClusterVersions managedClusterVersions; + private ManagedMaintenanceWindowStatuses managedMaintenanceWindowStatuses; - private ManagedUnsupportedVMSizes managedUnsupportedVMSizes; + private NodeTypes nodeTypes; - private OperationStatus operationStatus; + private NodeTypeSkus nodeTypeSkus; private OperationResults operationResults; - private Operations operations; - - private NodeTypes nodeTypes; - - private NodeTypeSkus nodeTypeSkus; + private OperationStatus operationStatus; - private final ServiceFabricManagedClustersMgmtClient clientObject; + private final ServiceFabricClient clientObject; - private ServiceFabricManagedClustersManager(HttpPipeline httpPipeline, AzureProfile profile, + private ServicefabricmanagedclustersManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new ServiceFabricManagedClustersMgmtClientBuilder().pipeline(httpPipeline) + this.clientObject = new ServiceFabricClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -111,39 +113,39 @@ private ServiceFabricManagedClustersManager(HttpPipeline httpPipeline, AzureProf } /** - * Creates an instance of Service Fabric Managed Clusters service API entry point. + * Creates an instance of servicefabricmanagedclusters service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Service Fabric Managed Clusters service API instance. + * @return the servicefabricmanagedclusters service API instance. */ - public static ServiceFabricManagedClustersManager authenticate(TokenCredential credential, AzureProfile profile) { + public static ServicefabricmanagedclustersManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); return configure().authenticate(credential, profile); } /** - * Creates an instance of Service Fabric Managed Clusters service API entry point. + * Creates an instance of servicefabricmanagedclusters service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the Service Fabric Managed Clusters service API instance. + * @return the servicefabricmanagedclusters service API instance. */ - public static ServiceFabricManagedClustersManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + public static ServicefabricmanagedclustersManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ServiceFabricManagedClustersManager(httpPipeline, profile, null); + return new ServicefabricmanagedclustersManager(httpPipeline, profile, null); } /** - * Gets a Configurable instance that can be used to create ServiceFabricManagedClustersManager with optional + * Gets a Configurable instance that can be used to create ServicefabricmanagedclustersManager with optional * configuration. * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { - return new ServiceFabricManagedClustersManager.Configurable(); + return new ServicefabricmanagedclustersManager.Configurable(); } /** @@ -151,6 +153,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-servicefabricmanagedclusters.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -248,22 +253,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of Service Fabric Managed Clusters service API entry point. + * Creates an instance of servicefabricmanagedclusters service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the Service Fabric Managed Clusters service API instance. + * @return the servicefabricmanagedclusters service API instance. */ - public ServiceFabricManagedClustersManager authenticate(TokenCredential credential, AzureProfile profile) { + public ServicefabricmanagedclustersManager 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.servicefabricmanagedclusters") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -305,8 +312,32 @@ public ServiceFabricManagedClustersManager authenticate(TokenCredential credenti HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) .policies(policies.toArray(new HttpPipelinePolicy[0])) .build(); - return new ServiceFabricManagedClustersManager(httpPipeline, profile, defaultPollInterval); + return new ServicefabricmanagedclustersManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of Applications. It manages ApplicationResource. + * + * @return Resource collection API of Applications. + */ + public Applications applications() { + if (this.applications == null) { + this.applications = new ApplicationsImpl(clientObject.getApplications(), this); } + return applications; } /** @@ -334,18 +365,6 @@ public ApplicationTypeVersions applicationTypeVersions() { return applicationTypeVersions; } - /** - * Gets the resource collection API of Applications. It manages ApplicationResource. - * - * @return Resource collection API of Applications. - */ - public Applications applications() { - if (this.applications == null) { - this.applications = new ApplicationsImpl(clientObject.getApplications(), this); - } - return applications; - } - /** * Gets the resource collection API of Services. It manages ServiceResource. * @@ -358,6 +377,32 @@ public Services services() { return services; } + /** + * Gets the resource collection API of ManagedClusterVersions. + * + * @return Resource collection API of ManagedClusterVersions. + */ + public ManagedClusterVersions managedClusterVersions() { + if (this.managedClusterVersions == null) { + this.managedClusterVersions + = new ManagedClusterVersionsImpl(clientObject.getManagedClusterVersions(), this); + } + return managedClusterVersions; + } + + /** + * Gets the resource collection API of ManagedUnsupportedVMSizes. + * + * @return Resource collection API of ManagedUnsupportedVMSizes. + */ + public ManagedUnsupportedVMSizes managedUnsupportedVMSizes() { + if (this.managedUnsupportedVMSizes == null) { + this.managedUnsupportedVMSizes + = new ManagedUnsupportedVMSizesImpl(clientObject.getManagedUnsupportedVMSizes(), this); + } + return managedUnsupportedVMSizes; + } + /** * Gets the resource collection API of ManagedClusters. It manages ManagedCluster. * @@ -383,19 +428,6 @@ public ManagedAzResiliencyStatuses managedAzResiliencyStatuses() { return managedAzResiliencyStatuses; } - /** - * Gets the resource collection API of ManagedMaintenanceWindowStatuses. - * - * @return Resource collection API of ManagedMaintenanceWindowStatuses. - */ - public ManagedMaintenanceWindowStatuses managedMaintenanceWindowStatuses() { - if (this.managedMaintenanceWindowStatuses == null) { - this.managedMaintenanceWindowStatuses - = new ManagedMaintenanceWindowStatusesImpl(clientObject.getManagedMaintenanceWindowStatuses(), this); - } - return managedMaintenanceWindowStatuses; - } - /** * Gets the resource collection API of ManagedApplyMaintenanceWindows. * @@ -410,41 +442,40 @@ public ManagedApplyMaintenanceWindows managedApplyMaintenanceWindows() { } /** - * Gets the resource collection API of ManagedClusterVersions. + * Gets the resource collection API of ManagedMaintenanceWindowStatuses. * - * @return Resource collection API of ManagedClusterVersions. + * @return Resource collection API of ManagedMaintenanceWindowStatuses. */ - public ManagedClusterVersions managedClusterVersions() { - if (this.managedClusterVersions == null) { - this.managedClusterVersions - = new ManagedClusterVersionsImpl(clientObject.getManagedClusterVersions(), this); + public ManagedMaintenanceWindowStatuses managedMaintenanceWindowStatuses() { + if (this.managedMaintenanceWindowStatuses == null) { + this.managedMaintenanceWindowStatuses + = new ManagedMaintenanceWindowStatusesImpl(clientObject.getManagedMaintenanceWindowStatuses(), this); } - return managedClusterVersions; + return managedMaintenanceWindowStatuses; } /** - * Gets the resource collection API of ManagedUnsupportedVMSizes. + * Gets the resource collection API of NodeTypes. It manages NodeType. * - * @return Resource collection API of ManagedUnsupportedVMSizes. + * @return Resource collection API of NodeTypes. */ - public ManagedUnsupportedVMSizes managedUnsupportedVMSizes() { - if (this.managedUnsupportedVMSizes == null) { - this.managedUnsupportedVMSizes - = new ManagedUnsupportedVMSizesImpl(clientObject.getManagedUnsupportedVMSizes(), this); + public NodeTypes nodeTypes() { + if (this.nodeTypes == null) { + this.nodeTypes = new NodeTypesImpl(clientObject.getNodeTypes(), this); } - return managedUnsupportedVMSizes; + return nodeTypes; } /** - * Gets the resource collection API of OperationStatus. + * Gets the resource collection API of NodeTypeSkus. * - * @return Resource collection API of OperationStatus. + * @return Resource collection API of NodeTypeSkus. */ - public OperationStatus operationStatus() { - if (this.operationStatus == null) { - this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this); + public NodeTypeSkus nodeTypeSkus() { + if (this.nodeTypeSkus == null) { + this.nodeTypeSkus = new NodeTypeSkusImpl(clientObject.getNodeTypeSkus(), this); } - return operationStatus; + return nodeTypeSkus; } /** @@ -460,48 +491,24 @@ public OperationResults operationResults() { } /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of NodeTypes. It manages NodeType. - * - * @return Resource collection API of NodeTypes. - */ - public NodeTypes nodeTypes() { - if (this.nodeTypes == null) { - this.nodeTypes = new NodeTypesImpl(clientObject.getNodeTypes(), this); - } - return nodeTypes; - } - - /** - * Gets the resource collection API of NodeTypeSkus. + * Gets the resource collection API of OperationStatus. * - * @return Resource collection API of NodeTypeSkus. + * @return Resource collection API of OperationStatus. */ - public NodeTypeSkus nodeTypeSkus() { - if (this.nodeTypeSkus == null) { - this.nodeTypeSkus = new NodeTypeSkusImpl(clientObject.getNodeTypeSkus(), this); + public OperationStatus operationStatus() { + if (this.operationStatus == null) { + this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this); } - return nodeTypeSkus; + return operationStatus; } /** - * Gets wrapped service client ServiceFabricManagedClustersMgmtClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client ServiceFabricClient providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. * - * @return Wrapped service client ServiceFabricManagedClustersMgmtClient. + * @return Wrapped service client ServiceFabricClient. */ - public ServiceFabricManagedClustersMgmtClient serviceClient() { + public ServiceFabricClient serviceClient() { return this.clientObject; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java index 33748ad64ed0..e8d5aa445553 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypeVersionsClient.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.servicefabricmanagedclusters.fluent; @@ -19,12 +19,10 @@ */ public interface ApplicationTypeVersionsClient { /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -40,12 +38,10 @@ Response getWithResponse(String resourceGro String applicationTypeName, String version, Context context); /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -60,11 +56,9 @@ ApplicationTypeVersionResourceInner get(String resourceGroupName, String cluster String version); /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -81,11 +75,9 @@ ApplicationTypeVersionResourceInner get(String resourceGroupName, String cluster ApplicationTypeVersionResourceInner parameters); /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -103,11 +95,9 @@ ApplicationTypeVersionResourceInner get(String resourceGroupName, String cluster ApplicationTypeVersionResourceInner parameters, Context context); /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -122,11 +112,9 @@ ApplicationTypeVersionResourceInner createOrUpdate(String resourceGroupName, Str String applicationTypeName, String version, ApplicationTypeVersionResourceInner parameters); /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -144,7 +132,7 @@ ApplicationTypeVersionResourceInner createOrUpdate(String resourceGroupName, Str /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -163,7 +151,7 @@ Response updateWithResponse(String resource /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -178,11 +166,9 @@ ApplicationTypeVersionResourceInner update(String resourceGroupName, String clus String version, ApplicationTypeVersionUpdateParameters parameters); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -196,11 +182,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String applicationTypeName, String version); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -215,11 +199,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String applicationTypeName, String version, Context context); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -231,11 +213,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -249,13 +229,10 @@ void delete(String resourceGroupName, String clusterName, String applicationType Context context); /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -269,13 +246,10 @@ PagedIterable listByApplicationTypes(String String clusterName, String applicationTypeName); /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java index 7f9e1d0bc7a7..6f48e6365659 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationTypesClient.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.servicefabricmanagedclusters.fluent; @@ -19,12 +19,10 @@ */ public interface ApplicationTypesClient { /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -39,12 +37,10 @@ Response getWithResponse(String resourceGroupName, String applicationTypeName, Context context); /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,11 +53,9 @@ Response getWithResponse(String resourceGroupName, ApplicationTypeResourceInner get(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -76,11 +70,9 @@ Response createOrUpdateWithResponse(String resourc String applicationTypeName, ApplicationTypeResourceInner parameters, Context context); /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -96,7 +88,7 @@ ApplicationTypeResourceInner createOrUpdate(String resourceGroupName, String clu /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -113,7 +105,7 @@ Response updateWithResponse(String resourceGroupNa /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -127,11 +119,9 @@ ApplicationTypeResourceInner update(String resourceGroupName, String clusterName ApplicationTypeUpdateParameters parameters); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,11 +134,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String applicationTypeName); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -162,11 +150,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String applicationTypeName, Context context); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,11 +163,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -193,13 +177,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -211,13 +192,10 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String PagedIterable list(String resourceGroupName, String clusterName); /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java index 586148cae3f3..c02bb0eceb0d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ApplicationsClient.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.servicefabricmanagedclusters.fluent; @@ -20,174 +20,160 @@ */ public interface ApplicationsClient { /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 {@link SyncPoller} for polling of the status of the latest application upgrade. + * @return a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, - String applicationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String applicationName, Context context); /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 {@link SyncPoller} for polling of the status of the latest application upgrade. + * @return a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, - String applicationName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner get(String resourceGroupName, String clusterName, String applicationName); /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void readUpgrade(String resourceGroupName, String clusterName, String applicationName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters); /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link SyncPoller} for polling of the application resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, + Context context); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link SyncPoller} for polling of long-running operation. + * @return the application resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, - String applicationName); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, + ApplicationResourceInner parameters); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link SyncPoller} for polling of long-running operation. + * @return the application resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, - String applicationName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, + ApplicationResourceInner parameters, Context context); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application resource updated tags. + * @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 application resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startRollback(String resourceGroupName, String clusterName, String applicationName); + Response updateWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters, Context context); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param context The context to associate with this operation. + * @param parameters The application resource updated tags. * @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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String applicationName); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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. @@ -195,290 +181,256 @@ SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String applicationName, + Context context); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters); + void delete(String resourceGroupName, String clusterName, String applicationName); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters, Context context); + void delete(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource along with {@link Response}. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, - String applicationName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationResourceInner get(String resourceGroupName, String clusterName, String applicationName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application 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 {@link SyncPoller} for polling of the application resource. + * @return the {@link SyncPoller} for polling of the status of the latest application upgrade. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters); + SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, + String applicationName); /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application 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 {@link SyncPoller} for polling of the application resource. + * @return the {@link SyncPoller} for polling of the status of the latest application upgrade. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, - Context context); + SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, + String applicationName, Context context); /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, - ApplicationResourceInner parameters); + void readUpgrade(String resourceGroupName, String clusterName, String applicationName); /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, - ApplicationResourceInner parameters, Context context); + void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Updates the tags of an application resource of a given managed cluster. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. - * @param context The context to associate with this operation. + * @param parameters The parameters for resuming an application upgrade. * @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 application resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String clusterName, - String applicationName, ApplicationUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters); /** - * Updates the tags of an application resource of a given managed cluster. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. + * @param parameters The parameters for resuming an application upgrade. + * @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 application resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, - ApplicationUpdateParameters parameters); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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 long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String applicationName); + @ServiceMethod(returns = ReturnType.SINGLE) + void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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 long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String applicationName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters, Context context); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String applicationName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, + String applicationName); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String applicationName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, + String applicationName, Context context); /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + void startRollback(String resourceGroupName, String clusterName, String applicationName); /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java index cd88930a48f4..4d8e3eace9c3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedApplyMaintenanceWindowsClient.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.servicefabricmanagedclusters.fluent; @@ -17,7 +17,7 @@ public interface ManagedApplyMaintenanceWindowsClient { * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,7 +32,7 @@ public interface ManagedApplyMaintenanceWindowsClient { * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java index 49536f850ae9..4b0dfb5c2293 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedAzResiliencyStatusesClient.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.servicefabricmanagedclusters.fluent; @@ -17,7 +17,7 @@ public interface ManagedAzResiliencyStatusesClient { /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +33,7 @@ Response getWithResponse(String resourceGroupNam /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java index 6f265cb5be00..6b93dab343bf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClusterVersionsClient.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.servicefabricmanagedclusters.fluent; @@ -27,7 +27,9 @@ public interface ManagedClusterVersionsClient { * @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 information about an available Service Fabric managed cluster code version along with {@link Response}. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String location, String clusterVersion, @@ -43,75 +45,85 @@ Response getWithResponse(String location, * @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 information about an available Service Fabric managed cluster code version. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version. */ @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterCodeVersionResultInner get(String location, String clusterVersion); /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByEnvironmentWithResponse(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion, Context context); + Response> listWithResponse(String location, Context context); /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedClusterCodeVersionResultInner getByEnvironment(String location, ManagedClusterVersionEnvironment environment, - String clusterVersion); + List list(String location); /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location along with {@link Response}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse(String location, Context context); + Response getByEnvironmentWithResponse(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion, Context context); /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - List list(String location); + ManagedClusterCodeVersionResultInner getByEnvironment(String location, ManagedClusterVersionEnvironment environment, + String clusterVersion); /** * Gets the list of Service Fabric cluster code versions available for the specified environment. @@ -119,13 +131,14 @@ ManagedClusterCodeVersionResultInner getByEnvironment(String location, ManagedCl * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response> listByEnvironmentWithResponse(String location, @@ -137,11 +150,13 @@ Response> listByEnvironmentWithRespon * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment. */ @ServiceMethod(returns = ReturnType.SINGLE) List listByEnvironment(String location, diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java index 2388e03a03a7..f1f196c6f690 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedClustersClient.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.servicefabricmanagedclusters.fluent; @@ -11,7 +11,10 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters; /** @@ -19,71 +22,10 @@ */ public interface ManagedClustersClient { /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 all Service Fabric cluster resources created or in the process of being created in the resource group as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * - * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 all Service Fabric cluster resources created or in the process of being created in the resource group as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * - * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the subscription as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * - * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the subscription as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Gets a Service Fabric managed cluster resource. - * * Get a Service Fabric managed cluster resource created or in the process of being created in the specified * resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,12 +39,10 @@ Response getByResourceGroupWithResponse(String resourceGrou Context context); /** - * Gets a Service Fabric managed cluster resource. - * * Get a Service Fabric managed cluster resource created or in the process of being created in the specified * resource group. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -114,11 +54,9 @@ Response getByResourceGroupWithResponse(String resourceGrou ManagedClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** - * Creates or updates a Service Fabric managed cluster resource. - * * Create or update a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,11 +69,9 @@ SyncPoller, ManagedClusterInner> beginCreateOrUp String clusterName, ManagedClusterInner parameters); /** - * Creates or updates a Service Fabric managed cluster resource. - * * Create or update a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The cluster resource. * @param context The context to associate with this operation. @@ -149,11 +85,9 @@ SyncPoller, ManagedClusterInner> beginCreateOrUp String clusterName, ManagedClusterInner parameters, Context context); /** - * Creates or updates a Service Fabric managed cluster resource. - * * Create or update a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,11 +99,9 @@ SyncPoller, ManagedClusterInner> beginCreateOrUp ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, ManagedClusterInner parameters); /** - * Creates or updates a Service Fabric managed cluster resource. - * * Create or update a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The cluster resource. * @param context The context to associate with this operation. @@ -183,11 +115,9 @@ ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, Context context); /** - * Updates the tags of of a Service Fabric managed cluster resource. - * * Update the tags of of a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The managed cluster resource updated tags. * @param context The context to associate with this operation. @@ -201,11 +131,9 @@ Response updateWithResponse(String resourceGroupName, Strin ManagedClusterUpdateParameters parameters, Context context); /** - * Updates the tags of of a Service Fabric managed cluster resource. - * * Update the tags of of a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param parameters The managed cluster resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,11 +145,9 @@ Response updateWithResponse(String resourceGroupName, Strin ManagedClusterInner update(String resourceGroupName, String clusterName, ManagedClusterUpdateParameters parameters); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -232,11 +158,9 @@ Response updateWithResponse(String resourceGroupName, Strin SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,11 +172,9 @@ Response updateWithResponse(String resourceGroupName, Strin SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -262,11 +184,9 @@ Response updateWithResponse(String resourceGroupName, Strin void delete(String resourceGroupName, String clusterName); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,4 +195,232 @@ Response updateWithResponse(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String clusterName, Context context); + + /** + * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the resource group as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the resource group as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the subscription as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets all Service Fabric cluster resources created or in the process of being created in the 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 all Service Fabric cluster resources created or in the process of being created in the subscription as + * paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FaultSimulationInner getFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters); + + /** + * Gets the list of recent fault simulations for the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName); + + /** + * Gets the list of recent fault simulations for the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + Context context); + + /** + * Starts a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context); + + /** + * Starts a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, + Context context); + + /** + * Stops a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters); + + /** + * Stops a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context); + + /** + * Stops a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters); + + /** + * Stops a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, + Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java index a2c5713b7ffb..dbaaceb5e5d7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedMaintenanceWindowStatusesClient.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.servicefabricmanagedclusters.fluent; @@ -17,7 +17,7 @@ public interface ManagedMaintenanceWindowStatusesClient { /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,7 +33,7 @@ Response getWithResponse(String resourceGro /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java index e8d27cb31901..0c069c2c8c26 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ManagedUnsupportedVMSizesClient.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.servicefabricmanagedclusters.fluent; @@ -16,56 +16,56 @@ */ public interface ManagedUnsupportedVMSizesClient { /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. + * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. + * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String vmSize, Context context); /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param context The context to associate with this operation. + * @param vmSize VM Size name. * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. + * @return unsupported vm size for Service Fabric Managed Clusters. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedVMSizeInner get(String location, String vmSize); /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. - * @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 unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String vmSize, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. + * @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 unsupported vm size for Service Fabric Managed Clusters. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedVMSizeInner get(String location, String vmSize); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java index 089d59d48054..7f933edb340b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypeSkusClient.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.servicefabricmanagedclusters.fluent; @@ -15,11 +15,9 @@ */ public interface NodeTypeSkusClient { /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,11 +29,9 @@ public interface NodeTypeSkusClient { PagedIterable list(String resourceGroupName, String clusterName, String nodeTypeName); /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java index c103524d9903..4f930568b9db 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/NodeTypesClient.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.servicefabricmanagedclusters.fluent; @@ -11,7 +11,10 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters; @@ -20,141 +23,280 @@ */ public interface NodeTypesClient { /** - * Gets the list of Node types of the specified managed cluster. + * Get a Service Fabric node type of a given managed cluster. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Service Fabric node type of a given managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, + Context context); + + /** + * Get a Service Fabric node type of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. * @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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + * @return a Service Fabric node type of a given managed cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedClusters(String resourceGroupName, String clusterName); + @ServiceMethod(returns = ReturnType.SINGLE) + NodeTypeInner get(String resourceGroupName, String clusterName, String nodeTypeName); /** - * Gets the list of Node types of the specified managed cluster. + * Create or update a Service Fabric node type of a given managed cluster. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 {@link SyncPoller} for polling of describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters); + + /** + * Create or update a Service Fabric node type of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByManagedClusters(String resourceGroupName, String clusterName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context); /** - * Restarts one or more nodes on the node type. + * Create or update a Service Fabric node type of a given managed cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters); + + /** + * Create or update a Service Fabric node type of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters The node type 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 {@link SyncPoller} for polling of long-running operation. + * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters, Context context); + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters); + SyncPoller, NodeTypeInner> beginUpdate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeUpdateParameters parameters); /** - * Restarts one or more nodes on the node type. + * Update the configuration of a node type of a given managed cluster, only updating tags. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NodeTypeInner> beginUpdate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeUpdateParameters parameters, Context context); + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters); + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters, Context context); + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String nodeTypeName); /** - * Restarts one or more nodes on the node type. + * Delete a Service Fabric node type of a given managed cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String nodeTypeName, + Context context); + + /** + * Delete a Service Fabric node type of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters); + void delete(String resourceGroupName, String clusterName, String nodeTypeName); /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * Delete a Service Fabric node type of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, - Context context); + void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context); /** - * Reimages one or more nodes on the node type. + * Gets all Node types of the specified managed cluster. * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and - * activate the nodes back again. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedClusters(String resourceGroupName, String clusterName); + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedClusters(String resourceGroupName, String clusterName, Context context); + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for deallocate action. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters); + SyncPoller, Void> beginDeallocate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters); /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and - * activate the nodes back again. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for deallocate action. * @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. @@ -162,53 +304,47 @@ SyncPoller, Void> beginReimage(String resourceGroupName, String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters, Context context); + SyncPoller, Void> beginDeallocate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context); /** - * Reimages one or more nodes on the node type. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and - * activate the nodes back again. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for deallocate action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void reimage(String resourceGroupName, String clusterName, String nodeTypeName, + void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); /** - * Reimages one or more nodes on the node type. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and - * activate the nodes back again. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for deallocate action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void reimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, - Context context); + void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); /** - * Deletes one or more nodes on the node type. - * * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and * removes the state from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for delete action. @@ -222,12 +358,10 @@ SyncPoller, Void> beginDeleteNode(String resourceGroupName, Str String nodeTypeName, NodeTypeActionParameters parameters); /** - * Deletes one or more nodes on the node type. - * * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and * removes the state from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for delete action. @@ -242,12 +376,10 @@ SyncPoller, Void> beginDeleteNode(String resourceGroupName, Str String nodeTypeName, NodeTypeActionParameters parameters, Context context); /** - * Deletes one or more nodes on the node type. - * * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and * removes the state from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for delete action. @@ -260,12 +392,10 @@ void deleteNode(String resourceGroupName, String clusterName, String nodeTypeNam NodeTypeActionParameters parameters); /** - * Deletes one or more nodes on the node type. - * * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and * removes the state from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for delete action. @@ -279,215 +409,465 @@ void deleteNode(String resourceGroupName, String clusterName, String nodeTypeNam NodeTypeActionParameters parameters, Context context); /** - * Gets a Service Fabric node type. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRedeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. * @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 Service Fabric node type of a given managed cluster along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRedeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); /** - * Gets a Service Fabric node type. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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 Service Fabric node type of a given managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - NodeTypeInner get(String resourceGroupName, String clusterName, String nodeTypeName); + void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); /** - * Creates or updates a Service Fabric node type. + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * activate the nodes back again. * - * Create or update a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for reimage action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameters for reimage action. + * @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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters); + SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); /** - * Creates or updates a Service Fabric node type. + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * activate the nodes back again. * - * Create or update a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for reimage action. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void reimage(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameters for reimage action. * @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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void reimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, + Context context); + + /** + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for restart action. + * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context); + SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); /** - * Creates or updates a Service Fabric node type. + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * Create or update a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for restart action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); + + /** + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameters for restart action. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters); + void restart(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameters for restart action. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters, Context context); + void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, + Context context); /** - * Update the tags of a node type resource of a given managed cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for start action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameters for start action. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeUpdateParameters parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); /** - * Update the tags of a node type resource of a given managed cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for start action. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); + + /** + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameters for start action. + * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeUpdateParameters parameters); + void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, + Context context); /** - * Deletes a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String nodeTypeName); + SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationContentWrapper parameters, Context context); /** - * Deletes a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters, Context context); + + /** + * Stops a fault simulation on the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String nodeTypeName, - Context context); + SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters); /** - * Deletes a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context); + + /** + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String nodeTypeName); + void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters); /** - * Deletes a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. * @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 fault simulation by the simulationId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context); + Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FaultSimulationInner getFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationResultsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationResultsClient.java index 8c2695fa722e..2c3d72d59cce 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationResultsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationResultsClient.java @@ -1,13 +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.servicefabricmanagedclusters.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationResultsGetResponse; +import com.azure.core.util.polling.SyncPoller; /** * An instance of this class provides access to all the operations defined in OperationResultsClient. @@ -16,21 +17,34 @@ public interface OperationResultsClient { /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @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 long running operation result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginGet(String location, String operationId); + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. * @param operationId operation identifier. * @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 long running operation result. + * @return the {@link SyncPoller} for polling of long running operation result. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultsGetResponse getWithResponse(String location, String operationId, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginGet(String location, String operationId, Context context); /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,4 +52,17 @@ public interface OperationResultsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) void get(String location, String operationId); + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void get(String location, String operationId, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationStatusClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationStatusClient.java index cf1c8f0d1015..0db04535ab68 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationStatusClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationStatusClient.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.servicefabricmanagedclusters.fluent; @@ -17,7 +17,7 @@ public interface OperationStatusClient { /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,7 +31,7 @@ public interface OperationStatusClient { /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java index 9cd45ffac0d0..5290af60dba3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/OperationsClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.fluent; @@ -21,8 +21,8 @@ public interface OperationsClient { * * @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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -36,8 +36,8 @@ public interface OperationsClient { * @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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricClient.java similarity index 93% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricClient.java index c9ba38e6f991..af2f5b8ec374 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricManagedClustersMgmtClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServiceFabricClient.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.servicefabricmanagedclusters.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for ServiceFabricManagedClustersMgmtClient class. + * The interface for ServiceFabricClient class. */ -public interface ServiceFabricManagedClustersMgmtClient { +public interface ServiceFabricClient { /** - * Gets The customer subscription identifier. - * - * @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. * @@ -46,6 +46,20 @@ public interface ServiceFabricManagedClustersMgmtClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. + */ + ApplicationsClient getApplications(); + /** * Gets the ApplicationTypesClient object to access its operations. * @@ -61,18 +75,25 @@ public interface ServiceFabricManagedClustersMgmtClient { ApplicationTypeVersionsClient getApplicationTypeVersions(); /** - * Gets the ApplicationsClient object to access its operations. + * Gets the ServicesClient object to access its operations. * - * @return the ApplicationsClient object. + * @return the ServicesClient object. */ - ApplicationsClient getApplications(); + ServicesClient getServices(); /** - * Gets the ServicesClient object to access its operations. + * Gets the ManagedClusterVersionsClient object to access its operations. * - * @return the ServicesClient object. + * @return the ManagedClusterVersionsClient object. */ - ServicesClient getServices(); + ManagedClusterVersionsClient getManagedClusterVersions(); + + /** + * Gets the ManagedUnsupportedVMSizesClient object to access its operations. + * + * @return the ManagedUnsupportedVMSizesClient object. + */ + ManagedUnsupportedVMSizesClient getManagedUnsupportedVMSizes(); /** * Gets the ManagedClustersClient object to access its operations. @@ -88,13 +109,6 @@ public interface ServiceFabricManagedClustersMgmtClient { */ ManagedAzResiliencyStatusesClient getManagedAzResiliencyStatuses(); - /** - * Gets the ManagedMaintenanceWindowStatusesClient object to access its operations. - * - * @return the ManagedMaintenanceWindowStatusesClient object. - */ - ManagedMaintenanceWindowStatusesClient getManagedMaintenanceWindowStatuses(); - /** * Gets the ManagedApplyMaintenanceWindowsClient object to access its operations. * @@ -103,25 +117,25 @@ public interface ServiceFabricManagedClustersMgmtClient { ManagedApplyMaintenanceWindowsClient getManagedApplyMaintenanceWindows(); /** - * Gets the ManagedClusterVersionsClient object to access its operations. + * Gets the ManagedMaintenanceWindowStatusesClient object to access its operations. * - * @return the ManagedClusterVersionsClient object. + * @return the ManagedMaintenanceWindowStatusesClient object. */ - ManagedClusterVersionsClient getManagedClusterVersions(); + ManagedMaintenanceWindowStatusesClient getManagedMaintenanceWindowStatuses(); /** - * Gets the ManagedUnsupportedVMSizesClient object to access its operations. + * Gets the NodeTypesClient object to access its operations. * - * @return the ManagedUnsupportedVMSizesClient object. + * @return the NodeTypesClient object. */ - ManagedUnsupportedVMSizesClient getManagedUnsupportedVMSizes(); + NodeTypesClient getNodeTypes(); /** - * Gets the OperationStatusClient object to access its operations. + * Gets the NodeTypeSkusClient object to access its operations. * - * @return the OperationStatusClient object. + * @return the NodeTypeSkusClient object. */ - OperationStatusClient getOperationStatus(); + NodeTypeSkusClient getNodeTypeSkus(); /** * Gets the OperationResultsClient object to access its operations. @@ -131,23 +145,9 @@ public interface ServiceFabricManagedClustersMgmtClient { OperationResultsClient getOperationResults(); /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the NodeTypesClient object to access its operations. - * - * @return the NodeTypesClient object. - */ - NodeTypesClient getNodeTypes(); - - /** - * Gets the NodeTypeSkusClient object to access its operations. + * Gets the OperationStatusClient object to access its operations. * - * @return the NodeTypeSkusClient object. + * @return the OperationStatusClient object. */ - NodeTypeSkusClient getNodeTypeSkus(); + OperationStatusClient getOperationStatus(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java index f9308a965054..fc0e429a1189 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/ServicesClient.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.servicefabricmanagedclusters.fluent; @@ -19,12 +19,10 @@ */ public interface ServicesClient { /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -40,12 +38,10 @@ Response getWithResponse(String resourceGroupName, String String serviceName, Context context); /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -59,11 +55,9 @@ Response getWithResponse(String resourceGroupName, String ServiceResourceInner get(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -78,11 +72,9 @@ SyncPoller, ServiceResourceInner> beginCreateOr String clusterName, String applicationName, String serviceName, ServiceResourceInner parameters); /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -99,11 +91,9 @@ SyncPoller, ServiceResourceInner> beginCreateOr Context context); /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -118,11 +108,9 @@ ServiceResourceInner createOrUpdate(String resourceGroupName, String clusterName String serviceName, ServiceResourceInner parameters); /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -140,7 +128,7 @@ ServiceResourceInner createOrUpdate(String resourceGroupName, String clusterName /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -158,7 +146,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -173,11 +161,9 @@ ServiceResourceInner update(String resourceGroupName, String clusterName, String String serviceName, ServiceUpdateParameters parameters); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -191,11 +177,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String serviceName); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -210,11 +194,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String String serviceName, Context context); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -226,11 +208,9 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -244,12 +224,10 @@ void delete(String resourceGroupName, String clusterName, String applicationName Context context); /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -263,12 +241,10 @@ PagedIterable listByApplications(String resourceGroupName, String applicationName); /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java index f6d1e298e6b9..1c586e87f0cb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceInner.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.servicefabricmanagedclusters.fluent.models; @@ -23,27 +23,27 @@ @Fluent public final class ApplicationResourceInner extends ProxyResource { /* - * Describes the managed identities for an Azure resource. + * The application resource properties. */ - private ManagedIdentity identity; + private ApplicationResourceProperties innerProperties; /* - * The application resource properties. + * Resource tags. */ - private ApplicationResourceProperties innerProperties; + private Map tags; /* - * Resource location depends on the parent resource. + * Describes the managed identities for an Azure resource. */ - private String location; + private ManagedIdentity identity; /* - * Azure resource tags. + * The geo-location where the resource lives */ - private Map tags; + private String location; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -69,76 +69,76 @@ public ApplicationResourceInner() { } /** - * Get the identity property: Describes the managed identities for an Azure resource. + * Get the innerProperties property: The application resource properties. * - * @return the identity value. + * @return the innerProperties value. */ - public ManagedIdentity identity() { - return this.identity; + private ApplicationResourceProperties innerProperties() { + return this.innerProperties; } /** - * Set the identity property: Describes the managed identities for an Azure resource. + * Get the tags property: Resource tags. * - * @param identity the identity value to set. - * @return the ApplicationResourceInner object itself. + * @return the tags value. */ - public ApplicationResourceInner withIdentity(ManagedIdentity identity) { - this.identity = identity; - return this; + public Map tags() { + return this.tags; } /** - * Get the innerProperties property: The application resource properties. + * Set the tags property: Resource tags. * - * @return the innerProperties value. + * @param tags the tags value to set. + * @return the ApplicationResourceInner object itself. */ - private ApplicationResourceProperties innerProperties() { - return this.innerProperties; + public ApplicationResourceInner withTags(Map tags) { + this.tags = tags; + return this; } /** - * Get the location property: Resource location depends on the parent resource. + * Get the identity property: Describes the managed identities for an Azure resource. * - * @return the location value. + * @return the identity value. */ - public String location() { - return this.location; + public ManagedIdentity identity() { + return this.identity; } /** - * Set the location property: Resource location depends on the parent resource. + * Set the identity property: Describes the managed identities for an Azure resource. * - * @param location the location value to set. + * @param identity the identity value to set. * @return the ApplicationResourceInner object itself. */ - public ApplicationResourceInner withLocation(String location) { - this.location = location; + public ApplicationResourceInner withIdentity(ManagedIdentity identity) { + this.identity = identity; return this; } /** - * Get the tags property: Azure resource tags. + * Get the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Azure resource tags. + * Set the location property: The geo-location where the resource lives. * - * @param tags the tags value to set. + * @param location the location value to set. * @return the ApplicationResourceInner object itself. */ - public ApplicationResourceInner withTags(Map tags) { - this.tags = tags; + public ApplicationResourceInner withLocation(String location) { + this.location = location; return this; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -290,12 +290,12 @@ public ApplicationResourceInner withManagedIdentities(List writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -333,16 +333,16 @@ public static ApplicationResourceInner fromJson(JsonReader jsonReader) throws IO deserializedApplicationResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedApplicationResourceInner.type = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedApplicationResourceInner.identity = ManagedIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedApplicationResourceInner.innerProperties = ApplicationResourceProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedApplicationResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplicationResourceInner.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedApplicationResourceInner.identity = ManagedIdentity.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedApplicationResourceInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedApplicationResourceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java index f04cf96fb939..df3ceadf0e24 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationResourceProperties.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.servicefabricmanagedclusters.fluent.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java index a92a9e0c2e8d..58fbab3aa5ad 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceInner.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.servicefabricmanagedclusters.fluent.models; @@ -24,17 +24,17 @@ public final class ApplicationTypeResourceInner extends ProxyResource { private ApplicationTypeResourceProperties innerProperties; /* - * Resource location depends on the parent resource. + * Resource tags. */ - private String location; + private Map tags; /* - * Azure resource tags. + * The geo-location where the resource lives */ - private Map tags; + private String location; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -69,47 +69,47 @@ private ApplicationTypeResourceProperties innerProperties() { } /** - * Get the location property: Resource location depends on the parent resource. + * Get the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - public String location() { - return this.location; + public Map tags() { + return this.tags; } /** - * Set the location property: Resource location depends on the parent resource. + * Set the tags property: Resource tags. * - * @param location the location value to set. + * @param tags the tags value to set. * @return the ApplicationTypeResourceInner object itself. */ - public ApplicationTypeResourceInner withLocation(String location) { - this.location = location; + public ApplicationTypeResourceInner withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the tags property: Azure resource tags. + * Get the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Azure resource tags. + * Set the location property: The geo-location where the resource lives. * - * @param tags the tags value to set. + * @param location the location value to set. * @return the ApplicationTypeResourceInner object itself. */ - public ApplicationTypeResourceInner withTags(Map tags) { - this.tags = tags; + public ApplicationTypeResourceInner withLocation(String location) { + this.location = location; return this; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -175,8 +175,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -205,11 +205,11 @@ public static ApplicationTypeResourceInner fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedApplicationTypeResourceInner.innerProperties = ApplicationTypeResourceProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedApplicationTypeResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplicationTypeResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedApplicationTypeResourceInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedApplicationTypeResourceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java index fd46eddac27c..719ae0e0619e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeResourceProperties.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.servicefabricmanagedclusters.fluent.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java index a7a14dc4e73c..e18cfaca319a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceInner.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.servicefabricmanagedclusters.fluent.models; @@ -24,17 +24,17 @@ public final class ApplicationTypeVersionResourceInner extends ProxyResource { private ApplicationTypeVersionResourceProperties innerProperties; /* - * Resource location depends on the parent resource. + * Resource tags. */ - private String location; + private Map tags; /* - * Azure resource tags. + * The geo-location where the resource lives */ - private Map tags; + private String location; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -69,47 +69,47 @@ private ApplicationTypeVersionResourceProperties innerProperties() { } /** - * Get the location property: Resource location depends on the parent resource. + * Get the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - public String location() { - return this.location; + public Map tags() { + return this.tags; } /** - * Set the location property: Resource location depends on the parent resource. + * Set the tags property: Resource tags. * - * @param location the location value to set. + * @param tags the tags value to set. * @return the ApplicationTypeVersionResourceInner object itself. */ - public ApplicationTypeVersionResourceInner withLocation(String location) { - this.location = location; + public ApplicationTypeVersionResourceInner withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the tags property: Azure resource tags. + * Get the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Azure resource tags. + * Set the location property: The geo-location where the resource lives. * - * @param tags the tags value to set. + * @param location the location value to set. * @return the ApplicationTypeVersionResourceInner object itself. */ - public ApplicationTypeVersionResourceInner withTags(Map tags) { - this.tags = tags; + public ApplicationTypeVersionResourceInner withLocation(String location) { + this.location = location; return this; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -198,8 +198,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -229,11 +229,11 @@ public static ApplicationTypeVersionResourceInner fromJson(JsonReader jsonReader } else if ("properties".equals(fieldName)) { deserializedApplicationTypeVersionResourceInner.innerProperties = ApplicationTypeVersionResourceProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedApplicationTypeVersionResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplicationTypeVersionResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedApplicationTypeVersionResourceInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedApplicationTypeVersionResourceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java index b921db93343b..a35236feaef9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ApplicationTypeVersionResourceProperties.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.servicefabricmanagedclusters.fluent.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java new file mode 100644 index 000000000000..83d5df81dbc3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/FaultSimulationInner.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Fault simulation object with status. + */ +@Immutable +public final class FaultSimulationInner implements JsonSerializable { + /* + * unique identifier for the fault simulation. + */ + private String simulationId; + + /* + * Fault simulation status + */ + private FaultSimulationStatus status; + + /* + * The start time of the fault simulation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the fault simulation. + */ + private OffsetDateTime endTime; + + /* + * Fault simulation details + */ + private FaultSimulationDetails details; + + /** + * Creates an instance of FaultSimulationInner class. + */ + private FaultSimulationInner() { + } + + /** + * Get the simulationId property: unique identifier for the fault simulation. + * + * @return the simulationId value. + */ + public String simulationId() { + return this.simulationId; + } + + /** + * Get the status property: Fault simulation status. + * + * @return the status value. + */ + public FaultSimulationStatus status() { + return this.status; + } + + /** + * Get the startTime property: The start time of the fault simulation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the fault simulation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the details property: Fault simulation details. + * + * @return the details value. + */ + public FaultSimulationDetails details() { + return this.details; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (details() != null) { + details().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("simulationId", this.simulationId); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeJsonField("details", this.details); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationInner 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 FaultSimulationInner. + */ + public static FaultSimulationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationInner deserializedFaultSimulationInner = new FaultSimulationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("simulationId".equals(fieldName)) { + deserializedFaultSimulationInner.simulationId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedFaultSimulationInner.status = FaultSimulationStatus.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedFaultSimulationInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedFaultSimulationInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("details".equals(fieldName)) { + deserializedFaultSimulationInner.details = FaultSimulationDetails.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationInner; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/LongRunningOperationResultInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/LongRunningOperationResultInner.java index cdb5e265e447..dfead6128f9e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/LongRunningOperationResultInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/LongRunningOperationResultInner.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ErrorModelError; import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; @@ -18,7 +18,7 @@ /** * Long running operation result. */ -@Fluent +@Immutable public final class LongRunningOperationResultInner implements JsonSerializable { /* * The name of the operation. @@ -48,12 +48,12 @@ public final class LongRunningOperationResultInner implements JsonSerializable { /* * List of Managed VM Sizes for Service Fabric Managed Clusters. @@ -31,7 +31,7 @@ public final class ManagedAzResiliencyStatusInner implements JsonSerializable baseResourceStatus() { return this.baseResourceStatus; } - /** - * Set the baseResourceStatus property: List of Managed VM Sizes for Service Fabric Managed Clusters. - * - * @param baseResourceStatus the baseResourceStatus value to set. - * @return the ManagedAzResiliencyStatusInner object itself. - */ - public ManagedAzResiliencyStatusInner withBaseResourceStatus(List baseResourceStatus) { - this.baseResourceStatus = baseResourceStatus; - return this; - } - /** * Get the isClusterZoneResilient property: URL to get the next set of Managed VM Sizes if there are any. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java index 142029c05a13..c253c18ee4bd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterCodeVersionResultInner.java @@ -1,21 +1,22 @@ // 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.servicefabricmanagedclusters.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; import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType; import java.io.IOException; +import java.time.OffsetDateTime; /** * The result of the Service Fabric runtime versions. */ -@Fluent +@Immutable public final class ManagedClusterCodeVersionResultInner implements JsonSerializable { /* @@ -41,7 +42,7 @@ public final class ManagedClusterCodeVersionResultInner /** * Creates an instance of ManagedClusterCodeVersionResultInner class. */ - public ManagedClusterCodeVersionResultInner() { + private ManagedClusterCodeVersionResultInner() { } /** @@ -53,17 +54,6 @@ public String id() { return this.id; } - /** - * Set the id property: The identification of the result. - * - * @param id the id value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withId(String id) { - this.id = id; - return this; - } - /** * Get the name property: The name of the result. * @@ -73,17 +63,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name of the result. - * - * @param name the name value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withName(String name) { - this.name = name; - return this; - } - /** * Get the type property: The result resource type. * @@ -93,17 +72,6 @@ public String type() { return this.type; } - /** - * Set the type property: The result resource type. - * - * @param type the type value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withType(String type) { - this.type = type; - return this; - } - /** * Get the innerProperties property: The detail of the Service Fabric runtime version result. * @@ -122,43 +90,15 @@ public String clusterCodeVersion() { return this.innerProperties() == null ? null : this.innerProperties().clusterCodeVersion(); } - /** - * Set the clusterCodeVersion property: The Service Fabric runtime version of the cluster. - * - * @param clusterCodeVersion the clusterCodeVersion value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withClusterCodeVersion(String clusterCodeVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterVersionDetails(); - } - this.innerProperties().withClusterCodeVersion(clusterCodeVersion); - return this; - } - /** * Get the supportExpiryUtc property: The date of expiry of support of the version. * * @return the supportExpiryUtc value. */ - public String supportExpiryUtc() { + public OffsetDateTime supportExpiryUtc() { return this.innerProperties() == null ? null : this.innerProperties().supportExpiryUtc(); } - /** - * Set the supportExpiryUtc property: The date of expiry of support of the version. - * - * @param supportExpiryUtc the supportExpiryUtc value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withSupportExpiryUtc(String supportExpiryUtc) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterVersionDetails(); - } - this.innerProperties().withSupportExpiryUtc(supportExpiryUtc); - return this; - } - /** * Get the osType property: Cluster operating system, the default will be Windows. * @@ -168,20 +108,6 @@ public OsType osType() { return this.innerProperties() == null ? null : this.innerProperties().osType(); } - /** - * Set the osType property: Cluster operating system, the default will be Windows. - * - * @param osType the osType value to set. - * @return the ManagedClusterCodeVersionResultInner object itself. - */ - public ManagedClusterCodeVersionResultInner withOsType(OsType osType) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedClusterVersionDetails(); - } - this.innerProperties().withOsType(osType); - return this; - } - /** * Validates the instance. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java index 1ffa8b094466..e5a79352115e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterInner.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.servicefabricmanagedclusters.fluent.models; @@ -12,6 +12,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState; @@ -43,17 +44,20 @@ public final class ManagedClusterInner extends Resource { private ManagedClusterProperties innerProperties; /* - * The sku of the managed cluster + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields.", */ - private Sku sku; + private String etag; /* - * Azure resource etag. + * The sku of the managed cluster */ - private String etag; + private Sku sku; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -87,6 +91,18 @@ private ManagedClusterProperties innerProperties() { return this.innerProperties; } + /** + * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields.",. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + /** * Get the sku property: The sku of the managed cluster. * @@ -108,16 +124,7 @@ public ManagedClusterInner withSku(Sku sku) { } /** - * Get the etag property: Azure resource etag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -288,25 +295,25 @@ public ManagedClusterInner withHttpGatewayConnectionPort(Integer httpGatewayConn } /** - * Get the adminUsername property: VM admin user name. + * Get the adminUserName property: VM admin user name. * - * @return the adminUsername value. + * @return the adminUserName value. */ - public String adminUsername() { - return this.innerProperties() == null ? null : this.innerProperties().adminUsername(); + public String adminUserName() { + return this.innerProperties() == null ? null : this.innerProperties().adminUserName(); } /** - * Set the adminUsername property: VM admin user name. + * Set the adminUserName property: VM admin user name. * - * @param adminUsername the adminUsername value to set. + * @param adminUserName the adminUserName value to set. * @return the ManagedClusterInner object itself. */ - public ManagedClusterInner withAdminUsername(String adminUsername) { + public ManagedClusterInner withAdminUserName(String adminUserName) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } - this.innerProperties().withAdminUsername(adminUsername); + this.innerProperties().withAdminUserName(adminUserName); return this; } @@ -591,8 +598,8 @@ public ManagedClusterInner withAddonFeatures(List ad } /** - * Get the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that - * are created using any platform OS image with version 'latest'. The default value for this setting is false. + * Get the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with + * version 'latest'. The default value for this setting is false. * * @return the enableAutoOSUpgrade value. */ @@ -601,8 +608,8 @@ public Boolean enableAutoOSUpgrade() { } /** - * Set the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that - * are created using any platform OS image with version 'latest'. The default value for this setting is false. + * Set the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with + * version 'latest'. The default value for this setting is false. * * @param enableAutoOSUpgrade the enableAutoOSUpgrade value to set. * @return the ManagedClusterInner object itself. @@ -747,27 +754,27 @@ public String ipv6Address() { } /** - * Get the enableServicePublicIp property: Setting this to true will link the IPv4 address as the ServicePublicIP of + * Get the enableServicePublicIP property: Setting this to true will link the IPv4 address as the ServicePublicIP of * the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. * - * @return the enableServicePublicIp value. + * @return the enableServicePublicIP value. */ - public Boolean enableServicePublicIp() { - return this.innerProperties() == null ? null : this.innerProperties().enableServicePublicIp(); + public Boolean enableServicePublicIP() { + return this.innerProperties() == null ? null : this.innerProperties().enableServicePublicIP(); } /** - * Set the enableServicePublicIp property: Setting this to true will link the IPv4 address as the ServicePublicIP of + * Set the enableServicePublicIP property: Setting this to true will link the IPv4 address as the ServicePublicIP of * the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. * - * @param enableServicePublicIp the enableServicePublicIp value to set. + * @param enableServicePublicIP the enableServicePublicIP value to set. * @return the ManagedClusterInner object itself. */ - public ManagedClusterInner withEnableServicePublicIp(Boolean enableServicePublicIp) { + public ManagedClusterInner withEnableServicePublicIP(Boolean enableServicePublicIP) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } - this.innerProperties().withEnableServicePublicIp(enableServicePublicIp); + this.innerProperties().withEnableServicePublicIP(enableServicePublicIP); return this; } @@ -868,27 +875,27 @@ public ManagedClusterInner withUseCustomVnet(Boolean useCustomVnet) { } /** - * Get the publicIpPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will + * Get the publicIPPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will * allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. * - * @return the publicIpPrefixId value. + * @return the publicIPPrefixId value. */ - public String publicIpPrefixId() { - return this.innerProperties() == null ? null : this.innerProperties().publicIpPrefixId(); + public String publicIPPrefixId() { + return this.innerProperties() == null ? null : this.innerProperties().publicIPPrefixId(); } /** - * Set the publicIpPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will + * Set the publicIPPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will * allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. * - * @param publicIpPrefixId the publicIpPrefixId value to set. + * @param publicIPPrefixId the publicIPPrefixId value to set. * @return the ManagedClusterInner object itself. */ - public ManagedClusterInner withPublicIpPrefixId(String publicIpPrefixId) { + public ManagedClusterInner withPublicIPPrefixId(String publicIPPrefixId) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } - this.innerProperties().withPublicIpPrefixId(publicIpPrefixId); + this.innerProperties().withPublicIPPrefixId(publicIPPrefixId); return this; } @@ -1017,6 +1024,88 @@ public ManagedClusterInner withEnableHttpGatewayExclusiveAuthMode(Boolean enable return this; } + /** + * Get the autoGeneratedDomainNameLabelScope property: This property is the entry point to using a public CA cert + * for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject + * of the public CA cert. + * + * @return the autoGeneratedDomainNameLabelScope value. + */ + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.innerProperties() == null ? null : this.innerProperties().autoGeneratedDomainNameLabelScope(); + } + + /** + * Set the autoGeneratedDomainNameLabelScope property: This property is the entry point to using a public CA cert + * for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject + * of the public CA cert. + * + * @param autoGeneratedDomainNameLabelScope the autoGeneratedDomainNameLabelScope value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAutoGeneratedDomainNameLabelScope(autoGeneratedDomainNameLabelScope); + return this; + } + + /** + * Get the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the + * backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on + * pool size. + * + * @return the allocatedOutboundPorts value. + */ + public Integer allocatedOutboundPorts() { + return this.innerProperties() == null ? null : this.innerProperties().allocatedOutboundPorts(); + } + + /** + * Set the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the + * backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on + * pool size. + * + * @param allocatedOutboundPorts the allocatedOutboundPorts value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withAllocatedOutboundPorts(allocatedOutboundPorts); + return this; + } + + /** + * Get the vMImage property: The VM image the node types are configured with. This property controls the Service + * Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is + * 'Windows'. + * + * @return the vMImage value. + */ + public String vMImage() { + return this.innerProperties() == null ? null : this.innerProperties().vMImage(); + } + + /** + * Set the vMImage property: The VM image the node types are configured with. This property controls the Service + * Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is + * 'Windows'. + * + * @param vMImage the vMImage value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withVMImage(String vMImage) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withVMImage(vMImage); + return this; + } + /** * Validates the instance. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java index 30e1eceb89e7..d053e8cae49e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterProperties.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.servicefabricmanagedclusters.fluent.models; @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState; @@ -77,7 +78,7 @@ public final class ManagedClusterProperties implements JsonSerializable addonFeatures; /* - * Setting this to true enables automatic OS upgrade for the node types that are created using any platform OS image - * with version 'latest'. The default value for this setting is false. + * Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for + * this setting is false. */ private Boolean enableAutoOSUpgrade; @@ -187,7 +188,7 @@ public final class ManagedClusterProperties implements JsonSerializable e.validate()); @@ -1057,7 +1149,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dnsName", this.dnsName); - jsonWriter.writeStringField("adminUserName", this.adminUsername); + jsonWriter.writeStringField("adminUserName", this.adminUserName); jsonWriter.writeNumberField("clientConnectionPort", this.clientConnectionPort); jsonWriter.writeNumberField("httpGatewayConnectionPort", this.httpGatewayConnectionPort); jsonWriter.writeStringField("adminPassword", this.adminPassword); @@ -1083,7 +1175,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableIpv6", this.enableIpv6); jsonWriter.writeStringField("subnetId", this.subnetId); jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("enableServicePublicIP", this.enableServicePublicIp); + jsonWriter.writeBooleanField("enableServicePublicIP", this.enableServicePublicIP); jsonWriter.writeArrayField("auxiliarySubnets", this.auxiliarySubnets, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("serviceEndpoints", this.serviceEndpoints, @@ -1091,12 +1183,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("zonalUpdateMode", this.zonalUpdateMode == null ? null : this.zonalUpdateMode.toString()); jsonWriter.writeBooleanField("useCustomVnet", this.useCustomVnet); - jsonWriter.writeStringField("publicIPPrefixId", this.publicIpPrefixId); + jsonWriter.writeStringField("publicIPPrefixId", this.publicIPPrefixId); jsonWriter.writeStringField("publicIPv6PrefixId", this.publicIPv6PrefixId); jsonWriter.writeStringField("ddosProtectionPlanId", this.ddosProtectionPlanId); jsonWriter.writeJsonField("upgradeDescription", this.upgradeDescription); jsonWriter.writeNumberField("httpGatewayTokenAuthConnectionPort", this.httpGatewayTokenAuthConnectionPort); jsonWriter.writeBooleanField("enableHttpGatewayExclusiveAuthMode", this.enableHttpGatewayExclusiveAuthMode); + jsonWriter.writeStringField("autoGeneratedDomainNameLabelScope", + this.autoGeneratedDomainNameLabelScope == null ? null : this.autoGeneratedDomainNameLabelScope.toString()); + jsonWriter.writeNumberField("allocatedOutboundPorts", this.allocatedOutboundPorts); + jsonWriter.writeStringField("VMImage", this.vMImage); return jsonWriter.writeEndObject(); } @@ -1119,7 +1215,7 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO if ("dnsName".equals(fieldName)) { deserializedManagedClusterProperties.dnsName = reader.getString(); } else if ("adminUserName".equals(fieldName)) { - deserializedManagedClusterProperties.adminUsername = reader.getString(); + deserializedManagedClusterProperties.adminUserName = reader.getString(); } else if ("fqdn".equals(fieldName)) { deserializedManagedClusterProperties.fqdn = reader.getString(); } else if ("ipv4Address".equals(fieldName)) { @@ -1190,7 +1286,7 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("ipv6Address".equals(fieldName)) { deserializedManagedClusterProperties.ipv6Address = reader.getString(); } else if ("enableServicePublicIP".equals(fieldName)) { - deserializedManagedClusterProperties.enableServicePublicIp + deserializedManagedClusterProperties.enableServicePublicIP = reader.getNullable(JsonReader::getBoolean); } else if ("auxiliarySubnets".equals(fieldName)) { List auxiliarySubnets = reader.readArray(reader1 -> Subnet.fromJson(reader1)); @@ -1205,7 +1301,7 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("useCustomVnet".equals(fieldName)) { deserializedManagedClusterProperties.useCustomVnet = reader.getNullable(JsonReader::getBoolean); } else if ("publicIPPrefixId".equals(fieldName)) { - deserializedManagedClusterProperties.publicIpPrefixId = reader.getString(); + deserializedManagedClusterProperties.publicIPPrefixId = reader.getString(); } else if ("publicIPv6PrefixId".equals(fieldName)) { deserializedManagedClusterProperties.publicIPv6PrefixId = reader.getString(); } else if ("ddosProtectionPlanId".equals(fieldName)) { @@ -1218,6 +1314,14 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("enableHttpGatewayExclusiveAuthMode".equals(fieldName)) { deserializedManagedClusterProperties.enableHttpGatewayExclusiveAuthMode = reader.getNullable(JsonReader::getBoolean); + } else if ("autoGeneratedDomainNameLabelScope".equals(fieldName)) { + deserializedManagedClusterProperties.autoGeneratedDomainNameLabelScope + = AutoGeneratedDomainNameLabelScope.fromString(reader.getString()); + } else if ("allocatedOutboundPorts".equals(fieldName)) { + deserializedManagedClusterProperties.allocatedOutboundPorts + = reader.getNullable(JsonReader::getInt); + } else if ("VMImage".equals(fieldName)) { + deserializedManagedClusterProperties.vMImage = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java index 46101c6532cf..5e3f5b35105d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedClusterVersionDetails.java @@ -1,21 +1,24 @@ // 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.servicefabricmanagedclusters.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType; import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * The detail of the Service Fabric runtime version result. */ -@Fluent +@Immutable public final class ManagedClusterVersionDetails implements JsonSerializable { /* * The Service Fabric runtime version of the cluster. @@ -25,7 +28,7 @@ public final class ManagedClusterVersionDetails implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("osType".equals(fieldName)) { deserializedManagedClusterVersionDetails.osType = OsType.fromString(reader.getString()); } else { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java index b97a8f494193..4ea668073cd0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedMaintenanceWindowStatusInner.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.servicefabricmanagedclusters.fluent.models; @@ -42,22 +42,22 @@ public final class ManagedMaintenanceWindowStatusInner /* * Last window update time in UTC. */ - private OffsetDateTime lastWindowStatusUpdateAtUtc; + private OffsetDateTime lastWindowStatusUpdateAtUTC; /* * Last window start time in UTC. */ - private OffsetDateTime lastWindowStartTimeUtc; + private OffsetDateTime lastWindowStartTimeUTC; /* * Last window end time in UTC. */ - private OffsetDateTime lastWindowEndTimeUtc; + private OffsetDateTime lastWindowEndTimeUTC; /** * Creates an instance of ManagedMaintenanceWindowStatusInner class. */ - public ManagedMaintenanceWindowStatusInner() { + private ManagedMaintenanceWindowStatusInner() { } /** @@ -97,30 +97,30 @@ public Boolean canApplyUpdates() { } /** - * Get the lastWindowStatusUpdateAtUtc property: Last window update time in UTC. + * Get the lastWindowStatusUpdateAtUTC property: Last window update time in UTC. * - * @return the lastWindowStatusUpdateAtUtc value. + * @return the lastWindowStatusUpdateAtUTC value. */ - public OffsetDateTime lastWindowStatusUpdateAtUtc() { - return this.lastWindowStatusUpdateAtUtc; + public OffsetDateTime lastWindowStatusUpdateAtUTC() { + return this.lastWindowStatusUpdateAtUTC; } /** - * Get the lastWindowStartTimeUtc property: Last window start time in UTC. + * Get the lastWindowStartTimeUTC property: Last window start time in UTC. * - * @return the lastWindowStartTimeUtc value. + * @return the lastWindowStartTimeUTC value. */ - public OffsetDateTime lastWindowStartTimeUtc() { - return this.lastWindowStartTimeUtc; + public OffsetDateTime lastWindowStartTimeUTC() { + return this.lastWindowStartTimeUTC; } /** - * Get the lastWindowEndTimeUtc property: Last window end time in UTC. + * Get the lastWindowEndTimeUTC property: Last window end time in UTC. * - * @return the lastWindowEndTimeUtc value. + * @return the lastWindowEndTimeUTC value. */ - public OffsetDateTime lastWindowEndTimeUtc() { - return this.lastWindowEndTimeUtc; + public OffsetDateTime lastWindowEndTimeUTC() { + return this.lastWindowEndTimeUTC; } /** @@ -169,13 +169,13 @@ public static ManagedMaintenanceWindowStatusInner fromJson(JsonReader jsonReader deserializedManagedMaintenanceWindowStatusInner.canApplyUpdates = reader.getNullable(JsonReader::getBoolean); } else if ("lastWindowStatusUpdateAtUTC".equals(fieldName)) { - deserializedManagedMaintenanceWindowStatusInner.lastWindowStatusUpdateAtUtc = reader + deserializedManagedMaintenanceWindowStatusInner.lastWindowStatusUpdateAtUTC = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastWindowStartTimeUTC".equals(fieldName)) { - deserializedManagedMaintenanceWindowStatusInner.lastWindowStartTimeUtc = reader + deserializedManagedMaintenanceWindowStatusInner.lastWindowStartTimeUTC = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("lastWindowEndTimeUTC".equals(fieldName)) { - deserializedManagedMaintenanceWindowStatusInner.lastWindowEndTimeUtc = reader + deserializedManagedMaintenanceWindowStatusInner.lastWindowEndTimeUTC = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java index 344d62bc58a8..519da19ac8ac 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/ManagedVMSizeInner.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.servicefabricmanagedclusters.fluent.models; @@ -40,7 +40,7 @@ public final class ManagedVMSizeInner implements JsonSerializable { /* - * The type of resource the sku applies to.

Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + * The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. */ private String resourceType; @@ -36,11 +36,11 @@ public final class NodeTypeAvailableSkuInner implements JsonSerializable tags; + /* * The node type sku. */ private NodeTypeSku sku; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -80,6 +86,26 @@ private NodeTypeProperties innerProperties() { return this.innerProperties; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the NodeTypeInner object itself. + */ + public NodeTypeInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the sku property: The node type sku. * @@ -101,11 +127,10 @@ public NodeTypeInner withSku(NodeTypeSku sku) { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ - @Override public SystemData systemData() { return this.systemData; } @@ -140,15 +165,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public NodeTypeInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the isPrimary property: Indicates the Service Fabric system services for the cluster will run on this node * type. This setting cannot be changed once the node type is created. @@ -175,9 +191,8 @@ public NodeTypeInner withIsPrimary(Boolean isPrimary) { } /** - * Get the vmInstanceCount property: The number of nodes in the node type. <br /><br />**Values:** - * <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * Get the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when auto scale + * rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * * @return the vmInstanceCount value. */ @@ -186,9 +201,8 @@ public Integer vmInstanceCount() { } /** - * Set the vmInstanceCount property: The number of nodes in the node type. <br /><br />**Values:** - * <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * Set the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when auto scale + * rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * * @param vmInstanceCount the vmInstanceCount value to set. * @return the NodeTypeInner object itself. @@ -525,7 +539,7 @@ public NodeTypeInner withVmSecrets(List vmSecrets) { * * @return the vmExtensions value. */ - public List vmExtensions() { + public List vmExtensions() { return this.innerProperties() == null ? null : this.innerProperties().vmExtensions(); } @@ -535,7 +549,7 @@ public List vmExtensions() { * @param vmExtensions the vmExtensions value to set. * @return the NodeTypeInner object itself. */ - public NodeTypeInner withVmExtensions(List vmExtensions) { + public NodeTypeInner withVmExtensions(List vmExtensions) { if (this.innerProperties() == null) { this.innerProperties = new NodeTypeProperties(); } @@ -1107,27 +1121,27 @@ public NodeTypeInner withSecureBootEnabled(Boolean secureBootEnabled) { } /** - * Get the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 address. This + * Get the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 address. This * is only supported on secondary node types with custom Load Balancers. * - * @return the enableNodePublicIp value. + * @return the enableNodePublicIP value. */ - public Boolean enableNodePublicIp() { - return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIp(); + public Boolean enableNodePublicIP() { + return this.innerProperties() == null ? null : this.innerProperties().enableNodePublicIP(); } /** - * Set the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 address. This + * Set the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 address. This * is only supported on secondary node types with custom Load Balancers. * - * @param enableNodePublicIp the enableNodePublicIp value to set. + * @param enableNodePublicIP the enableNodePublicIP value to set. * @return the NodeTypeInner object itself. */ - public NodeTypeInner withEnableNodePublicIp(Boolean enableNodePublicIp) { + public NodeTypeInner withEnableNodePublicIP(Boolean enableNodePublicIP) { if (this.innerProperties() == null) { this.innerProperties = new NodeTypeProperties(); } - this.innerProperties().withEnableNodePublicIp(enableNodePublicIp); + this.innerProperties().withEnableNodePublicIP(enableNodePublicIP); return this; } @@ -1365,12 +1379,61 @@ public NodeTypeInner withComputerNamePrefix(String computerNamePrefix) { return this; } + /** + * Get the vmApplications property: Specifies the gallery applications that should be made available to the + * underlying VMSS. + * + * @return the vmApplications value. + */ + public List vmApplications() { + return this.innerProperties() == null ? null : this.innerProperties().vmApplications(); + } + + /** + * Set the vmApplications property: Specifies the gallery applications that should be made available to the + * underlying VMSS. + * + * @param vmApplications the vmApplications value to set. + * @return the NodeTypeInner object itself. + */ + public NodeTypeInner withVmApplications(List vmApplications) { + if (this.innerProperties() == null) { + this.innerProperties = new NodeTypeProperties(); + } + this.innerProperties().withVmApplications(vmApplications); + return this; + } + + /** + * Get the zoneBalance property: Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * + * @return the zoneBalance value. + */ + public Boolean zoneBalance() { + return this.innerProperties() == null ? null : this.innerProperties().zoneBalance(); + } + + /** + * Set the zoneBalance property: Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * + * @param zoneBalance the zoneBalance value to set. + * @return the NodeTypeInner object itself. + */ + public NodeTypeInner withZoneBalance(Boolean zoneBalance) { + if (this.innerProperties() == null) { + this.innerProperties = new NodeTypeProperties(); + } + this.innerProperties().withZoneBalance(zoneBalance); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -1386,8 +1449,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -1414,15 +1477,15 @@ public static NodeTypeInner fromJson(JsonReader jsonReader) throws IOException { deserializedNodeTypeInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedNodeTypeInner.type = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedNodeTypeInner.withTags(tags); - } else if ("systemData".equals(fieldName)) { - deserializedNodeTypeInner.systemData = SystemData.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedNodeTypeInner.innerProperties = NodeTypeProperties.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNodeTypeInner.tags = tags; } else if ("sku".equals(fieldName)) { deserializedNodeTypeInner.sku = NodeTypeSku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNodeTypeInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java index 1865ae6d89f7..f661fbe1c9e3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/NodeTypeProperties.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.servicefabricmanagedclusters.fluent.models; @@ -18,12 +18,13 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeNatConfig; import com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtension; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension; import java.io.IOException; import java.util.List; import java.util.Map; @@ -40,8 +41,8 @@ public final class NodeTypeProperties implements JsonSerializable
**Values:**
-1 - Use when auto scale rules are configured - * or sku.capacity is defined
0 - Not supported
>0 - Use for manual scale. + * The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity + * is defined 0 - Not supported >0 - Use for manual scale. */ private int vmInstanceCount; @@ -117,7 +118,7 @@ public final class NodeTypeProperties implements JsonSerializable vmExtensions; + private List vmExtensions; /* * Identities to assign to the virtual machine scale set under the node type. @@ -252,7 +253,7 @@ public final class NodeTypeProperties implements JsonSerializable vmApplications; + + /* + * Setting this to true allows stateless node types to scale out without equal distribution across zones. + */ + private Boolean zoneBalance; + /** * Creates an instance of NodeTypeProperties class. */ @@ -336,9 +347,8 @@ public NodeTypeProperties withIsPrimary(boolean isPrimary) { } /** - * Get the vmInstanceCount property: The number of nodes in the node type. <br /><br />**Values:** - * <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * Get the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when auto scale + * rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * * @return the vmInstanceCount value. */ @@ -347,9 +357,8 @@ public int vmInstanceCount() { } /** - * Set the vmInstanceCount property: The number of nodes in the node type. <br /><br />**Values:** - * <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * Set the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when auto scale + * rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * * @param vmInstanceCount the vmInstanceCount value to set. * @return the NodeTypeProperties object itself. @@ -644,7 +653,7 @@ public NodeTypeProperties withVmSecrets(List vmSecrets) { * * @return the vmExtensions value. */ - public List vmExtensions() { + public List vmExtensions() { return this.vmExtensions; } @@ -654,7 +663,7 @@ public List vmExtensions() { * @param vmExtensions the vmExtensions value to set. * @return the NodeTypeProperties object itself. */ - public NodeTypeProperties withVmExtensions(List vmExtensions) { + public NodeTypeProperties withVmExtensions(List vmExtensions) { this.vmExtensions = vmExtensions; return this; } @@ -1157,24 +1166,24 @@ public NodeTypeProperties withSecureBootEnabled(Boolean secureBootEnabled) { } /** - * Get the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 address. This + * Get the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 address. This * is only supported on secondary node types with custom Load Balancers. * - * @return the enableNodePublicIp value. + * @return the enableNodePublicIP value. */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; + public Boolean enableNodePublicIP() { + return this.enableNodePublicIP; } /** - * Set the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 address. This + * Set the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 address. This * is only supported on secondary node types with custom Load Balancers. * - * @param enableNodePublicIp the enableNodePublicIp value to set. + * @param enableNodePublicIP the enableNodePublicIP value to set. * @return the NodeTypeProperties object itself. */ - public NodeTypeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; + public NodeTypeProperties withEnableNodePublicIP(Boolean enableNodePublicIP) { + this.enableNodePublicIP = enableNodePublicIP; return this; } @@ -1383,6 +1392,50 @@ public NodeTypeProperties withComputerNamePrefix(String computerNamePrefix) { return this; } + /** + * Get the vmApplications property: Specifies the gallery applications that should be made available to the + * underlying VMSS. + * + * @return the vmApplications value. + */ + public List vmApplications() { + return this.vmApplications; + } + + /** + * Set the vmApplications property: Specifies the gallery applications that should be made available to the + * underlying VMSS. + * + * @param vmApplications the vmApplications value to set. + * @return the NodeTypeProperties object itself. + */ + public NodeTypeProperties withVmApplications(List vmApplications) { + this.vmApplications = vmApplications; + return this; + } + + /** + * Get the zoneBalance property: Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * + * @return the zoneBalance value. + */ + public Boolean zoneBalance() { + return this.zoneBalance; + } + + /** + * Set the zoneBalance property: Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * + * @param zoneBalance the zoneBalance value to set. + * @return the NodeTypeProperties object itself. + */ + public NodeTypeProperties withZoneBalance(Boolean zoneBalance) { + this.zoneBalance = zoneBalance; + return this; + } + /** * Validates the instance. * @@ -1422,6 +1475,9 @@ public void validate() { if (additionalNetworkInterfaceConfigurations() != null) { additionalNetworkInterfaceConfigurations().forEach(e -> e.validate()); } + if (vmApplications() != null) { + vmApplications().forEach(e -> e.validate()); + } } /** @@ -1474,7 +1530,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeStringField("securityType", this.securityType == null ? null : this.securityType.toString()); jsonWriter.writeBooleanField("secureBootEnabled", this.secureBootEnabled); - jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); + jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIP); jsonWriter.writeBooleanField("enableNodePublicIPv6", this.enableNodePublicIPv6); jsonWriter.writeStringField("vmSharedGalleryImageId", this.vmSharedGalleryImageId); jsonWriter.writeStringField("natGatewayId", this.natGatewayId); @@ -1486,6 +1542,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("additionalNetworkInterfaceConfigurations", this.additionalNetworkInterfaceConfigurations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("computerNamePrefix", this.computerNamePrefix); + jsonWriter.writeArrayField("vmApplications", this.vmApplications, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("zoneBalance", this.zoneBalance); return jsonWriter.writeEndObject(); } @@ -1539,7 +1598,7 @@ public static NodeTypeProperties fromJson(JsonReader jsonReader) throws IOExcept List vmSecrets = reader.readArray(reader1 -> VaultSecretGroup.fromJson(reader1)); deserializedNodeTypeProperties.vmSecrets = vmSecrets; } else if ("vmExtensions".equals(fieldName)) { - List vmExtensions = reader.readArray(reader1 -> VmssExtension.fromJson(reader1)); + List vmExtensions = reader.readArray(reader1 -> VMSSExtension.fromJson(reader1)); deserializedNodeTypeProperties.vmExtensions = vmExtensions; } else if ("vmManagedIdentity".equals(fieldName)) { deserializedNodeTypeProperties.vmManagedIdentity = VmManagedIdentity.fromJson(reader); @@ -1600,7 +1659,7 @@ public static NodeTypeProperties fromJson(JsonReader jsonReader) throws IOExcept } else if ("secureBootEnabled".equals(fieldName)) { deserializedNodeTypeProperties.secureBootEnabled = reader.getNullable(JsonReader::getBoolean); } else if ("enableNodePublicIP".equals(fieldName)) { - deserializedNodeTypeProperties.enableNodePublicIp = reader.getNullable(JsonReader::getBoolean); + deserializedNodeTypeProperties.enableNodePublicIP = reader.getNullable(JsonReader::getBoolean); } else if ("enableNodePublicIPv6".equals(fieldName)) { deserializedNodeTypeProperties.enableNodePublicIPv6 = reader.getNullable(JsonReader::getBoolean); } else if ("vmSharedGalleryImageId".equals(fieldName)) { @@ -1624,6 +1683,11 @@ public static NodeTypeProperties fromJson(JsonReader jsonReader) throws IOExcept = additionalNetworkInterfaceConfigurations; } else if ("computerNamePrefix".equals(fieldName)) { deserializedNodeTypeProperties.computerNamePrefix = reader.getString(); + } else if ("vmApplications".equals(fieldName)) { + List vmApplications = reader.readArray(reader1 -> VmApplication.fromJson(reader1)); + deserializedNodeTypeProperties.vmApplications = vmApplications; + } else if ("zoneBalance".equals(fieldName)) { + deserializedNodeTypeProperties.zoneBalance = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java index 9358871555ef..d01d55c44fb9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/OperationResultInner.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.servicefabricmanagedclusters.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,7 +15,7 @@ /** * Available operation list result. */ -@Fluent +@Immutable public final class OperationResultInner implements JsonSerializable { /* * The name of the operation. @@ -45,7 +45,7 @@ public final class OperationResultInner implements JsonSerializable tags; /* - * Azure resource tags. + * The geo-location where the resource lives */ - private Map tags; + private String location; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -81,47 +81,47 @@ public ServiceResourceInner withProperties(ServiceResourceProperties properties) } /** - * Get the location property: Resource location depends on the parent resource. + * Get the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - public String location() { - return this.location; + public Map tags() { + return this.tags; } /** - * Set the location property: Resource location depends on the parent resource. + * Set the tags property: Resource tags. * - * @param location the location value to set. + * @param tags the tags value to set. * @return the ServiceResourceInner object itself. */ - public ServiceResourceInner withLocation(String location) { - this.location = location; + public ServiceResourceInner withTags(Map tags) { + this.tags = tags; return this; } /** - * Get the tags property: Azure resource tags. + * Get the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Azure resource tags. + * Set the location property: The geo-location where the resource lives. * - * @param tags the tags value to set. + * @param location the location value to set. * @return the ServiceResourceInner object itself. */ - public ServiceResourceInner withTags(Map tags) { - this.tags = tags; + public ServiceResourceInner withLocation(String location) { + this.location = location; return this; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -177,8 +177,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } @@ -206,11 +206,11 @@ public static ServiceResourceInner fromJson(JsonReader jsonReader) throws IOExce deserializedServiceResourceInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedServiceResourceInner.properties = ServiceResourceProperties.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedServiceResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedServiceResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedServiceResourceInner.location = reader.getString(); } else if ("systemData".equals(fieldName)) { deserializedServiceResourceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VmssExtensionProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java similarity index 77% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VmssExtensionProperties.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.java index d4d9e1cc7807..535c082d1716 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VmssExtensionProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/VMSSExtensionProperties.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.servicefabricmanagedclusters.fluent.models; @@ -10,6 +10,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesProtectedSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; import java.io.IOException; import java.util.List; @@ -18,7 +20,7 @@ * Describes the properties of a Virtual Machine Scale Set Extension. */ @Fluent -public final class VmssExtensionProperties implements JsonSerializable { +public final class VMSSExtensionProperties implements JsonSerializable { /* * The name of the extension handler publisher. */ @@ -44,13 +46,13 @@ public final class VmssExtensionProperties implements JsonSerializable setupOrder; /** - * Creates an instance of VmssExtensionProperties class. + * Creates an instance of VMSSExtensionProperties class. */ - public VmssExtensionProperties() { + public VMSSExtensionProperties() { } /** @@ -98,9 +100,9 @@ public String publisher() { * Set the publisher property: The name of the extension handler publisher. * * @param publisher the publisher value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withPublisher(String publisher) { + public VMSSExtensionProperties withPublisher(String publisher) { this.publisher = publisher; return this; } @@ -118,9 +120,9 @@ public String type() { * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withType(String type) { + public VMSSExtensionProperties withType(String type) { this.type = type; return this; } @@ -138,9 +140,9 @@ public String typeHandlerVersion() { * Set the typeHandlerVersion property: Specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) { + public VMSSExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) { this.typeHandlerVersion = typeHandlerVersion; return this; } @@ -162,9 +164,9 @@ public Boolean autoUpgradeMinorVersion() { * redeployed, even with this property set to true. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + public VMSSExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; return this; } @@ -174,7 +176,7 @@ public VmssExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMi * * @return the settings value. */ - public Object settings() { + public VMSSExtensionPropertiesSettings settings() { return this.settings; } @@ -182,9 +184,9 @@ public Object settings() { * Set the settings property: Json formatted public settings for the extension. * * @param settings the settings value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withSettings(Object settings) { + public VMSSExtensionProperties withSettings(VMSSExtensionPropertiesSettings settings) { this.settings = settings; return this; } @@ -195,7 +197,7 @@ public VmssExtensionProperties withSettings(Object settings) { * * @return the protectedSettings value. */ - public Object protectedSettings() { + public VMSSExtensionPropertiesProtectedSettings protectedSettings() { return this.protectedSettings; } @@ -204,9 +206,9 @@ public Object protectedSettings() { * protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withProtectedSettings(Object protectedSettings) { + public VMSSExtensionProperties withProtectedSettings(VMSSExtensionPropertiesProtectedSettings protectedSettings) { this.protectedSettings = protectedSettings; return this; } @@ -226,9 +228,9 @@ public String forceUpdateTag() { * handler will be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withForceUpdateTag(String forceUpdateTag) { + public VMSSExtensionProperties withForceUpdateTag(String forceUpdateTag) { this.forceUpdateTag = forceUpdateTag; return this; } @@ -248,9 +250,9 @@ public List provisionAfterExtensions() { * provisioned. * * @param provisionAfterExtensions the provisionAfterExtensions value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withProvisionAfterExtensions(List provisionAfterExtensions) { + public VMSSExtensionProperties withProvisionAfterExtensions(List provisionAfterExtensions) { this.provisionAfterExtensions = provisionAfterExtensions; return this; } @@ -279,9 +281,9 @@ public Boolean enableAutomaticUpgrade() { * platform if there is a newer version of the extension available. * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + public VMSSExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { this.enableAutomaticUpgrade = enableAutomaticUpgrade; return this; } @@ -299,9 +301,9 @@ public List setupOrder() { * Set the setupOrder property: Indicates the setup order for the extension. * * @param setupOrder the setupOrder value to set. - * @return the VmssExtensionProperties object itself. + * @return the VMSSExtensionProperties object itself. */ - public VmssExtensionProperties withSetupOrder(List setupOrder) { + public VMSSExtensionProperties withSetupOrder(List setupOrder) { this.setupOrder = setupOrder; return this; } @@ -315,20 +317,26 @@ public void validate() { if (publisher() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property publisher in model VmssExtensionProperties")); + "Missing required property publisher in model VMSSExtensionProperties")); } if (type() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model VmssExtensionProperties")); + .log(new IllegalArgumentException("Missing required property type in model VMSSExtensionProperties")); } if (typeHandlerVersion() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property typeHandlerVersion in model VmssExtensionProperties")); + "Missing required property typeHandlerVersion in model VMSSExtensionProperties")); + } + if (settings() != null) { + settings().validate(); + } + if (protectedSettings() != null) { + protectedSettings().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(VmssExtensionProperties.class); + private static final ClientLogger LOGGER = new ClientLogger(VMSSExtensionProperties.class); /** * {@inheritDoc} @@ -340,8 +348,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type); jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); jsonWriter.writeBooleanField("autoUpgradeMinorVersion", this.autoUpgradeMinorVersion); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + jsonWriter.writeJsonField("settings", this.settings); + jsonWriter.writeJsonField("protectedSettings", this.protectedSettings); jsonWriter.writeStringField("forceUpdateTag", this.forceUpdateTag); jsonWriter.writeArrayField("provisionAfterExtensions", this.provisionAfterExtensions, (writer, element) -> writer.writeString(element)); @@ -352,54 +360,55 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VmssExtensionProperties from the JsonReader. + * Reads an instance of VMSSExtensionProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VmssExtensionProperties if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of VMSSExtensionProperties 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 VmssExtensionProperties. + * @throws IOException If an error occurs while reading the VMSSExtensionProperties. */ - public static VmssExtensionProperties fromJson(JsonReader jsonReader) throws IOException { + public static VMSSExtensionProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VmssExtensionProperties deserializedVmssExtensionProperties = new VmssExtensionProperties(); + VMSSExtensionProperties deserializedVMSSExtensionProperties = new VMSSExtensionProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("publisher".equals(fieldName)) { - deserializedVmssExtensionProperties.publisher = reader.getString(); + deserializedVMSSExtensionProperties.publisher = reader.getString(); } else if ("type".equals(fieldName)) { - deserializedVmssExtensionProperties.type = reader.getString(); + deserializedVMSSExtensionProperties.type = reader.getString(); } else if ("typeHandlerVersion".equals(fieldName)) { - deserializedVmssExtensionProperties.typeHandlerVersion = reader.getString(); + deserializedVMSSExtensionProperties.typeHandlerVersion = reader.getString(); } else if ("autoUpgradeMinorVersion".equals(fieldName)) { - deserializedVmssExtensionProperties.autoUpgradeMinorVersion + deserializedVMSSExtensionProperties.autoUpgradeMinorVersion = reader.getNullable(JsonReader::getBoolean); } else if ("settings".equals(fieldName)) { - deserializedVmssExtensionProperties.settings = reader.readUntyped(); + deserializedVMSSExtensionProperties.settings = VMSSExtensionPropertiesSettings.fromJson(reader); } else if ("protectedSettings".equals(fieldName)) { - deserializedVmssExtensionProperties.protectedSettings = reader.readUntyped(); + deserializedVMSSExtensionProperties.protectedSettings + = VMSSExtensionPropertiesProtectedSettings.fromJson(reader); } else if ("forceUpdateTag".equals(fieldName)) { - deserializedVmssExtensionProperties.forceUpdateTag = reader.getString(); + deserializedVMSSExtensionProperties.forceUpdateTag = reader.getString(); } else if ("provisionAfterExtensions".equals(fieldName)) { List provisionAfterExtensions = reader.readArray(reader1 -> reader1.getString()); - deserializedVmssExtensionProperties.provisionAfterExtensions = provisionAfterExtensions; + deserializedVMSSExtensionProperties.provisionAfterExtensions = provisionAfterExtensions; } else if ("provisioningState".equals(fieldName)) { - deserializedVmssExtensionProperties.provisioningState = reader.getString(); + deserializedVMSSExtensionProperties.provisioningState = reader.getString(); } else if ("enableAutomaticUpgrade".equals(fieldName)) { - deserializedVmssExtensionProperties.enableAutomaticUpgrade + deserializedVMSSExtensionProperties.enableAutomaticUpgrade = reader.getNullable(JsonReader::getBoolean); } else if ("setupOrder".equals(fieldName)) { List setupOrder = reader.readArray(reader1 -> VmssExtensionSetupOrder.fromString(reader1.getString())); - deserializedVmssExtensionProperties.setupOrder = setupOrder; + deserializedVMSSExtensionProperties.setupOrder = setupOrder; } else { reader.skipChildren(); } } - return deserializedVmssExtensionProperties; + return deserializedVMSSExtensionProperties; }); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java index 234e34cc6b35..358c49144f20 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/models/package-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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 ServiceFabricManagedClustersMgmtClient. + * Package containing the inner data models for ServiceFabric. * Service Fabric Managed Clusters Management Client. */ package com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java index 95252237c68b..890c745ce04f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/fluent/package-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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 ServiceFabricManagedClustersMgmtClient. + * Package containing the service clients for ServiceFabric. * Service Fabric Managed Clusters Management Client. */ package com.azure.resourcemanager.servicefabricmanagedclusters.fluent; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java index 092bae58ca2f..1a65c507c394 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationResourceImpl.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.servicefabricmanagedclusters.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; import java.util.Collections; import java.util.List; import java.util.Map; @@ -21,7 +22,7 @@ public final class ApplicationResourceImpl implements ApplicationResource, ApplicationResource.Definition, ApplicationResource.Update { private ApplicationResourceInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -35,14 +36,6 @@ public String type() { return this.innerModel().type(); } - public ManagedIdentity identity() { - return this.innerModel().identity(); - } - - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -52,6 +45,14 @@ public Map tags() { } } + public ManagedIdentity identity() { + return this.innerModel().identity(); + } + + public String location() { + return this.innerModel().location(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -102,7 +103,7 @@ public ApplicationResourceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -114,7 +115,7 @@ private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricMana private ApplicationUpdateParameters updateParameters; - public ApplicationResourceImpl withExistingManagedcluster(String resourceGroupName, String clusterName) { + public ApplicationResourceImpl withExistingManagedCluster(String resourceGroupName, String clusterName) { this.resourceGroupName = resourceGroupName; this.clusterName = clusterName; return this; @@ -135,7 +136,7 @@ public ApplicationResource create(Context context) { } ApplicationResourceImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new ApplicationResourceInner(); this.serviceManager = serviceManager; this.applicationName = name; @@ -163,11 +164,11 @@ public ApplicationResource apply(Context context) { } ApplicationResourceImpl(ApplicationResourceInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedclusters"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedClusters"); this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications"); } @@ -187,6 +188,31 @@ public ApplicationResource refresh(Context context) { return this; } + public void readUpgrade() { + serviceManager.applications().readUpgrade(resourceGroupName, clusterName, applicationName); + } + + public void readUpgrade(Context context) { + serviceManager.applications().readUpgrade(resourceGroupName, clusterName, applicationName, context); + } + + public void resumeUpgrade(RuntimeResumeApplicationUpgradeParameters parameters) { + serviceManager.applications().resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void resumeUpgrade(RuntimeResumeApplicationUpgradeParameters parameters, Context context) { + serviceManager.applications() + .resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void startRollback() { + serviceManager.applications().startRollback(resourceGroupName, clusterName, applicationName); + } + + public void startRollback(Context context) { + serviceManager.applications().startRollback(resourceGroupName, clusterName, applicationName, context); + } + public ApplicationResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java index 05b8b6dec578..b76a2b242820 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeResourceImpl.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.servicefabricmanagedclusters.implementation; @@ -17,7 +17,7 @@ public final class ApplicationTypeResourceImpl implements ApplicationTypeResource, ApplicationTypeResource.Definition, ApplicationTypeResource.Update { private ApplicationTypeResourceInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -31,10 +31,6 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -44,6 +40,10 @@ public Map tags() { } } + public String location() { + return this.innerModel().location(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -68,7 +68,7 @@ public ApplicationTypeResourceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -80,7 +80,7 @@ private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricMana private ApplicationTypeUpdateParameters updateParameters; - public ApplicationTypeResourceImpl withExistingManagedcluster(String resourceGroupName, String clusterName) { + public ApplicationTypeResourceImpl withExistingManagedCluster(String resourceGroupName, String clusterName) { this.resourceGroupName = resourceGroupName; this.clusterName = clusterName; return this; @@ -104,7 +104,7 @@ public ApplicationTypeResource create(Context context) { } ApplicationTypeResourceImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new ApplicationTypeResourceInner(); this.serviceManager = serviceManager; this.applicationTypeName = name; @@ -132,11 +132,11 @@ public ApplicationTypeResource apply(Context context) { } ApplicationTypeResourceImpl(ApplicationTypeResourceInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedclusters"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedClusters"); this.applicationTypeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationTypes"); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java index a09ef4a94ab6..0eeffc304c67 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionResourceImpl.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.servicefabricmanagedclusters.implementation; @@ -17,7 +17,7 @@ public final class ApplicationTypeVersionResourceImpl implements ApplicationType ApplicationTypeVersionResource.Definition, ApplicationTypeVersionResource.Update { private ApplicationTypeVersionResourceInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -31,10 +31,6 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -44,6 +40,10 @@ public Map tags() { } } + public String location() { + return this.innerModel().location(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -72,7 +72,7 @@ public ApplicationTypeVersionResourceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -110,7 +110,7 @@ public ApplicationTypeVersionResource create(Context context) { } ApplicationTypeVersionResourceImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new ApplicationTypeVersionResourceInner(); this.serviceManager = serviceManager; this.version = name; @@ -139,11 +139,11 @@ public ApplicationTypeVersionResource apply(Context context) { } ApplicationTypeVersionResourceImpl(ApplicationTypeVersionResourceInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedclusters"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedClusters"); this.applicationTypeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationTypes"); this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java index 5d2f0065bd7f..6212cc163f4b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsClientImpl.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.servicefabricmanagedclusters.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypeVersionsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,96 +52,91 @@ public final class ApplicationTypeVersionsClientImpl implements ApplicationTypeV /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ApplicationTypeVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationTypeVersionsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ApplicationTypeVersionsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ApplicationTypeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientApplicationTypeVersions to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientApplicationTypeVersions to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientA") public interface ApplicationTypeVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationTypeName") String applicationTypeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationTypeName") String applicationTypeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationTypeVersionResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationTypeVersionResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationTypeName") String applicationTypeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationTypeVersionUpdateParameters parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationTypeVersionUpdateParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationTypeName") String applicationTypeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByApplicationTypes(@HostParam("$host") String endpoint, + Mono> listByApplicationTypes( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationTypeName") String applicationTypeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationTypeName") String applicationTypeName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByApplicationTypesNext( - @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); } /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -179,19 +174,17 @@ private Mono> getWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, version, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -230,17 +223,15 @@ private Mono> getWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - applicationTypeName, version, this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, version, accept, context); } /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -258,12 +249,10 @@ private Mono getAsync(String resourceGroupN } /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -281,12 +270,10 @@ public Response getWithResponse(String reso } /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -303,11 +290,9 @@ public ApplicationTypeVersionResourceInner get(String resourceGroupName, String } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -349,20 +334,19 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, version, this.client.getApiVersion(), parameters, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, version, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -405,18 +389,18 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, version, this.client.getApiVersion(), parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, version, contentType, + accept, parameters, context); } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -439,11 +423,9 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -468,11 +450,9 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -492,11 +472,9 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -518,11 +496,9 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -541,11 +517,9 @@ private Mono createOrUpdateAsync(String res } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -565,11 +539,9 @@ private Mono createOrUpdateAsync(String res } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -586,11 +558,9 @@ public ApplicationTypeVersionResourceInner createOrUpdate(String resourceGroupNa } /** - * Creates or updates a Service Fabric managed application type version resource. - * * Create or update a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -611,7 +581,7 @@ public ApplicationTypeVersionResourceInner createOrUpdate(String resourceGroupNa /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -653,18 +623,19 @@ private Mono> updateWithResponseAs } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, version, this.client.getApiVersion(), parameters, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, version, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -707,16 +678,17 @@ private Mono> updateWithResponseAs } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, version, this.client.getApiVersion(), parameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, version, contentType, accept, parameters, context); } /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -737,7 +709,7 @@ private Mono updateAsync(String resourceGro /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -760,7 +732,7 @@ public Response updateWithResponse(String r /** * Updates the tags of an application type version resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -778,11 +750,9 @@ public ApplicationTypeVersionResourceInner update(String resourceGroupName, Stri } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -818,18 +788,16 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, version, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -866,16 +834,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, version, this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, version, accept, context); } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -894,11 +860,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -919,11 +883,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -939,11 +901,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -961,11 +921,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -982,11 +940,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -1004,11 +960,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -1022,11 +976,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -1042,13 +994,10 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1081,22 +1030,19 @@ private Mono> listByApplicati } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByApplicationTypes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByApplicationTypes(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + applicationTypeName, 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())); } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -1131,20 +1077,17 @@ private Mono> listByApplicati final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByApplicationTypes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, this.client.getApiVersion(), accept, context) + .listByApplicationTypes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1162,13 +1105,10 @@ private PagedFlux listByApplicationTypesAsy } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -1187,13 +1127,10 @@ private PagedFlux listByApplicationTypesAsy } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1209,13 +1146,10 @@ public PagedIterable listByApplicationTypes } /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java index 776a9ae843d7..96f55f5c1434 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypeVersionsImpl.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.servicefabricmanagedclusters.implementation; @@ -19,10 +19,10 @@ public final class ApplicationTypeVersionsImpl implements ApplicationTypeVersion private final ApplicationTypeVersionsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ApplicationTypeVersionsImpl(ApplicationTypeVersionsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -81,10 +81,10 @@ public ApplicationTypeVersionResource getById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -106,10 +106,10 @@ public Response getByIdWithResponse(String id, C throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -130,10 +130,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -154,10 +154,10 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -176,7 +176,7 @@ private ApplicationTypeVersionsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java index 8056f571dad4..909755c0409b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationTypesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,93 +52,89 @@ public final class ApplicationTypesClientImpl implements ApplicationTypesClient /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ApplicationTypesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationTypesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ApplicationTypesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ApplicationTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientApplicationTypes to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientApplicationTypes to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientA") public interface ApplicationTypesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationTypeName") String applicationTypeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationTypeName") String applicationTypeName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationTypeName") String applicationTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationTypeResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationTypeName") String applicationTypeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationTypeResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationTypeName") String applicationTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationTypeUpdateParameters parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationTypeName") String applicationTypeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationTypeUpdateParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}") - @ExpectedResponses({ 200, 202, 204 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationTypeName") String applicationTypeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationTypeName") String applicationTypeName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @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); } /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,18 +167,16 @@ private Mono> getWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -216,17 +210,15 @@ private Mono> getWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - applicationTypeName, this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, accept, context); } /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -243,12 +235,10 @@ private Mono getAsync(String resourceGroupName, St } /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -265,12 +255,10 @@ public Response getWithResponse(String resourceGro } /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,11 +273,9 @@ public ApplicationTypeResourceInner get(String resourceGroupName, String cluster } /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -325,20 +311,19 @@ private Mono> createOrUpdateWithResponseA } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, this.client.getApiVersion(), parameters, accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -375,18 +360,18 @@ private Mono> createOrUpdateWithResponseA } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, contentType, accept, + parameters, context); } /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -403,11 +388,9 @@ private Mono createOrUpdateAsync(String resourceGr } /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -425,11 +408,9 @@ public Response createOrUpdateWithResponse(String } /** - * Creates or updates a Service Fabric managed application type name resource. - * * Create or update a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type name resource. @@ -448,7 +429,7 @@ public ApplicationTypeResourceInner createOrUpdate(String resourceGroupName, Str /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -484,18 +465,19 @@ private Mono> updateWithResponseAsync(Str } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -532,16 +514,17 @@ private Mono> updateWithResponseAsync(Str } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, contentType, accept, parameters, context); } /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -560,7 +543,7 @@ private Mono updateAsync(String resourceGroupName, /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -580,7 +563,7 @@ public Response updateWithResponse(String resource /** * Updates the tags of an application type resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param parameters The application type resource updated tags. @@ -597,11 +580,9 @@ public ApplicationTypeResourceInner update(String resourceGroupName, String clus } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -633,17 +614,15 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationTypeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -676,16 +655,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationTypeName, this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationTypeName, accept, context); } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -703,11 +680,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -727,11 +702,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -746,11 +719,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -766,11 +737,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -785,11 +754,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -806,11 +773,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -823,11 +788,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -841,13 +804,10 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -875,21 +835,18 @@ private Mono> listSinglePageAsync(St } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -919,20 +876,17 @@ private Mono> listSinglePageAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -947,13 +901,10 @@ private PagedFlux listAsync(String resourceGroupNa } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -970,13 +921,10 @@ private PagedFlux listAsync(String resourceGroupNa } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -990,13 +938,10 @@ public PagedIterable list(String resourceGroupName } /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java index 3db0ef561618..21e53ca96376 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationTypesImpl.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.servicefabricmanagedclusters.implementation; @@ -19,10 +19,10 @@ public final class ApplicationTypesImpl implements ApplicationTypes { private final ApplicationTypesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ApplicationTypesImpl(ApplicationTypesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -74,10 +74,10 @@ public ApplicationTypeResource getById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -93,10 +93,10 @@ public Response getByIdWithResponse(String id, Context throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -112,10 +112,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -131,10 +131,10 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes"); if (applicationTypeName == null) { @@ -148,7 +148,7 @@ private ApplicationTypesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java index da8bffd3e826..d0364eb5c17a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsClientImpl.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.servicefabricmanagedclusters.implementation; @@ -35,7 +35,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ApplicationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpdateParameters; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RuntimeResumeApplicationUpgradeParameters; import java.nio.ByteBuffer; @@ -54,133 +54,128 @@ public final class ApplicationsClientImpl implements ApplicationsClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ApplicationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ApplicationsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientApplications to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientApplications to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientA") public interface ApplicationsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus") - @ExpectedResponses({ 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> readUpgrade(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback") - @ExpectedResponses({ 202 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> startRollback(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationResourceInner parameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade") - @ExpectedResponses({ 202 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resumeUpgrade(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RuntimeResumeApplicationUpgradeParameters parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationUpdateParameters parameters, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> readUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ApplicationUpdateParameters parameters, @HeaderParam("Accept") String accept, + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}") - @ExpectedResponses({ 200, 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> resumeUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RuntimeResumeApplicationUpgradeParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications") - @ExpectedResponses({ 200 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> startRollback(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @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); } /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 status of the latest application upgrade along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> readUpgradeWithResponseAsync(String resourceGroupName, String clusterName, + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -203,29 +198,27 @@ private Mono>> readUpgradeWithResponseAsync(String res } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.readUpgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 status of the latest application upgrade along with {@link Response} on successful completion of - * {@link Mono}. + * @return a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> readUpgradeWithResponseAsync(String resourceGroupName, String clusterName, + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, String applicationName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -248,195 +241,83 @@ private Mono>> readUpgradeWithResponseAsync(String res } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.readUpgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 the status of the latest application upgrade. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReadUpgradeAsync(String resourceGroupName, String clusterName, - String applicationName) { - Mono>> mono - = readUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 {@link PollerFlux} for polling of the status of the latest application upgrade. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReadUpgradeAsync(String resourceGroupName, String clusterName, - String applicationName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = readUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 SyncPoller} for polling of the status of the latest application upgrade. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, - String applicationName) { - return this.beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); - } - - /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 {@link SyncPoller} for polling of the status of the latest application upgrade. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, - String applicationName, Context context) { - return this.beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, accept, context); } /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 status of the latest application upgrade on successful completion of {@link Mono}. + * @return a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono readUpgradeAsync(String resourceGroupName, String clusterName, String applicationName) { - return beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getAsync(String resourceGroupName, String clusterName, + String applicationName) { + return getWithResponseAsync(resourceGroupName, clusterName, applicationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 status of the latest application upgrade on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono readUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, - Context context) { - return beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void readUpgrade(String resourceGroupName, String clusterName, String applicationName) { - readUpgradeAsync(resourceGroupName, clusterName, applicationName).block(); + public Response getWithResponse(String resourceGroupName, String clusterName, + String applicationName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, applicationName, context).block(); } /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context) { - readUpgradeAsync(resourceGroupName, clusterName, applicationName, context).block(); + public ApplicationResourceInner get(String resourceGroupName, String clusterName, String applicationName) { + return getWithResponse(resourceGroupName, clusterName, applicationName, Context.NONE).getValue(); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 Response} on successful completion of {@link Mono}. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startRollbackWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, ApplicationResourceInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -456,31 +337,36 @@ private Mono>> startRollbackWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.startRollback(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link Response} on successful completion of {@link Mono}. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startRollbackWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, ApplicationResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -500,198 +386,196 @@ private Mono>> startRollbackWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.startRollback(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, context); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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. + * @return the {@link PollerFlux} for polling of the application resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartRollbackAsync(String resourceGroupName, String clusterName, - String applicationName) { + private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { Mono>> mono - = startRollbackWithResponseAsync(resourceGroupName, clusterName, applicationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, this.client.getContext()); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of the application resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartRollbackAsync(String resourceGroupName, String clusterName, - String applicationName, Context context) { + private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, + Context context) { context = this.client.mergeContext(context); Mono>> mono - = startRollbackWithResponseAsync(resourceGroupName, clusterName, applicationName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, context); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the application resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, - String applicationName) { - return this.beginStartRollbackAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); + public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters) + .getSyncPoller(); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of the application resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, - String applicationName, Context context) { - return this.beginStartRollbackAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); + public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context) + .getSyncPoller(); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 A {@link Mono} that completes when a successful response is received. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startRollbackAsync(String resourceGroupName, String clusterName, String applicationName) { - return beginStartRollbackAsync(resourceGroupName, clusterName, applicationName).last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 A {@link Mono} that completes when a successful response is received. + * @return the application resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startRollbackAsync(String resourceGroupName, String clusterName, String applicationName, - Context context) { - return beginStartRollbackAsync(resourceGroupName, clusterName, applicationName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startRollback(String resourceGroupName, String clusterName, String applicationName) { - startRollbackAsync(resourceGroupName, clusterName, applicationName).block(); + public ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, + ApplicationResourceInner parameters) { + return createOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).block(); } /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Create or update a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The application 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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context) { - startRollbackAsync(resourceGroupName, clusterName, applicationName, context).block(); + public ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, + ApplicationResourceInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeUpgradeWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -716,34 +600,31 @@ private Mono>> resumeUpgradeWithResponseAsync(String r } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resumeUpgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), parameters, accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @param parameters The application resource updated tags. * @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 Response} on successful completion of {@link Mono}. + * @return the application resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeUpgradeWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -768,362 +649,308 @@ private Mono>> resumeUpgradeWithResponseAsync(String r } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.resumeUpgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), parameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, contentType, accept, parameters, context); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the application resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResumeUpgradeAsync(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { - Mono>> mono - = resumeUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters) { + return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @param parameters The application resource updated tags. * @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. + * @return the application resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResumeUpgradeAsync(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resumeUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String clusterName, + String applicationName, ApplicationUpdateParameters parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Updates the tags of an application resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. + * @return the application resource. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { - return this.beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, + ApplicationUpdateParameters parameters) { + return updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, Context.NONE).getValue(); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @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 long-running operation. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, - String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context) { - return this.beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters) { - return beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, accept, context); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @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 {@link Mono} that completes when a successful response is received. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters, Context context) { - return beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String applicationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, applicationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. + * @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.SINGLE) - public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters) { - resumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String applicationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, applicationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. - * @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 long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters, Context context) { - resumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String applicationName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); } /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String applicationName) { - 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 (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String applicationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); } /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String applicationName, 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 (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - applicationName, this.client.getApiVersion(), accept, context); + private Mono deleteAsync(String resourceGroupName, String clusterName, String applicationName) { + return beginDeleteAsync(resourceGroupName, clusterName, applicationName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, - String applicationName) { - return getWithResponseAsync(resourceGroupName, clusterName, applicationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String clusterName, String applicationName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, - String applicationName, Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, applicationName, context).block(); + public void delete(String resourceGroupName, String clusterName, String applicationName) { + deleteAsync(resourceGroupName, clusterName, applicationName).block(); } /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationResourceInner get(String resourceGroupName, String clusterName, String applicationName) { - return getWithResponse(resourceGroupName, clusterName, applicationName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String clusterName, String applicationName, Context context) { + deleteAsync(resourceGroupName, clusterName, applicationName, context).block(); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource along with {@link Response} on successful completion of {@link Mono}. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationResourceInner parameters) { + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1139,41 +966,31 @@ private Mono>> createOrUpdateWithResponseAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), parameters, accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource along with {@link Response} on successful completion of {@link Mono}. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationResourceInner parameters, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1189,214 +1006,104 @@ private Mono>> createOrUpdateWithResponseAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 the application resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 {@link PollerFlux} for polling of the application resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ApplicationResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ApplicationResourceInner.class, ApplicationResourceInner.class, context); - } - - /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 SyncPoller} for polling of the application resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters) - .getSyncPoller(); - } - - /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 {@link SyncPoller} for polling of the application resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ApplicationResourceInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String applicationName, ApplicationResourceInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context) - .getSyncPoller(); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource on successful completion of {@link Mono}. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String applicationName, ApplicationResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource on successful completion of {@link Mono}. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - String applicationName, ApplicationResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, - ApplicationResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); } /** - * Creates or updates a Service Fabric managed application resource. - * - * Create or update a Service Fabric managed application resource with the specified name. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The application 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 application resource. + * @return all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationResourceInner createOrUpdate(String resourceGroupName, String clusterName, String applicationName, - ApplicationResourceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); } /** - * Updates the tags of an application resource of a given managed cluster. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 application resource along with {@link Response} on successful completion of {@link Mono}. + * @return the status of the latest application upgrade along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationUpdateParameters parameters) { + private Mono>> readUpgradeWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1416,35 +1123,30 @@ private Mono> updateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.readUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the tags of an application resource of a given managed cluster. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. * @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 application resource along with {@link Response} on successful completion of {@link Mono}. + * @return the status of the latest application upgrade along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String clusterName, String applicationName, ApplicationUpdateParameters parameters, Context context) { + private Mono>> readUpgradeWithResponseAsync(String resourceGroupName, String clusterName, + String applicationName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1464,89 +1166,180 @@ private Mono> updateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), parameters, accept, context); + return service.readUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context); } /** - * Updates the tags of an application resource of a given managed cluster. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 application resource on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of the status of the latest application upgrade. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginReadUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName) { + Mono>> mono + = readUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 {@link PollerFlux} for polling of the status of the latest application upgrade. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginReadUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = readUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 SyncPoller} for polling of the status of the latest application upgrade. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, + String applicationName) { + return this.beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); + } + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 {@link SyncPoller} for polling of the status of the latest application upgrade. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginReadUpgrade(String resourceGroupName, String clusterName, + String applicationName, Context context) { + return this.beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); + } + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 status of the latest application upgrade on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - String applicationName, ApplicationUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono readUpgradeAsync(String resourceGroupName, String clusterName, String applicationName) { + return beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the tags of an application resource of a given managed cluster. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. * @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 application resource along with {@link Response}. + * @return the status of the latest application upgrade on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterName, - String applicationName, ApplicationUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); + private Mono readUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, + Context context) { + return beginReadUpgradeAsync(resourceGroupName, clusterName, applicationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the tags of an application resource of a given managed cluster. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. - * @param parameters The application resource updated tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 application resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationResourceInner update(String resourceGroupName, String clusterName, String applicationName, - ApplicationUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, applicationName, parameters, Context.NONE).getValue(); + public void readUpgrade(String resourceGroupName, String clusterName, String applicationName) { + readUpgradeAsync(resourceGroupName, clusterName, applicationName).block(); } /** - * Deletes a Service Fabric managed application resource. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * Delete a Service Fabric managed application resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context) { + readUpgradeAsync(resourceGroupName, clusterName, applicationName, context).block(); + } + + /** + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String applicationName) { + private Mono>> resumeUpgradeWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1566,21 +1359,28 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.resumeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. @@ -1588,8 +1388,9 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String applicationName, Context context) { + private Mono>> resumeUpgradeWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1609,42 +1410,49 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), accept, context); + return service.resumeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, contentType, accept, + parameters, context); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String applicationName) { + private PollerFlux, Void> beginResumeUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, applicationName); + = resumeUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. @@ -1652,42 +1460,43 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - String applicationName, Context context) { + private PollerFlux, Void> beginResumeUpgradeAsync(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, applicationName, context); + = resumeUpgradeWithResponseAsync(resourceGroupName, clusterName, applicationName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String applicationName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); + public SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters) { + return this.beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters) + .getSyncPoller(); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. @@ -1695,38 +1504,40 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - String applicationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); + public SyncPoller, Void> beginResumeUpgrade(String resourceGroupName, String clusterName, + String applicationName, RuntimeResumeApplicationUpgradeParameters parameters, Context context) { + return this.beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context) + .getSyncPoller(); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String applicationName) { - return beginDeleteAsync(resourceGroupName, clusterName, applicationName).last() + private Mono resumeUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters) { + return beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. @@ -1734,64 +1545,64 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String applicationName, - Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).last() + private Mono resumeUpgradeAsync(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters, Context context) { + return beginResumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String applicationName) { - deleteAsync(resourceGroupName, clusterName, applicationName).block(); + public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters) { + resumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters).block(); } /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String applicationName, Context context) { - deleteAsync(resourceGroupName, clusterName, applicationName, context).block(); + public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters, Context context) { + resumeUpgradeAsync(resourceGroupName, clusterName, applicationName, parameters, context).block(); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterName) { + private Mono>> startRollbackWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1807,33 +1618,33 @@ private Mono> listSinglePageAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.startRollback(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { + private Mono>> startRollbackWithResponseAsync(String resourceGroupName, + String clusterName, String applicationName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1849,94 +1660,166 @@ private Mono> listSinglePageAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.startRollback(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, accept, context); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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, Void> beginStartRollbackAsync(String resourceGroupName, String clusterName, + String applicationName) { + Mono>> mono + = startRollbackWithResponseAsync(resourceGroupName, clusterName, applicationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartRollbackAsync(String resourceGroupName, String clusterName, + String applicationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = startRollbackWithResponseAsync(resourceGroupName, clusterName, applicationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, + String applicationName) { + return this.beginStartRollbackAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); + } + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartRollback(String resourceGroupName, String clusterName, + String applicationName, Context context) { + return this.beginStartRollbackAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startRollbackAsync(String resourceGroupName, String clusterName, String applicationName) { + return beginStartRollbackAsync(resourceGroupName, clusterName, applicationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startRollbackAsync(String resourceGroupName, String clusterName, String applicationName, + Context context) { + return beginStartRollbackAsync(resourceGroupName, clusterName, applicationName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void startRollback(String resourceGroupName, String clusterName, String applicationName) { + startRollbackAsync(resourceGroupName, clusterName, applicationName).block(); + } + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context) { + startRollbackAsync(resourceGroupName, clusterName, applicationName, context).block(); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java index 257e66e85a06..00a22941cf9c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ApplicationsImpl.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.servicefabricmanagedclusters.implementation; @@ -20,40 +20,14 @@ public final class ApplicationsImpl implements Applications { private final ApplicationsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ApplicationsImpl(ApplicationsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public void readUpgrade(String resourceGroupName, String clusterName, String applicationName) { - this.serviceClient().readUpgrade(resourceGroupName, clusterName, applicationName); - } - - public void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context) { - this.serviceClient().readUpgrade(resourceGroupName, clusterName, applicationName, context); - } - - public void startRollback(String resourceGroupName, String clusterName, String applicationName) { - this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName); - } - - public void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context) { - this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName, context); - } - - public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters) { - this.serviceClient().resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters); - } - - public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters, Context context) { - this.serviceClient().resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); - } - public Response getWithResponse(String resourceGroupName, String clusterName, String applicationName, Context context) { Response inner @@ -94,16 +68,42 @@ public PagedIterable list(String resourceGroupName, String return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager())); } + public void readUpgrade(String resourceGroupName, String clusterName, String applicationName) { + this.serviceClient().readUpgrade(resourceGroupName, clusterName, applicationName); + } + + public void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context) { + this.serviceClient().readUpgrade(resourceGroupName, clusterName, applicationName, context); + } + + public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters) { + this.serviceClient().resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters); + } + + public void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters, Context context) { + this.serviceClient().resumeUpgrade(resourceGroupName, clusterName, applicationName, parameters, context); + } + + public void startRollback(String resourceGroupName, String clusterName, String applicationName) { + this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName); + } + + public void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context) { + this.serviceClient().startRollback(resourceGroupName, clusterName, applicationName, context); + } + public ApplicationResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -119,10 +119,10 @@ public Response getByIdWithResponse(String id, Context cont throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -138,10 +138,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -157,10 +157,10 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -174,7 +174,7 @@ private ApplicationsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java new file mode 100644 index 000000000000..061014fa3550 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/FaultSimulationImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.implementation; + +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import java.time.OffsetDateTime; + +public final class FaultSimulationImpl implements FaultSimulation { + private FaultSimulationInner innerObject; + + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; + + FaultSimulationImpl(FaultSimulationInner innerObject, + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String simulationId() { + return this.innerModel().simulationId(); + } + + public FaultSimulationStatus status() { + return this.innerModel().status(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public FaultSimulationDetails details() { + return this.innerModel().details(); + } + + public FaultSimulationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/LongRunningOperationResultImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/LongRunningOperationResultImpl.java index 353d7ba70f11..80c5237cd4c4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/LongRunningOperationResultImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/LongRunningOperationResultImpl.java @@ -1,21 +1,21 @@ // 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.servicefabricmanagedclusters.implementation; -import com.azure.core.management.exception.ManagementError; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.LongRunningOperationResultInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ErrorModelError; import com.azure.resourcemanager.servicefabricmanagedclusters.models.LongRunningOperationResult; import java.time.OffsetDateTime; public final class LongRunningOperationResultImpl implements LongRunningOperationResult { private LongRunningOperationResultInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; LongRunningOperationResultImpl(LongRunningOperationResultInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -40,7 +40,7 @@ public String status() { return this.innerModel().status(); } - public ManagementError error() { + public ErrorModelError error() { return this.innerModel().error(); } @@ -48,7 +48,7 @@ public LongRunningOperationResultInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java index 773fce959603..adc77848710a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsClientImpl.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.servicefabricmanagedclusters.implementation; @@ -36,33 +36,33 @@ public final class ManagedApplyMaintenanceWindowsClientImpl implements ManagedAp /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedApplyMaintenanceWindowsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedApplyMaintenanceWindowsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedApplyMaintenanceWindowsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedApplyMaintenanceWindowsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientManagedApplyMaintenanceWindows - * to be used by the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientManagedApplyMaintenanceWindows to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedApplyMaintenanceWindowsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post(@HostParam("$host") String endpoint, + Mono> post(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } @@ -70,7 +70,7 @@ Mono> post(@HostParam("$host") String endpoint, * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -83,6 +83,10 @@ private Mono> postWithResponseAsync(String resourceGroupName, Str 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.")); @@ -90,14 +94,10 @@ private Mono> postWithResponseAsync(String resourceGroupName, Str if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.post(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -105,7 +105,7 @@ private Mono> postWithResponseAsync(String resourceGroupName, Str * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,6 +119,10 @@ private Mono> postWithResponseAsync(String resourceGroupName, Str 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.")); @@ -126,21 +130,17 @@ private Mono> postWithResponseAsync(String resourceGroupName, Str if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.post(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.post(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -156,7 +156,7 @@ private Mono postAsync(String resourceGroupName, String clusterName) { * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +173,7 @@ public Response postWithResponse(String resourceGroupName, String clusterN * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java index 74369ff6035a..d8b0a8950abe 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedApplyMaintenanceWindowsImpl.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.servicefabricmanagedclusters.implementation; @@ -15,10 +15,10 @@ public final class ManagedApplyMaintenanceWindowsImpl implements ManagedApplyMai private final ManagedApplyMaintenanceWindowsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedApplyMaintenanceWindowsImpl(ManagedApplyMaintenanceWindowsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -35,7 +35,7 @@ private ManagedApplyMaintenanceWindowsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java index 719cf6137793..a11b1ea260b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusImpl.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.servicefabricmanagedclusters.implementation; @@ -13,10 +13,10 @@ public final class ManagedAzResiliencyStatusImpl implements ManagedAzResiliencyStatus { private ManagedAzResiliencyStatusInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; ManagedAzResiliencyStatusImpl(ManagedAzResiliencyStatusInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -38,7 +38,7 @@ public ManagedAzResiliencyStatusInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java index ac05e32c284d..cc70fb5c293c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -37,40 +37,40 @@ public final class ManagedAzResiliencyStatusesClientImpl implements ManagedAzRes /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedAzResiliencyStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedAzResiliencyStatusesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedAzResiliencyStatusesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedAzResiliencyStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientManagedAzResiliencyStatuses to - * be used by the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientManagedAzResiliencyStatuses to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedAzResiliencyStatusesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); } /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -85,6 +85,10 @@ private Mono> getWithResponseAsync(Stri 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.")); @@ -92,21 +96,17 @@ private Mono> getWithResponseAsync(Stri if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.get(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,6 +122,10 @@ private Mono> getWithResponseAsync(Stri 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.")); @@ -129,20 +133,16 @@ private Mono> getWithResponseAsync(Stri if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.get(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -158,7 +158,7 @@ private Mono getAsync(String resourceGroupName, /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,7 +176,7 @@ public Response getWithResponse(String resourceG /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java index 6b2c230d3a57..6338c8f09f19 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedAzResiliencyStatusesImpl.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.servicefabricmanagedclusters.implementation; @@ -18,10 +18,10 @@ public final class ManagedAzResiliencyStatusesImpl implements ManagedAzResilienc private final ManagedAzResiliencyStatusesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedAzResiliencyStatusesImpl(ManagedAzResiliencyStatusesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -51,7 +51,7 @@ private ManagedAzResiliencyStatusesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java index a983250292cf..07673fc8b2e8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterCodeVersionResultImpl.java @@ -1,20 +1,21 @@ // 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.servicefabricmanagedclusters.implementation; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterCodeVersionResult; import com.azure.resourcemanager.servicefabricmanagedclusters.models.OsType; +import java.time.OffsetDateTime; public final class ManagedClusterCodeVersionResultImpl implements ManagedClusterCodeVersionResult { private ManagedClusterCodeVersionResultInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; ManagedClusterCodeVersionResultImpl(ManagedClusterCodeVersionResultInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,7 +36,7 @@ public String clusterCodeVersion() { return this.innerModel().clusterCodeVersion(); } - public String supportExpiryUtc() { + public OffsetDateTime supportExpiryUtc() { return this.innerModel().supportExpiryUtc(); } @@ -47,7 +48,7 @@ public ManagedClusterCodeVersionResultInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java index fe3a795892c3..f740ef91cc8d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterImpl.java @@ -1,20 +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.servicefabricmanagedclusters.implementation; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClientCertificate; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterState; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeMode; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradePolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; import com.azure.resourcemanager.servicefabricmanagedclusters.models.LoadBalancingRule; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedCluster; @@ -34,7 +40,7 @@ public final class ManagedClusterImpl implements ManagedCluster, ManagedCluster.Definition, ManagedCluster.Update { private ManagedClusterInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -61,14 +67,14 @@ public Map tags() { } } - public Sku sku() { - return this.innerModel().sku(); - } - public String etag() { return this.innerModel().etag(); } + public Sku sku() { + return this.innerModel().sku(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -110,8 +116,8 @@ public Integer httpGatewayConnectionPort() { return this.innerModel().httpGatewayConnectionPort(); } - public String adminUsername() { - return this.innerModel().adminUsername(); + public String adminUserName() { + return this.innerModel().adminUserName(); } public String adminPassword() { @@ -220,8 +226,8 @@ public String ipv6Address() { return this.innerModel().ipv6Address(); } - public Boolean enableServicePublicIp() { - return this.innerModel().enableServicePublicIp(); + public Boolean enableServicePublicIP() { + return this.innerModel().enableServicePublicIP(); } public List auxiliarySubnets() { @@ -250,8 +256,8 @@ public Boolean useCustomVnet() { return this.innerModel().useCustomVnet(); } - public String publicIpPrefixId() { - return this.innerModel().publicIpPrefixId(); + public String publicIPPrefixId() { + return this.innerModel().publicIPPrefixId(); } public String publicIPv6PrefixId() { @@ -274,6 +280,18 @@ public Boolean enableHttpGatewayExclusiveAuthMode() { return this.innerModel().enableHttpGatewayExclusiveAuthMode(); } + public AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope() { + return this.innerModel().autoGeneratedDomainNameLabelScope(); + } + + public Integer allocatedOutboundPorts() { + return this.innerModel().allocatedOutboundPorts(); + } + + public String vMImage() { + return this.innerModel().vMImage(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -290,7 +308,7 @@ public ManagedClusterInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -320,7 +338,7 @@ public ManagedCluster create(Context context) { } ManagedClusterImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new ManagedClusterInner(); this.serviceManager = serviceManager; this.clusterName = name; @@ -348,7 +366,7 @@ public ManagedCluster apply(Context context) { } ManagedClusterImpl(ManagedClusterInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -371,6 +389,40 @@ public ManagedCluster refresh(Context context) { return this; } + public Response getFaultSimulationWithResponse(FaultSimulationIdContent parameters, + Context context) { + return serviceManager.managedClusters() + .getFaultSimulationWithResponse(resourceGroupName, clusterName, parameters, context); + } + + public FaultSimulation getFaultSimulation(FaultSimulationIdContent parameters) { + return serviceManager.managedClusters().getFaultSimulation(resourceGroupName, clusterName, parameters); + } + + public PagedIterable listFaultSimulation() { + return serviceManager.managedClusters().listFaultSimulation(resourceGroupName, clusterName); + } + + public PagedIterable listFaultSimulation(Context context) { + return serviceManager.managedClusters().listFaultSimulation(resourceGroupName, clusterName, context); + } + + public void startFaultSimulation(FaultSimulationContentWrapper parameters) { + serviceManager.managedClusters().startFaultSimulation(resourceGroupName, clusterName, parameters); + } + + public void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { + serviceManager.managedClusters().startFaultSimulation(resourceGroupName, clusterName, parameters, context); + } + + public void stopFaultSimulation(FaultSimulationIdContent parameters) { + serviceManager.managedClusters().stopFaultSimulation(resourceGroupName, clusterName, parameters); + } + + public void stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { + serviceManager.managedClusters().stopFaultSimulation(resourceGroupName, clusterName, parameters, context); + } + public ManagedClusterImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -411,8 +463,8 @@ public ManagedClusterImpl withHttpGatewayConnectionPort(Integer httpGatewayConne return this; } - public ManagedClusterImpl withAdminUsername(String adminUsername) { - this.innerModel().withAdminUsername(adminUsername); + public ManagedClusterImpl withAdminUserName(String adminUserName) { + this.innerModel().withAdminUserName(adminUserName); return this; } @@ -502,8 +554,8 @@ public ManagedClusterImpl withIpTags(List ipTags) { return this; } - public ManagedClusterImpl withEnableServicePublicIp(Boolean enableServicePublicIp) { - this.innerModel().withEnableServicePublicIp(enableServicePublicIp); + public ManagedClusterImpl withEnableServicePublicIP(Boolean enableServicePublicIP) { + this.innerModel().withEnableServicePublicIP(enableServicePublicIP); return this; } @@ -527,8 +579,8 @@ public ManagedClusterImpl withUseCustomVnet(Boolean useCustomVnet) { return this; } - public ManagedClusterImpl withPublicIpPrefixId(String publicIpPrefixId) { - this.innerModel().withPublicIpPrefixId(publicIpPrefixId); + public ManagedClusterImpl withPublicIPPrefixId(String publicIPPrefixId) { + this.innerModel().withPublicIPPrefixId(publicIPPrefixId); return this; } @@ -557,6 +609,22 @@ public ManagedClusterImpl withEnableHttpGatewayExclusiveAuthMode(Boolean enableH return this; } + public ManagedClusterImpl + withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope) { + this.innerModel().withAutoGeneratedDomainNameLabelScope(autoGeneratedDomainNameLabelScope); + return this; + } + + public ManagedClusterImpl withAllocatedOutboundPorts(Integer allocatedOutboundPorts) { + this.innerModel().withAllocatedOutboundPorts(allocatedOutboundPorts); + return this; + } + + public ManagedClusterImpl withVMImage(String vMImage) { + this.innerModel().withVMImage(vMImage); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java index 6bc225b07b0a..c50d9bf558cc 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsClientImpl.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.servicefabricmanagedclusters.implementation; @@ -39,61 +39,61 @@ public final class ManagedClusterVersionsClientImpl implements ManagedClusterVer /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedClusterVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedClusterVersionsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedClusterVersionsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedClusterVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientManagedClusterVersions to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientManagedClusterVersions to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedClusterVersionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterVersion") String clusterVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("clusterVersion") String clusterVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByEnvironment(@HostParam("$host") String endpoint, - @PathParam("location") String location, - @PathParam("environment") ManagedClusterVersionEnvironment environment, + Mono>> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("clusterVersion") String clusterVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> getByEnvironment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("environment") ManagedClusterVersionEnvironment environment, + @PathParam("clusterVersion") String clusterVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> listByEnvironment( - @HostParam("$host") String endpoint, @PathParam("location") String location, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("environment") ManagedClusterVersionEnvironment environment, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } @@ -107,7 +107,9 @@ Mono>> listByEnvironment( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric managed cluster code version along with {@link Response} on + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -117,20 +119,20 @@ private Mono> getWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } if (clusterVersion == null) { return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterVersion, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, clusterVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -145,7 +147,9 @@ private Mono> getWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric managed cluster code version along with {@link Response} on + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -155,20 +159,20 @@ private Mono> getWithResponseAsyn return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } if (clusterVersion == null) { return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterVersion, accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, clusterVersion, accept, context); } /** @@ -181,7 +185,9 @@ private Mono> getWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric managed cluster code version on successful completion of + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -200,7 +206,9 @@ private Mono getAsync(String location, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric managed cluster code version along with {@link Response}. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String location, String clusterVersion, @@ -218,7 +226,9 @@ public Response getWithResponse(String loc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric managed cluster code version. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version. */ @ServiceMethod(returns = ReturnType.SINGLE) public ManagedClusterCodeVersionResultInner get(String location, String clusterVersion) { @@ -226,261 +236,281 @@ public ManagedClusterCodeVersionResultInner get(String location, String clusterV } /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment along with - * {@link Response} on successful completion of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByEnvironmentWithResponseAsync(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion) { + private Mono>> listWithResponseAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (environment == null) { - return Mono.error(new IllegalArgumentException("Parameter environment 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 (clusterVersion == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByEnvironment(this.client.getEndpoint(), location, environment, - this.client.getApiVersion(), this.client.getSubscriptionId(), clusterVersion, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment along with - * {@link Response} on successful completion of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByEnvironmentWithResponseAsync(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { + private Mono>> listWithResponseAsync(String location, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (environment == null) { - return Mono.error(new IllegalArgumentException("Parameter environment 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 (clusterVersion == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByEnvironment(this.client.getEndpoint(), location, environment, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterVersion, accept, context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context); } /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment on successful - * completion of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByEnvironmentAsync(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion) { - return getByEnvironmentWithResponseAsync(location, environment, clusterVersion) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono> listAsync(String location) { + return listWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByEnvironmentWithResponse(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { - return getByEnvironmentWithResponseAsync(location, environment, clusterVersion, context).block(); + public Response> listWithResponse(String location, Context context) { + return listWithResponseAsync(location, context).block(); } /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about an available Service Fabric cluster code version by environment. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterCodeVersionResultInner getByEnvironment(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion) { - return getByEnvironmentWithResponse(location, environment, clusterVersion, Context.NONE).getValue(); + public List list(String location) { + return listWithResponse(location, Context.NONE).getValue(); } /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by location along with {@link Response} - * on successful completion of {@link Mono}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync(String location) { + private Mono> getByEnvironmentWithResponseAsync(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (environment == null) { + return Mono.error(new IllegalArgumentException("Parameter environment is required and cannot be null.")); + } + if (clusterVersion == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.getByEnvironment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, environment, clusterVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location along with {@link Response} - * on successful completion of {@link Mono}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listWithResponseAsync(String location, - Context context) { + private Mono> getByEnvironmentWithResponseAsync(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (environment == null) { + return Mono.error(new IllegalArgumentException("Parameter environment is required and cannot be null.")); + } + if (clusterVersion == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterVersion is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.getByEnvironment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, environment, clusterVersion, accept, context); } /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by location on successful completion of - * {@link Mono}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync(String location) { - return listWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getByEnvironmentAsync(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion) { + return getByEnvironmentWithResponseAsync(location, environment, clusterVersion) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location along with {@link Response}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); + public Response getByEnvironmentWithResponse(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { + return getByEnvironmentWithResponseAsync(location, environment, clusterVersion, context).block(); } /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by location. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List list(String location) { - return listWithResponse(location, Context.NONE).getValue(); + public ManagedClusterCodeVersionResultInner getByEnvironment(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion) { + return getByEnvironmentWithResponse(location, environment, clusterVersion, Context.NONE).getValue(); } /** @@ -489,12 +519,14 @@ public List list(String location) { * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by environment along with - * {@link Response} on successful completion of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> @@ -503,20 +535,20 @@ public List list(String location) { 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 (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (environment == null) { return Mono.error(new IllegalArgumentException("Parameter environment 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.listByEnvironment(this.client.getEndpoint(), location, environment, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByEnvironment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, environment, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -526,13 +558,15 @@ public List list(String location) { * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment along with - * {@link Response} on successful completion of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listByEnvironmentWithResponseAsync( @@ -541,20 +575,20 @@ private Mono>> listByEnviron 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 (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (environment == null) { return Mono.error(new IllegalArgumentException("Parameter environment 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.listByEnvironment(this.client.getEndpoint(), location, environment, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.listByEnvironment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, environment, accept, context); } /** @@ -563,12 +597,14 @@ private Mono>> listByEnviron * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by environment on successful completion - * of {@link Mono}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByEnvironmentAsync(String location, @@ -583,13 +619,14 @@ private Mono> listByEnvironmentAsync( * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response> listByEnvironmentWithResponse(String location, @@ -603,11 +640,13 @@ public Response> listByEnvironmentWit * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available code versions for Service Fabric cluster resources by environment. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment. */ @ServiceMethod(returns = ReturnType.SINGLE) public List listByEnvironment(String location, diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java index 1c8268c88d03..0ee78ab536e8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClusterVersionsImpl.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.servicefabricmanagedclusters.implementation; @@ -22,10 +22,10 @@ public final class ManagedClusterVersionsImpl implements ManagedClusterVersions private final ManagedClusterVersionsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedClusterVersionsImpl(ManagedClusterVersionsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -51,29 +51,6 @@ public ManagedClusterCodeVersionResult get(String location, String clusterVersio } } - public Response getByEnvironmentWithResponse(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { - Response inner - = this.serviceClient().getByEnvironmentWithResponse(location, environment, clusterVersion, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedClusterCodeVersionResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedClusterCodeVersionResult getByEnvironment(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion) { - ManagedClusterCodeVersionResultInner inner - = this.serviceClient().getByEnvironment(location, environment, clusterVersion); - if (inner != null) { - return new ManagedClusterCodeVersionResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response> listWithResponse(String location, Context context) { Response> inner = this.serviceClient().listWithResponse(location, context); @@ -99,6 +76,29 @@ public List list(String location) { } } + public Response getByEnvironmentWithResponse(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion, Context context) { + Response inner + = this.serviceClient().getByEnvironmentWithResponse(location, environment, clusterVersion, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterCodeVersionResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedClusterCodeVersionResult getByEnvironment(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion) { + ManagedClusterCodeVersionResultInner inner + = this.serviceClient().getByEnvironment(location, environment, clusterVersion); + if (inner != null) { + return new ManagedClusterCodeVersionResultImpl(inner, this.manager()); + } else { + return null; + } + } + public Response> listByEnvironmentWithResponse(String location, ManagedClusterVersionEnvironment environment, Context context) { Response> inner @@ -131,7 +131,7 @@ private ManagedClusterVersionsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java index 048d4cce6435..7d1c0117e96a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersClientImpl.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.servicefabricmanagedclusters.implementation; @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -33,8 +34,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedClusterListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusterUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,103 +57,841 @@ public final class ManagedClustersClientImpl implements ManagedClustersClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedClustersClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedClustersClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientManagedClusters to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientManagedClusters to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedClusterInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedClusterUpdateParameters parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + 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.ServiceFabric/managedClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + 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" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FaultSimulationIdContent parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFaultSimulation(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> startFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FaultSimulationContentWrapper parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopFaultSimulation(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ManagedClusterInner parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FaultSimulationIdContent parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ManagedClusterUpdateParameters parameters, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listBySubscriptionNext( + @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> listFaultSimulationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context); + } + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, ManagedClusterInner parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, ManagedClusterInner parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, contentType, accept, parameters, context); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ManagedClusterInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 {@link PollerFlux} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ManagedClusterInner.class, ManagedClusterInner.class, context); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> + beginCreateOrUpdate(String resourceGroupName, String clusterName, ManagedClusterInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 {@link SyncPoller} for polling of the managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + ManagedClusterInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + ManagedClusterInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, + ManagedClusterInner parameters) { + return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block(); + } + + /** + * Create or update a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The cluster 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 managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, + ManagedClusterInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block(); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, contentType, accept, parameters, context); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters) { + return updateWithResponseAsync(resourceGroupName, clusterName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @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 managed cluster resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); + } + + /** + * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters The managed cluster resource updated tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 managed cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterInner update(String resourceGroupName, String clusterName, + ManagedClusterUpdateParameters parameters) { + return updateWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName) { + deleteAsync(resourceGroupName, clusterName).block(); } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. + * Delete a Service Fabric managed cluster resource with the specified name. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, Context context) { + deleteAsync(resourceGroupName, clusterName, context).block(); + } + + /** * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -161,29 +904,27 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .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())); } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -198,29 +939,27 @@ private Mono> listByResourceGroupSinglePageAs return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) + .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)); } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -234,11 +973,9 @@ private PagedFlux listByResourceGroupAsync(String resourceG } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -253,11 +990,9 @@ private PagedFlux listByResourceGroupAsync(String resourceG } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -270,11 +1005,9 @@ public PagedIterable listByResourceGroup(String resourceGro } /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -288,8 +1021,6 @@ public PagedIterable listByResourceGroup(String resourceGro } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -317,8 +1048,6 @@ private Mono> listSinglePageAsync() { } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. @@ -348,8 +1077,6 @@ private Mono> listSinglePageAsync(Context con } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -364,8 +1091,6 @@ private PagedFlux listAsync() { } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. @@ -382,8 +1107,6 @@ private PagedFlux listAsync(Context context) { } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws ManagementException thrown if the request is rejected by server. @@ -397,8 +1120,6 @@ public PagedIterable list() { } /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. @@ -414,26 +1135,28 @@ public PagedIterable list(Context context) { } /** - * Gets a Service Fabric managed cluster resource. - * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group along with {@link Response} on successful completion of {@link Mono}. + * @return a fault simulation by the simulationId along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName) { + private Mono> getFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters) { 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.")); @@ -441,39 +1164,44 @@ private Mono> getByResourceGroupWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.getFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Service Fabric managed cluster resource. - * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group along with {@link Response} on successful completion of {@link Mono}. + * @return a fault simulation by the simulationId along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterName, Context context) { + private Mono> getFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters, 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.")); @@ -481,96 +1209,93 @@ private Mono> getByResourceGroupWithResponseAsync( if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return service.getFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); } /** - * Gets a Service Fabric managed cluster resource. - * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group on successful completion of {@link Mono}. + * @return a fault simulation by the simulationId on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + private Mono getFaultSimulationAsync(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + return getFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a Service Fabric managed cluster resource. + * Gets a fault simulation by the simulationId. * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group along with {@link Response}. + * @return a fault simulation by the simulationId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + public Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + return getFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); } /** - * Gets a Service Fabric managed cluster resource. + * Gets a fault simulation by the simulationId. * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * @return a fault simulation by the simulationId. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + public FaultSimulationInner getFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + return getFaultSimulationWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); } /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. + * Gets the list of recent fault simulations for the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, ManagedClusterInner parameters) { + private Mono> listFaultSimulationSinglePageAsync(String resourceGroupName, + String clusterName) { 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.")); @@ -578,43 +1303,38 @@ private Mono>> createOrUpdateWithResponseAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.listFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); } /** - * Creates or updates a Service Fabric managed cluster resource. + * Gets the list of recent fault simulations for the cluster. * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, ManagedClusterInner parameters, Context context) { + private Mono> listFaultSimulationSinglePageAsync(String resourceGroupName, + String clusterName, 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.")); @@ -622,206 +1342,103 @@ private Mono>> createOrUpdateWithResponseAsync(String if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 the managed cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ManagedClusterInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, this.client.getContext()); - } - - /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 {@link PollerFlux} for polling of the managed cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ManagedClusterInner.class, ManagedClusterInner.class, context); - } - - /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 SyncPoller} for polling of the managed cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> - beginCreateOrUpdate(String resourceGroupName, String clusterName, ManagedClusterInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 {@link SyncPoller} for polling of the managed cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedClusterInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, ManagedClusterInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return service + .listFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a Service Fabric managed cluster resource. + * Gets the list of recent fault simulations for the cluster. * - * Create or update a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the cluster as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - ManagedClusterInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFaultSimulationAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listFaultSimulationSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listFaultSimulationNextSinglePageAsync(nextLink)); } /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. + * Gets the list of recent fault simulations for the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the cluster as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, - ManagedClusterInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFaultSimulationAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listFaultSimulationSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listFaultSimulationNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. + * Gets the list of recent fault simulations for the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource. + * @return the list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, - ManagedClusterInner parameters) { - return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listFaultSimulationAsync(resourceGroupName, clusterName)); } /** - * Creates or updates a Service Fabric managed cluster resource. - * - * Create or update a Service Fabric managed cluster resource with the specified name. + * Gets the list of recent fault simulations for the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The cluster 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 managed cluster resource. + * @return the list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner createOrUpdate(String resourceGroupName, String clusterName, - ManagedClusterInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(listFaultSimulationAsync(resourceGroupName, clusterName, context)); } /** - * Updates the tags of of a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Update the tags of of a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. + * @param parameters parameters describing the fault simulation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters) { + private Mono>> startFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationContentWrapper parameters) { 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.")); @@ -829,43 +1446,43 @@ private Mono> updateWithResponseAsync(String resou if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.startFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the tags of of a Service Fabric managed cluster resource. - * - * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * Starts a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. + * @param parameters parameters describing the fault simulation. * @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 managed cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters, Context context) { + private Mono>> startFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationContentWrapper parameters, 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.")); @@ -873,98 +1490,187 @@ private Mono> updateWithResponseAsync(String resou if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + return service.startFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); } /** - * Updates the tags of of a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginStartFaultSimulationAsync(String resourceGroupName, + String clusterName, FaultSimulationContentWrapper parameters) { + Mono>> mono + = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Starts a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. + * @param parameters parameters describing the fault simulation. + * @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 managed cluster resource on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartFaultSimulationAsync(String resourceGroupName, + String clusterName, FaultSimulationContentWrapper parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Updates the tags of of a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters) { + return this.beginStartFaultSimulationAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + } + + /** + * Starts a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. + * @param parameters parameters describing the fault simulation. * @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 managed cluster resource along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context) { + return this.beginStartFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + } + + /** + * Starts a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block(); + private Mono startFaultSimulationAsync(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters) { + return beginStartFaultSimulationAsync(resourceGroupName, clusterName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the tags of of a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Update the tags of of a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startFaultSimulationAsync(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context) { + return beginStartFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param parameters The managed cluster resource updated tags. + * @param parameters parameters describing the fault simulation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managed cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterInner update(String resourceGroupName, String clusterName, - ManagedClusterUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, parameters, Context.NONE).getValue(); + public void startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters) { + startFaultSimulationAsync(resourceGroupName, clusterName, parameters).block(); } /** - * Deletes a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context) { + startFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).block(); + } + + /** + * Stops a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { + private Mono>> stopFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters) { 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.")); @@ -972,24 +1678,26 @@ private Mono>> deleteWithResponseAsync(String resource if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.stopFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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. @@ -997,12 +1705,16 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - Context context) { + private Mono>> stopFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters, 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.")); @@ -1010,42 +1722,44 @@ private Mono>> deleteWithResponseAsync(String resource if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.stopFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, parameters, context); } /** - * Deletes a Service Fabric managed cluster resource. - * - * Delete a Service Fabric managed cluster resource with the specified name. + * Stops a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + private PollerFlux, Void> beginStopFaultSimulationAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters) { + Mono>> mono + = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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. @@ -1053,38 +1767,38 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, - Context context) { + private PollerFlux, Void> beginStopFaultSimulationAsync(String resourceGroupName, + String clusterName, FaultSimulationIdContent parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + Mono>> mono + = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Deletes a Service Fabric managed cluster resource. - * - * Delete a Service Fabric managed cluster resource with the specified name. + * Stops a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { - return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + public SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + return this.beginStopFaultSimulationAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** - * Deletes a Service Fabric managed cluster resource. - * - * Delete a Service Fabric managed cluster resource with the specified name. + * Stops a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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. @@ -1092,35 +1806,35 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + public SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + return this.beginStopFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** - * Deletes a Service Fabric managed cluster resource. - * - * Delete a Service Fabric managed cluster resource with the specified name. + * Stops a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono stopFaultSimulationAsync(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + return beginStopFaultSimulationAsync(resourceGroupName, clusterName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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. @@ -1128,42 +1842,42 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).last() + private Mono stopFaultSimulationAsync(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + return beginStopFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName) { - deleteAsync(resourceGroupName, clusterName).block(); + public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { + stopFaultSimulationAsync(resourceGroupName, clusterName, parameters).block(); } /** - * Deletes a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, Context context) { - deleteAsync(resourceGroupName, clusterName, context).block(); + public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, + Context context) { + stopFaultSimulationAsync(resourceGroupName, clusterName, parameters, context).block(); } /** @@ -1173,7 +1887,8 @@ public void delete(String resourceGroupName, String clusterName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed Cluster list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1201,7 +1916,8 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed Cluster list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, @@ -1227,7 +1943,8 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed Cluster list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1255,7 +1972,8 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed Cluster list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a ManagedCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, @@ -1273,4 +1991,58 @@ private Mono> listBySubscriptionNextSinglePag .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return fault simulation list results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFaultSimulationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listFaultSimulationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 fault simulation list results along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFaultSimulationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listFaultSimulationNext(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/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java index 4510512622ca..c8223b4311c0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedClustersImpl.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.servicefabricmanagedclusters.implementation; @@ -10,7 +10,11 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedClustersClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedCluster; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedClusters; @@ -19,14 +23,43 @@ public final class ManagedClustersImpl implements ManagedClusters { private final ManagedClustersClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedClustersImpl(ManagedClustersClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ManagedCluster getByResourceGroup(String resourceGroupName, String clusterName) { + ManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new ManagedClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); @@ -47,33 +80,59 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedClusterImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + public Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context) { + Response inner + = this.serviceClient().getFaultSimulationWithResponse(resourceGroupName, clusterName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedClusterImpl(inner.getValue(), this.manager())); + new FaultSimulationImpl(inner.getValue(), this.manager())); } else { return null; } } - public ManagedCluster getByResourceGroup(String resourceGroupName, String clusterName) { - ManagedClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + public FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters) { + FaultSimulationInner inner + = this.serviceClient().getFaultSimulation(resourceGroupName, clusterName, parameters); if (inner != null) { - return new ManagedClusterImpl(inner, this.manager()); + return new FaultSimulationImpl(inner, this.manager()); } else { return null; } } - public void deleteByResourceGroup(String resourceGroupName, String clusterName) { - this.serviceClient().delete(resourceGroupName, clusterName); + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().listFaultSimulation(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FaultSimulationImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String clusterName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, context); + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listFaultSimulation(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FaultSimulationImpl(inner1, this.manager())); + } + + public void startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters) { + this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters); + } + + public void startFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationContentWrapper parameters, Context context) { + this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, parameters, context); + } + + public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters) { + this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters); + } + + public void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, + Context context) { + this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, parameters, context); } public ManagedCluster getById(String id) { @@ -136,7 +195,7 @@ private ManagedClustersClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java index 7b022fa995a0..bb5bdfea3c0a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusImpl.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.servicefabricmanagedclusters.implementation; @@ -11,10 +11,10 @@ public final class ManagedMaintenanceWindowStatusImpl implements ManagedMaintenanceWindowStatus { private ManagedMaintenanceWindowStatusInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; ManagedMaintenanceWindowStatusImpl(ManagedMaintenanceWindowStatusInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,23 +35,23 @@ public Boolean canApplyUpdates() { return this.innerModel().canApplyUpdates(); } - public OffsetDateTime lastWindowStatusUpdateAtUtc() { - return this.innerModel().lastWindowStatusUpdateAtUtc(); + public OffsetDateTime lastWindowStatusUpdateAtUTC() { + return this.innerModel().lastWindowStatusUpdateAtUTC(); } - public OffsetDateTime lastWindowStartTimeUtc() { - return this.innerModel().lastWindowStartTimeUtc(); + public OffsetDateTime lastWindowStartTimeUTC() { + return this.innerModel().lastWindowStartTimeUTC(); } - public OffsetDateTime lastWindowEndTimeUtc() { - return this.innerModel().lastWindowEndTimeUtc(); + public OffsetDateTime lastWindowEndTimeUTC() { + return this.innerModel().lastWindowEndTimeUTC(); } public ManagedMaintenanceWindowStatusInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java index 56f74b6f5a2d..e1f8a1a2151b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -37,41 +37,40 @@ public final class ManagedMaintenanceWindowStatusesClientImpl implements Managed /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedMaintenanceWindowStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedMaintenanceWindowStatusesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedMaintenanceWindowStatusesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedMaintenanceWindowStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for - * ServiceFabricManagedClustersMgmtClientManagedMaintenanceWindowStatuses to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for ServiceFabricClientManagedMaintenanceWindowStatuses to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedMaintenanceWindowStatusesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @HeaderParam("Accept") String accept, Context context); } /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -86,6 +85,10 @@ private Mono> getWithResponseAsync 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.")); @@ -93,21 +96,17 @@ private Mono> getWithResponseAsync if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.get(this.client.getEndpoint(), resourceGroupName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,6 +122,10 @@ private Mono> getWithResponseAsync 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.")); @@ -130,20 +133,16 @@ private Mono> getWithResponseAsync if (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName 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.get(this.client.getEndpoint(), resourceGroupName, clusterName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context); } /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -159,7 +158,7 @@ private Mono getAsync(String resourceGroupN /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +176,7 @@ public Response getWithResponse(String reso /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java index 41f077bdd6d5..45ef1c57158a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedMaintenanceWindowStatusesImpl.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.servicefabricmanagedclusters.implementation; @@ -18,10 +18,10 @@ public final class ManagedMaintenanceWindowStatusesImpl implements ManagedMainte private final ManagedMaintenanceWindowStatusesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedMaintenanceWindowStatusesImpl(ManagedMaintenanceWindowStatusesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -51,7 +51,7 @@ private ManagedMaintenanceWindowStatusesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java index 8bc85b0dbaa4..b76f60bf6f76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ManagedUnsupportedVMSizesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedVMSizesResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult; import reactor.core.publisher.Mono; /** @@ -42,291 +42,291 @@ public final class ManagedUnsupportedVMSizesClientImpl implements ManagedUnsuppo /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ManagedUnsupportedVMSizesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedUnsupportedVMSizesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ManagedUnsupportedVMSizesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ManagedUnsupportedVMSizesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientManagedUnsupportedVMSizes to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientManagedUnsupportedVMSizes to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientM") public interface ManagedUnsupportedVMSizesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("vmSize") String vmSize, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("vmSize") String vmSize, - @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @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); } /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 lists of unsupported vm sizes for Service Fabric Managed Clusters along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String vmSize) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (vmSize == null) { + return Mono.error(new IllegalArgumentException("Parameter vmSize is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, vmSize, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { + private Mono> getWithResponseAsync(String location, String vmSize, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (vmSize == null) { + return Mono.error(new IllegalArgumentException("Parameter vmSize is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), location, 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)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, vmSize, accept, context); } /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedFlux}. + * @return unsupported vm size for Service Fabric Managed Clusters on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String vmSize) { + return getWithResponseAsync(location, vmSize).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedFlux}. + * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String vmSize, Context context) { + return getWithResponseAsync(location, vmSize, context).block(); } /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. + * @return unsupported vm size for Service Fabric Managed Clusters. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedVMSizeInner get(String location, String vmSize) { + return getWithResponse(location, vmSize, Context.NONE).getValue(); } /** * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get unsupported vm size for Service Fabric Managed Clusters. - * - * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response} on successful - * completion of {@link Mono}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String vmSize) { + private Mono> listSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (vmSize == null) { - return Mono.error(new IllegalArgumentException("Parameter vmSize is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), vmSize, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. * @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 unsupported vm size for Service Fabric Managed Clusters along with {@link Response} on successful - * completion of {@link Mono}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String vmSize, Context context) { + private Mono> listSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (vmSize == null) { - return Mono.error(new IllegalArgumentException("Parameter vmSize is required and cannot be null.")); + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), vmSize, accept, context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return unsupported vm size for Service Fabric Managed Clusters on successful completion of {@link Mono}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String vmSize) { - return getWithResponseAsync(location, vmSize).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. * @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 unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String vmSize, Context context) { - return getWithResponseAsync(location, vmSize, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return unsupported vm size for Service Fabric Managed Clusters. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedVMSizeInner get(String location, String vmSize) { - return getWithResponse(location, vmSize, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * + * @param location The location for the cluster code versions. This is different from cluster location. + * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java index b89008869f65..c2bac8b9f382 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedUnsupportedVMSizesImpl.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.servicefabricmanagedclusters.implementation; @@ -19,24 +19,14 @@ public final class ManagedUnsupportedVMSizesImpl implements ManagedUnsupportedVM private final ManagedUnsupportedVMSizesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ManagedUnsupportedVMSizesImpl(ManagedUnsupportedVMSizesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedVMSizeImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedVMSizeImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String vmSize, Context context) { Response inner = this.serviceClient().getWithResponse(location, vmSize, context); if (inner != null) { @@ -56,11 +46,21 @@ public ManagedVMSize get(String location, String vmSize) { } } + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedVMSizeImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedVMSizeImpl(inner1, this.manager())); + } + private ManagedUnsupportedVMSizesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java index 7d4a023705c0..5edb53083283 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ManagedVMSizeImpl.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.servicefabricmanagedclusters.implementation; @@ -11,10 +11,10 @@ public final class ManagedVMSizeImpl implements ManagedVMSize { private ManagedVMSizeInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; ManagedVMSizeImpl(ManagedVMSizeInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -39,7 +39,7 @@ public ManagedVMSizeInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java index 7d93c09cdda6..1bb851f8f25a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeAvailableSkuImpl.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.servicefabricmanagedclusters.implementation; @@ -12,10 +12,10 @@ public final class NodeTypeAvailableSkuImpl implements NodeTypeAvailableSku { private NodeTypeAvailableSkuInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; NodeTypeAvailableSkuImpl(NodeTypeAvailableSkuInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -36,7 +36,7 @@ public NodeTypeAvailableSkuInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java index f92cc5bd89d2..caa659c11bbb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeImpl.java @@ -1,9 +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.servicefabricmanagedclusters.implementation; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner; @@ -11,6 +13,9 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType; import com.azure.resourcemanager.servicefabricmanagedclusters.models.EndpointRangeDescription; import com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedResourceProvisioningState; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NetworkSecurityRule; @@ -20,12 +25,13 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeSku; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters; import com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtension; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension; import java.util.Collections; import java.util.List; import java.util.Map; @@ -33,7 +39,7 @@ public final class NodeTypeImpl implements NodeType, NodeType.Definition, NodeType.Update { private NodeTypeInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -56,14 +62,14 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public NodeTypeSku sku() { return this.innerModel().sku(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public boolean isPrimary() { return this.innerModel().isPrimary(); } @@ -139,8 +145,8 @@ public List vmSecrets() { } } - public List vmExtensions() { - List inner = this.innerModel().vmExtensions(); + public List vmExtensions() { + List inner = this.innerModel().vmExtensions(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -265,8 +271,8 @@ public Boolean secureBootEnabled() { return this.innerModel().secureBootEnabled(); } - public Boolean enableNodePublicIp() { - return this.innerModel().enableNodePublicIp(); + public Boolean enableNodePublicIP() { + return this.innerModel().enableNodePublicIP(); } public Boolean enableNodePublicIPv6() { @@ -316,6 +322,19 @@ public String computerNamePrefix() { return this.innerModel().computerNamePrefix(); } + public List vmApplications() { + List inner = this.innerModel().vmApplications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean zoneBalance() { + return this.innerModel().zoneBalance(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -324,7 +343,7 @@ public NodeTypeInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -357,7 +376,7 @@ public NodeType create(Context context) { } NodeTypeImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new NodeTypeInner(); this.serviceManager = serviceManager; this.nodeTypeName = name; @@ -371,21 +390,19 @@ public NodeTypeImpl update() { public NodeType apply() { this.innerObject = serviceManager.serviceClient() .getNodeTypes() - .updateWithResponse(resourceGroupName, clusterName, nodeTypeName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, clusterName, nodeTypeName, updateParameters, Context.NONE); return this; } public NodeType apply(Context context) { this.innerObject = serviceManager.serviceClient() .getNodeTypes() - .updateWithResponse(resourceGroupName, clusterName, nodeTypeName, updateParameters, context) - .getValue(); + .update(resourceGroupName, clusterName, nodeTypeName, updateParameters, context); return this; } NodeTypeImpl(NodeTypeInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -409,12 +426,28 @@ public NodeType refresh(Context context) { return this; } - public void restart(NodeTypeActionParameters parameters) { - serviceManager.nodeTypes().restart(resourceGroupName, clusterName, nodeTypeName, parameters); + public void deallocate(NodeTypeActionParameters parameters) { + serviceManager.nodeTypes().deallocate(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void restart(NodeTypeActionParameters parameters, Context context) { - serviceManager.nodeTypes().restart(resourceGroupName, clusterName, nodeTypeName, parameters, context); + public void deallocate(NodeTypeActionParameters parameters, Context context) { + serviceManager.nodeTypes().deallocate(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void deleteNode(NodeTypeActionParameters parameters) { + serviceManager.nodeTypes().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void deleteNode(NodeTypeActionParameters parameters, Context context) { + serviceManager.nodeTypes().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void redeploy(NodeTypeActionParameters parameters) { + serviceManager.nodeTypes().redeploy(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void redeploy(NodeTypeActionParameters parameters, Context context) { + serviceManager.nodeTypes().redeploy(resourceGroupName, clusterName, nodeTypeName, parameters, context); } public void reimage(NodeTypeActionParameters parameters) { @@ -425,12 +458,56 @@ public void reimage(NodeTypeActionParameters parameters, Context context) { serviceManager.nodeTypes().reimage(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public void deleteNode(NodeTypeActionParameters parameters) { - serviceManager.nodeTypes().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters); + public void restart(NodeTypeActionParameters parameters) { + serviceManager.nodeTypes().restart(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void deleteNode(NodeTypeActionParameters parameters, Context context) { - serviceManager.nodeTypes().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters, context); + public void restart(NodeTypeActionParameters parameters, Context context) { + serviceManager.nodeTypes().restart(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void start(NodeTypeActionParameters parameters) { + serviceManager.nodeTypes().start(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void start(NodeTypeActionParameters parameters, Context context) { + serviceManager.nodeTypes().start(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void startFaultSimulation(FaultSimulationContentWrapper parameters) { + serviceManager.nodeTypes().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context) { + serviceManager.nodeTypes() + .startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void stopFaultSimulation(FaultSimulationIdContent parameters) { + serviceManager.nodeTypes().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void stopFaultSimulation(FaultSimulationIdContent parameters, Context context) { + serviceManager.nodeTypes() + .stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public Response getFaultSimulationWithResponse(FaultSimulationIdContent parameters, + Context context) { + return serviceManager.nodeTypes() + .getFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public FaultSimulation getFaultSimulation(FaultSimulationIdContent parameters) { + return serviceManager.nodeTypes().getFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public PagedIterable listFaultSimulation() { + return serviceManager.nodeTypes().listFaultSimulation(resourceGroupName, clusterName, nodeTypeName); + } + + public PagedIterable listFaultSimulation(Context context) { + return serviceManager.nodeTypes().listFaultSimulation(resourceGroupName, clusterName, nodeTypeName, context); } public NodeTypeImpl withTags(Map tags) { @@ -528,7 +605,7 @@ public NodeTypeImpl withVmSecrets(List vmSecrets) { return this; } - public NodeTypeImpl withVmExtensions(List vmExtensions) { + public NodeTypeImpl withVmExtensions(List vmExtensions) { this.innerModel().withVmExtensions(vmExtensions); return this; } @@ -643,8 +720,8 @@ public NodeTypeImpl withSecureBootEnabled(Boolean secureBootEnabled) { return this; } - public NodeTypeImpl withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.innerModel().withEnableNodePublicIp(enableNodePublicIp); + public NodeTypeImpl withEnableNodePublicIP(Boolean enableNodePublicIP) { + this.innerModel().withEnableNodePublicIP(enableNodePublicIP); return this; } @@ -694,6 +771,16 @@ public NodeTypeImpl withComputerNamePrefix(String computerNamePrefix) { return this; } + public NodeTypeImpl withVmApplications(List vmApplications) { + this.innerModel().withVmApplications(vmApplications); + return this; + } + + public NodeTypeImpl withZoneBalance(Boolean zoneBalance) { + this.innerModel().withZoneBalance(zoneBalance); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java index dd54327510c0..e6ce4af4fc01 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusClientImpl.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.servicefabricmanagedclusters.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypeSkusClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeListSkuResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult; import reactor.core.publisher.Mono; /** @@ -42,50 +42,47 @@ public final class NodeTypeSkusClientImpl implements NodeTypeSkusClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of NodeTypeSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - NodeTypeSkusClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + NodeTypeSkusClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(NodeTypeSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientNodeTypeSkus to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientNodeTypeSkus to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientN") public interface NodeTypeSkusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @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); } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,19 +114,17 @@ private Mono> listSinglePageAsync(Strin } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, 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())); } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param context The context to associate with this operation. @@ -163,18 +158,16 @@ private Mono> listSinglePageAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - nodeTypeName, this.client.getApiVersion(), accept, context) + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,11 +183,9 @@ private PagedFlux listAsync(String resourceGroupName, } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param context The context to associate with this operation. @@ -211,11 +202,9 @@ private PagedFlux listAsync(String resourceGroupName, } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -230,11 +219,9 @@ public PagedIterable list(String resourceGroupName, S } /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java index 42b1b46bc113..3c22082abbef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypeSkusImpl.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.servicefabricmanagedclusters.implementation; @@ -17,10 +17,10 @@ public final class NodeTypeSkusImpl implements NodeTypeSkus { private final NodeTypeSkusClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public NodeTypeSkusImpl(NodeTypeSkusClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -42,7 +42,7 @@ private NodeTypeSkusClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java index bef65eb09dfc..829a459737ed 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -34,9 +34,13 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeListResult; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -54,291 +58,1996 @@ public final class NodeTypesClientImpl implements NodeTypesClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of NodeTypesClientImpl. * * @param client the instance of the service client containing this operation class. */ - NodeTypesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + NodeTypesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(NodeTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientNodeTypes to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientNodeTypes to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientN") public interface NodeTypesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByManagedClusters(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NodeTypeActionParameters parameters, @HeaderParam("Accept") String accept, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reimage(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NodeTypeActionParameters parameters, @HeaderParam("Accept") String accept, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeUpdateParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode") - @ExpectedResponses({ 200, 202 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteNode(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NodeTypeActionParameters parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByManagedClusters(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> deallocate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NodeTypeInner parameters, @HeaderParam("Accept") String accept, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteNode(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> redeploy(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reimage(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NodeTypeActionParameters parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> startFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") FaultSimulationContentWrapper parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stopFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FaultSimulationIdContent parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NodeTypeUpdateParameters parameters, @HeaderParam("Accept") String accept, + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FaultSimulationIdContent parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}") - @ExpectedResponses({ 200, 202, 204 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listFaultSimulation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("nodeTypeName") String nodeTypeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("nodeTypeName") String nodeTypeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByManagedClustersNext( - @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); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFaultSimulationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the list of Node types of the specified managed cluster. - * - * Gets all Node types of the specified managed cluster. + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Service Fabric node type of a given managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Service Fabric node type of a given managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, accept, context); + } + + /** + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Service Fabric node type of a given managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String nodeTypeName) { + return getWithResponseAsync(resourceGroupName, clusterName, nodeTypeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Service Fabric node type of a given managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, + Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, context).block(); + } + + /** + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Service Fabric node type of a given managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NodeTypeInner get(String resourceGroupName, String clusterName, String nodeTypeName) { + return getWithResponse(resourceGroupName, clusterName, nodeTypeName, Context.NONE).getValue(); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, nodeTypeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, nodeTypeName, contentType, accept, + parameters, context); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NodeTypeInner> beginCreateOrUpdateAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NodeTypeInner.class, NodeTypeInner.class, this.client.getContext()); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 {@link PollerFlux} for polling of describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NodeTypeInner> beginCreateOrUpdateAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NodeTypeInner.class, NodeTypeInner.class, context); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 SyncPoller} for polling of describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 {@link SyncPoller} for polling of describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getSyncPoller(); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters) { + return createOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + } + + /** + * Create or update a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The node type 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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeUpdateParameters parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, nodeTypeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeUpdateParameters parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.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, clusterName, nodeTypeName, contentType, accept, parameters, context); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NodeTypeInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeUpdateParameters parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NodeTypeInner.class, NodeTypeInner.class, this.client.getContext()); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NodeTypeInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeUpdateParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + NodeTypeInner.class, NodeTypeInner.class, context); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NodeTypeInner> beginUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeUpdateParameters parameters) { + return this.beginUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub + * set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NodeTypeInner> beginUpdate(String resourceGroupName, + String clusterName, String nodeTypeName, NodeTypeUpdateParameters parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).getSyncPoller(); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters, Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters) { + return updateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + } + + /** + * Update the configuration of a node type of a given managed cluster, only updating tags. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters The parameters to update the node type configuration. + * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeUpdateParameters parameters, Context context) { + return updateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, accept, context); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String nodeTypeName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, nodeTypeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String nodeTypeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String nodeTypeName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName).getSyncPoller(); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String nodeTypeName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName, context).getSyncPoller(); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String nodeTypeName) { + return beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String nodeTypeName) { + deleteAsync(resourceGroupName, clusterName, nodeTypeName).block(); + } + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { + deleteAsync(resourceGroupName, clusterName, nodeTypeName, context).block(); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClustersSinglePageAsync(String resourceGroupName, + String clusterName) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, 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())); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClustersSinglePageAsync(String resourceGroupName, + String clusterName, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClustersAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByManagedClustersSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByManagedClustersNextSinglePageAsync(nextLink)); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClustersAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByManagedClustersSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listByManagedClustersNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedClusters(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByManagedClustersAsync(resourceGroupName, clusterName)); + } + + /** + * Gets all Node types of the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedClusters(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(listByManagedClustersAsync(resourceGroupName, clusterName, context)); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deallocateWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deallocate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deallocateWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deallocate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginDeallocateAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + Mono>> mono + = deallocateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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, Void> beginDeallocateAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deallocateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeallocate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + return this.beginDeallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeallocate(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + return this.beginDeallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getSyncPoller(); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deallocateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + return beginDeallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deallocateAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + return beginDeallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + deallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + } + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + deallocateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteNodeWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteNode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteNodeWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteNode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginDeleteNodeAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + Mono>> mono + = deleteNodeWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @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, Void> beginDeleteNodeAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteNodeWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteNode(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + return this.beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteNode(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + return this.beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getSyncPoller(); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteNodeAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + return beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteNodeAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + return beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + deleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + } + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + deleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + } + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Node types of the specified managed cluster along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClustersSinglePageAsync(String resourceGroupName, - String clusterName) { + private Mono>> redeployWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByManagedClusters(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), clusterName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.redeploy(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the list of Node types of the specified managed cluster. - * - * Gets all Node types of the specified managed cluster. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. * @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 all Node types of the specified managed cluster along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClustersSinglePageAsync(String resourceGroupName, - String clusterName, Context context) { + private Mono>> redeployWithResponseAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (clusterName == null) { return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); } + if (nodeTypeName == null) { + return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByManagedClusters(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - clusterName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.redeploy(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, contentType, accept, parameters, context); } /** - * Gets the list of Node types of the specified managed cluster. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginRedeployAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + Mono>> mono + = redeployWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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 all Node types of the specified managed cluster as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClustersAsync(String resourceGroupName, String clusterName) { - return new PagedFlux<>(() -> listByManagedClustersSinglePageAsync(resourceGroupName, clusterName), - nextLink -> listByManagedClustersNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRedeployAsync(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = redeployWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Gets the list of Node types of the specified managed cluster. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRedeploy(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters) { + return this.beginRedeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + } + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. * @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 all Node types of the specified managed cluster as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByManagedClustersAsync(String resourceGroupName, String clusterName, - Context context) { - return new PagedFlux<>(() -> listByManagedClustersSinglePageAsync(resourceGroupName, clusterName, context), - nextLink -> listByManagedClustersNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRedeploy(String resourceGroupName, String clusterName, + String nodeTypeName, NodeTypeActionParameters parameters, Context context) { + return this.beginRedeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getSyncPoller(); } /** - * Gets the list of Node types of the specified managed cluster. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono redeployAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + return beginRedeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedClusters(String resourceGroupName, String clusterName) { - return new PagedIterable<>(listByManagedClustersAsync(resourceGroupName, clusterName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono redeployAsync(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + return beginRedeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the list of Node types of the specified managed cluster. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * Gets all Node types of the specified managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + redeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + } + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. * @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 all Node types of the specified managed cluster as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByManagedClusters(String resourceGroupName, String clusterName, - Context context) { - return new PagedIterable<>(listByManagedClustersAsync(resourceGroupName, clusterName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + redeployAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> reimageWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -363,23 +2072,23 @@ private Mono>> restartWithResponseAsync(String resourc } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.reimage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @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. @@ -387,7 +2096,7 @@ private Mono>> restartWithResponseAsync(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> reimageWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -412,46 +2121,43 @@ private Mono>> restartWithResponseAsync(String resourc } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.reimage(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, contentType, accept, parameters, context); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, Void> beginRestartAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginReimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { Mono>> mono - = restartWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + = reimageWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @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. @@ -459,46 +2165,42 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginReimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = restartWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + = reimageWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return this.beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + return this.beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @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. @@ -506,44 +2208,40 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return this.beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + return this.beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) .getSyncPoller(); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono reimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + return beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @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. @@ -551,70 +2249,64 @@ private Mono restartAsync(String resourceGroupName, String clusterName, St * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono reimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + return beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String clusterName, String nodeTypeName, + public void reimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - restartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + reimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); } /** - * Restarts one or more nodes on the node type. - * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for reimage action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String clusterName, String nodeTypeName, + public void reimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - restartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + reimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); } - /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + /** + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reimageWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -639,23 +2331,23 @@ private Mono>> reimageWithResponseAsync(String resourc } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.reimage(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @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. @@ -663,7 +2355,7 @@ private Mono>> reimageWithResponseAsync(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reimageWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> restartWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -688,46 +2380,43 @@ private Mono>> reimageWithResponseAsync(String resourc } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.reimage(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.restart(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, contentType, accept, parameters, context); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, Void> beginReimageAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { Mono>> mono - = reimageWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + = restartWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @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. @@ -735,46 +2424,42 @@ private PollerFlux, Void> beginReimageAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReimageAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = reimageWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + = restartWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return this.beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + return this.beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @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. @@ -782,44 +2467,40 @@ public SyncPoller, Void> beginReimage(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginReimage(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginRestart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return this.beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + return this.beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) .getSyncPoller(); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono restartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + return beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @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. @@ -827,70 +2508,64 @@ private Mono reimageAsync(String resourceGroupName, String clusterName, St * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reimageAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono restartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return beginReimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + return beginRestartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reimage(String resourceGroupName, String clusterName, String nodeTypeName, + public void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - reimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + restartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); } /** - * Reimages one or more nodes on the node type. - * - * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for reimage action. + * @param parameters parameters for restart action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void reimage(String resourceGroupName, String clusterName, String nodeTypeName, + public void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - reimageAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + restartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteNodeWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> startWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -915,23 +2590,23 @@ private Mono>> deleteNodeWithResponseAsync(String reso } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.deleteNode(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. @@ -939,7 +2614,7 @@ private Mono>> deleteNodeWithResponseAsync(String reso * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteNodeWithResponseAsync(String resourceGroupName, String clusterName, + private Mono>> startWithResponseAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -964,46 +2639,43 @@ private Mono>> deleteNodeWithResponseAsync(String reso } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.deleteNode(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.start(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, nodeTypeName, contentType, accept, parameters, context); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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, Void> beginDeleteNodeAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { Mono>> mono - = deleteNodeWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + = startWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. @@ -1011,46 +2683,42 @@ private PollerFlux, Void> beginDeleteNodeAsync(String resourceG * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteNodeAsync(String resourceGroupName, String clusterName, + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteNodeWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + = startWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteNode(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return this.beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + return this.beginStartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. @@ -1058,44 +2726,39 @@ public SyncPoller, Void> beginDeleteNode(String resourceGroupNa * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteNode(String resourceGroupName, String clusterName, + public SyncPoller, Void> beginStart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return this.beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) - .getSyncPoller(); + return this.beginStartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).getSyncPoller(); } /** - * Deletes one or more nodes on the node type. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteNodeAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono startAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - return beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + return beginStartAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. @@ -1103,70 +2766,64 @@ private Mono deleteNodeAsync(String resourceGroupName, String clusterName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteNodeAsync(String resourceGroupName, String clusterName, String nodeTypeName, + private Mono startAsync(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - return beginDeleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + return beginStartAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes one or more nodes on the node type. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + public void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - deleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + startAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); } /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + public void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - deleteNodeAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + startAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); } /** - * Gets a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Get a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric node type of a given managed cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName) { + private Mono>> startFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1185,31 +2842,36 @@ private Mono> getWithResponseAsync(String resourceGroupN if (nodeTypeName == null) { return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.startFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Get a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @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 Service Fabric node type of a given managed cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName, Context context) { + private Mono>> startFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1228,87 +2890,191 @@ private Mono> getWithResponseAsync(String resourceGroupN if (nodeTypeName == null) { return Mono.error(new IllegalArgumentException("Parameter nodeTypeName is required and cannot be null.")); } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - nodeTypeName, this.client.getApiVersion(), accept, context); + return service.startFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context); } /** - * Gets a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Void> beginStartFaultSimulationAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters) { + Mono>> mono + = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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 Service Fabric node type of a given managed cluster on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterName, String nodeTypeName) { - return getWithResponseAsync(resourceGroupName, clusterName, nodeTypeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartFaultSimulationAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = startFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Gets a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationContentWrapper parameters) { + return this.beginStartFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters) + .getSyncPoller(); + } + + /** + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @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 Service Fabric node type of a given managed cluster along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStartFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationContentWrapper parameters, Context context) { + return this.beginStartFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .getSyncPoller(); + } + + /** + * Starts a fault simulation on the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, context).block(); + private Mono startFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters) { + return beginStartFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters, Context context) { + return beginStartFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Service Fabric node type of a given managed cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NodeTypeInner get(String resourceGroupName, String clusterName, String nodeTypeName) { - return getWithResponse(resourceGroupName, clusterName, nodeTypeName, Context.NONE).getValue(); + public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters) { + startFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); } /** - * Creates or updates a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Create or update a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters, Context context) { + startFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + } + + /** + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters) { + private Mono>> stopFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1332,32 +3098,31 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.stopFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context) { + private Mono>> stopFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1381,210 +3146,187 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.stopFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NodeTypeInner> beginCreateOrUpdateAsync(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters) { + private PollerFlux, Void> beginStopFaultSimulationAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NodeTypeInner.class, NodeTypeInner.class, this.client.getContext()); + = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NodeTypeInner> beginCreateOrUpdateAsync(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context) { + private PollerFlux, Void> beginStopFaultSimulationAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NodeTypeInner.class, NodeTypeInner.class, context); + = stopFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Creates or updates a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Create or update a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).getSyncPoller(); + public SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters) { + return this.beginStopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters) + .getSyncPoller(); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub - * set of nodes in the cluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NodeTypeInner> beginCreateOrUpdate(String resourceGroupName, - String clusterName, String nodeTypeName, NodeTypeInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + public SyncPoller, Void> beginStopFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context) { + return this.beginStopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) .getSyncPoller(); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster on - * successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() + private Mono stopFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters) { + return beginStopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Create or update a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster on - * successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() + private Mono stopFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters, Context context) { + return beginStopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates a Service Fabric node type. - * - * Create or update a Service Fabric node type of a given managed cluster. + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters) { - return createOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); + public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters) { + stopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters).block(); } /** - * Creates or updates a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Create or update a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The node type resource. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NodeTypeInner createOrUpdate(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters, Context context) { + stopFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); } /** - * Update the tags of a node type resource of a given managed cluster. - * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response} on successful completion of {@link Mono}. + * @return a fault simulation by the simulationId along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName, NodeTypeUpdateParameters parameters) { + private Mono> getFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1608,32 +3350,32 @@ private Mono> updateWithResponseAsync(String resourceGro } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.getFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update the tags of a node type resource of a given managed cluster. - * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response} on successful completion of {@link Mono}. + * @return a fault simulation by the simulationId along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName, NodeTypeUpdateParameters parameters, Context context) { + private Mono> getFaultSimulationWithResponseAsync(String resourceGroupName, + String clusterName, String nodeTypeName, FaultSimulationIdContent parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1657,92 +3399,87 @@ private Mono> updateWithResponseAsync(String resourceGro } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), parameters, accept, context); + return service.getFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, contentType, accept, + parameters, context); } /** - * Update the tags of a node type resource of a given managed cluster. - * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster on - * successful completion of {@link Mono}. + * @return a fault simulation by the simulationId on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters) + private Mono getFaultSimulationAsync(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters) { + return getFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update the tags of a node type resource of a given managed cluster. - * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameter with fault simulation id. * @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 describes a node type in the cluster, each node type represents sub set of nodes in the cluster along - * with {@link Response}. + * @return a fault simulation by the simulationId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context).block(); + public Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context) { + return getFaultSimulationWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, parameters, context) + .block(); } /** - * Update the tags of a node type resource of a given managed cluster. - * - * Update the configuration of a node type of a given managed cluster, only updating tags. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters The parameters to update the node type configuration. + * @param parameters parameter with fault simulation id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a node type in the cluster, each node type represents sub set of nodes in the cluster. + * @return a fault simulation by the simulationId. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NodeTypeInner update(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeUpdateParameters parameters) { - return updateWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, Context.NONE).getValue(); + public FaultSimulationInner getFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters) { + return getFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, Context.NONE) + .getValue(); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Gets the list of recent fault simulations for the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response} on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the node type along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName) { + private Mono> listFaultSimulationSinglePageAsync(String resourceGroupName, + String clusterName, String nodeTypeName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1763,28 +3500,29 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, nodeTypeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, 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())); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Gets the list of recent fault simulations for the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @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 Response} on successful completion of {@link Mono}. + * @return the list of recent fault simulations for the node type along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, - String nodeTypeName, Context context) { + private Mono> listFaultSimulationSinglePageAsync(String resourceGroupName, + String clusterName, String nodeTypeName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1805,166 +3543,140 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, nodeTypeName, this.client.getApiVersion(), accept, context); + return service + .listFaultSimulation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, nodeTypeName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Deletes a Service Fabric node type. + * Gets the list of recent fault simulations for the node type. * - * Delete a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return the list of recent fault simulations for the node type as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, nodeTypeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + return new PagedFlux<>(() -> listFaultSimulationSinglePageAsync(resourceGroupName, clusterName, nodeTypeName), + nextLink -> listFaultSimulationNextSinglePageAsync(nextLink)); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Gets the list of recent fault simulations for the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @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. + * @return the list of recent fault simulations for the node type as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFaultSimulationAsync(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterName, nodeTypeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + return new PagedFlux<>( + () -> listFaultSimulationSinglePageAsync(resourceGroupName, clusterName, nodeTypeName, context), + nextLink -> listFaultSimulationNextSinglePageAsync(nextLink, context)); } /** - * Deletes a Service Fabric node type. + * Gets the list of recent fault simulations for the node type. * - * Delete a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 long-running operation. + * @return the list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName) { - return this.beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName).getSyncPoller(); + return new PagedIterable<>(listFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName)); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Gets the list of recent fault simulations for the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @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 long-running operation. + * @return the list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName, context).getSyncPoller(); - } - - /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String nodeTypeName) { - return beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. - * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. - * @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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, nodeTypeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + return new PagedIterable<>(listFaultSimulationAsync(resourceGroupName, clusterName, nodeTypeName, context)); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 NodeType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String nodeTypeName) { - deleteAsync(resourceGroupName, clusterName, nodeTypeName).block(); + private Mono> listByManagedClustersNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClustersNext(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())); } /** - * Deletes a Service Fabric node type. - * - * Delete a Service Fabric node type of a given managed cluster. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. - * @param clusterName The name of the cluster resource. - * @param nodeTypeName The name of the node type. + * @param nextLink The URL to get the next list of items. * @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 NodeType list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { - deleteAsync(resourceGroupName, clusterName, nodeTypeName, context).block(); + private Mono> listByManagedClustersNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClustersNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** @@ -1974,10 +3686,10 @@ public void delete(String resourceGroupName, String clusterName, String nodeType * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return node type list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return fault simulation list results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClustersNextSinglePageAsync(String nextLink) { + private Mono> listFaultSimulationNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1988,9 +3700,9 @@ private Mono> listByManagedClustersNextSinglePageAs final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByManagedClustersNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + context -> service.listFaultSimulationNext(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())); } @@ -2002,10 +3714,10 @@ private Mono> listByManagedClustersNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return node type list results along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return fault simulation list results along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByManagedClustersNextSinglePageAsync(String nextLink, + private Mono> listFaultSimulationNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2016,7 +3728,7 @@ private Mono> listByManagedClustersNextSinglePageAs } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByManagedClustersNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listFaultSimulationNext(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/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java index c72974e7ed54..0e0fa6023d1e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/NodeTypesImpl.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.servicefabricmanagedclusters.implementation; @@ -10,7 +10,11 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.NodeTypesClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeType; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypes; @@ -20,14 +24,43 @@ public final class NodeTypesImpl implements NodeTypes { private final NodeTypesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public NodeTypesImpl(NodeTypesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } + public Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, nodeTypeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NodeTypeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NodeType get(String resourceGroupName, String clusterName, String nodeTypeName) { + NodeTypeInner inner = this.serviceClient().get(resourceGroupName, clusterName, nodeTypeName); + if (inner != null) { + return new NodeTypeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String nodeTypeName) { + this.serviceClient().delete(resourceGroupName, clusterName, nodeTypeName); + } + + public void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, nodeTypeName, context); + } + public PagedIterable listByManagedClusters(String resourceGroupName, String clusterName) { PagedIterable inner = this.serviceClient().listByManagedClusters(resourceGroupName, clusterName); return ResourceManagerUtils.mapPage(inner, inner1 -> new NodeTypeImpl(inner1, this.manager())); @@ -40,14 +73,34 @@ public PagedIterable listByManagedClusters(String resourceGroupName, S return ResourceManagerUtils.mapPage(inner, inner1 -> new NodeTypeImpl(inner1, this.manager())); } - public void restart(String resourceGroupName, String clusterName, String nodeTypeName, + public void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - this.serviceClient().restart(resourceGroupName, clusterName, nodeTypeName, parameters); + this.serviceClient().deallocate(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void restart(String resourceGroupName, String clusterName, String nodeTypeName, + public void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - this.serviceClient().restart(resourceGroupName, clusterName, nodeTypeName, parameters, context); + this.serviceClient().deallocate(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + this.serviceClient().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + this.serviceClient().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + this.serviceClient().redeploy(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + this.serviceClient().redeploy(resourceGroupName, clusterName, nodeTypeName, parameters, context); } public void reimage(String resourceGroupName, String clusterName, String nodeTypeName, @@ -60,43 +113,81 @@ public void reimage(String resourceGroupName, String clusterName, String nodeTyp this.serviceClient().reimage(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + public void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters) { - this.serviceClient().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters); + this.serviceClient().restart(resourceGroupName, clusterName, nodeTypeName, parameters); } - public void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + public void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context) { - this.serviceClient().deleteNode(resourceGroupName, clusterName, nodeTypeName, parameters, context); + this.serviceClient().restart(resourceGroupName, clusterName, nodeTypeName, parameters, context); } - public Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterName, nodeTypeName, context); + public void start(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters) { + this.serviceClient().start(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void start(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context) { + this.serviceClient().start(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters) { + this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters, Context context) { + this.serviceClient().startFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters) { + this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); + } + + public void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters, Context context) { + this.serviceClient().stopFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters, context); + } + + public Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context) { + Response inner = this.serviceClient() + .getFaultSimulationWithResponse(resourceGroupName, clusterName, nodeTypeName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NodeTypeImpl(inner.getValue(), this.manager())); + new FaultSimulationImpl(inner.getValue(), this.manager())); } else { return null; } } - public NodeType get(String resourceGroupName, String clusterName, String nodeTypeName) { - NodeTypeInner inner = this.serviceClient().get(resourceGroupName, clusterName, nodeTypeName); + public FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters) { + FaultSimulationInner inner + = this.serviceClient().getFaultSimulation(resourceGroupName, clusterName, nodeTypeName, parameters); if (inner != null) { - return new NodeTypeImpl(inner, this.manager()); + return new FaultSimulationImpl(inner, this.manager()); } else { return null; } } - public void delete(String resourceGroupName, String clusterName, String nodeTypeName) { - this.serviceClient().delete(resourceGroupName, clusterName, nodeTypeName); + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName) { + PagedIterable inner + = this.serviceClient().listFaultSimulation(resourceGroupName, clusterName, nodeTypeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FaultSimulationImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterName, nodeTypeName, context); + public PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, Context context) { + PagedIterable inner + = this.serviceClient().listFaultSimulation(resourceGroupName, clusterName, nodeTypeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FaultSimulationImpl(inner1, this.manager())); } public NodeType getById(String id) { @@ -179,7 +270,7 @@ private NodeTypesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java index 0ebba1711adf..47450bca517d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultImpl.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.servicefabricmanagedclusters.implementation; @@ -11,10 +11,10 @@ public final class OperationResultImpl implements OperationResult { private OperationResultInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; OperationResultImpl(OperationResultInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -43,7 +43,7 @@ public OperationResultInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsClientImpl.java index 807eae75a777..be562814e7e4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsClientImpl.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.servicefabricmanagedclusters.implementation; @@ -16,12 +16,17 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationResultsClient; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationResultsGetResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -36,48 +41,48 @@ public final class OperationResultsClientImpl implements OperationResultsClient /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of OperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationResultsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + OperationResultsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientOperationResults to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientOperationResults to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientO") public interface OperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + Mono>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return long running operation result on successful completion of {@link Mono}. + * @return long running operation result along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String location, String operationId) { + private Mono>> getWithResponseAsync(String location, String operationId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -94,24 +99,24 @@ private Mono getWithResponseAsync(String location, } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - operationId, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @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 long running operation result on successful completion of {@link Mono}. + * @return long running operation result along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String location, String operationId, + private Mono>> getWithResponseAsync(String location, String operationId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -129,14 +134,81 @@ private Mono getWithResponseAsync(String location, } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, operationId, - this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, operationId, accept, context); + } + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginGetAsync(String location, String operationId) { + Mono>> mono = getWithResponseAsync(location, operationId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @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 result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginGetAsync(String location, String operationId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = getWithResponseAsync(location, operationId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 long running operation result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginGet(String location, String operationId) { + return this.beginGetAsync(location, operationId).getSyncPoller(); } /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @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 long running operation result. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginGet(String location, String operationId, Context context) { + return this.beginGetAsync(location, operationId, context).getSyncPoller(); + } + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -145,29 +217,29 @@ private Mono getWithResponseAsync(String location, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { - return getWithResponseAsync(location, operationId).flatMap(ignored -> Mono.empty()); + return beginGetAsync(location, operationId).last().flatMap(this.client::getLroFinalResultOrError); } /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @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 long running operation result. + * @return long running operation result on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultsGetResponse getWithResponse(String location, String operationId, Context context) { - return getWithResponseAsync(location, operationId, context).block(); + private Mono getAsync(String location, String operationId, Context context) { + return beginGetAsync(location, operationId, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -175,6 +247,21 @@ public OperationResultsGetResponse getWithResponse(String location, String opera */ @ServiceMethod(returns = ReturnType.SINGLE) public void get(String location, String operationId) { - getWithResponse(location, operationId, Context.NONE); + getAsync(location, operationId).block(); + } + + /** + * Get long running operation result. + * + * @param location The name of the Azure region. + * @param operationId operation identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void get(String location, String operationId, Context context) { + getAsync(location, operationId, context).block(); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsImpl.java index 2e2fecc67712..85ac80a1622c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationResultsImpl.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.servicefabricmanagedclusters.implementation; @@ -8,34 +8,33 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationResultsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationResults; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationResultsGetResponse; public final class OperationResultsImpl implements OperationResults { private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class); private final OperationResultsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public OperationResultsImpl(OperationResultsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public OperationResultsGetResponse getWithResponse(String location, String operationId, Context context) { - return this.serviceClient().getWithResponse(location, operationId, context); - } - public void get(String location, String operationId) { this.serviceClient().get(location, operationId); } + public void get(String location, String operationId, Context context) { + this.serviceClient().get(location, operationId, context); + } + private OperationResultsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusClientImpl.java index 167c7159334a..49fc2460461f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusClientImpl.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.servicefabricmanagedclusters.implementation; @@ -37,40 +37,40 @@ public final class OperationStatusClientImpl implements OperationStatusClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of OperationStatusClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationStatusClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + OperationStatusClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(OperationStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientOperationStatus to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientOperationStatus to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientO") public interface OperationStatusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -95,15 +95,15 @@ private Mono> getWithResponseAsync(Str } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - operationId, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,14 +130,14 @@ private Mono> getWithResponseAsync(Str } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, operationId, - this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, operationId, accept, context); } /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -152,7 +152,7 @@ private Mono getAsync(String location, String o /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +169,7 @@ public Response getWithResponse(String location /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusImpl.java index 5da1d5cf7f6c..127a7d282a27 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationStatusImpl.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.servicefabricmanagedclusters.implementation; @@ -18,10 +18,10 @@ public final class OperationStatusImpl implements OperationStatus { private final OperationStatusClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public OperationStatusImpl(OperationStatusClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -50,7 +50,7 @@ private OperationStatusClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java index af6754db51bf..34a4cba6cfc7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,31 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + OperationsClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientOperations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientOperations to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientO") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ServiceFabric/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); } /** @@ -84,8 +84,8 @@ Mono> listNext(@PathParam(value = "nextLink", enco * * @throws 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 list of available Service Fabric resource provider API operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return describes the result of the request to list Service Fabric resource provider operations along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -111,8 +111,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return describes the result of the request to list Service Fabric resource provider operations along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -134,8 +134,8 @@ private Mono> listSinglePageAsync(Context co * * @throws 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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedFlux}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -151,8 +151,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedFlux}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -167,8 +167,8 @@ private PagedFlux listAsync(Context context) { * * @throws 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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -184,8 +184,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -193,6 +193,8 @@ public PagedIterable list(Context context) { } /** + * Lists all of the available Service Fabric resource provider API operations. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -219,6 +221,8 @@ private Mono> listNextSinglePageAsync(String } /** + * Lists all of the available Service Fabric resource provider API operations. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java index f804c01b8edb..25b97ccf30f0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/OperationsImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.implementation; @@ -17,10 +17,10 @@ public final class OperationsImpl implements Operations { private final OperationsClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -39,7 +39,7 @@ private OperationsClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java index e0afcd628825..fce070dfabae 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ResourceManagerUtils.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.implementation; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientBuilder.java similarity index 60% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientBuilder.java index 742d8a32618d..8479d2b27c67 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientBuilder.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientBuilder.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.servicefabricmanagedclusters.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the ServiceFabricManagedClustersMgmtClientImpl type. + * A builder for creating a new instance of the ServiceFabricClientImpl type. */ -@ServiceClientBuilder(serviceClients = { ServiceFabricManagedClustersMgmtClientImpl.class }) -public final class ServiceFabricManagedClustersMgmtClientBuilder { +@ServiceClientBuilder(serviceClients = { ServiceFabricClientImpl.class }) +public final class ServiceFabricClientBuilder { /* - * The customer subscription identifier. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The customer subscription identifier. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @param endpoint the endpoint value. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ServiceFabricClientBuilder 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. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @param subscriptionId the subscriptionId value. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ServiceFabricClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public ServiceFabricManagedClustersMgmtClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder environment(AzureEnvironment environment) { + public ServiceFabricClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public ServiceFabricManagedClustersMgmtClientBuilder environment(AzureEnvironmen * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder pipeline(HttpPipeline pipeline) { + public ServiceFabricClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public ServiceFabricManagedClustersMgmtClientBuilder pipeline(HttpPipeline pipel * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public ServiceFabricClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public ServiceFabricManagedClustersMgmtClientBuilder defaultPollInterval(Duratio * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the ServiceFabricManagedClustersMgmtClientBuilder. + * @return the ServiceFabricClientBuilder. */ - public ServiceFabricManagedClustersMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public ServiceFabricClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of ServiceFabricManagedClustersMgmtClientImpl with the provided parameters. + * Builds an instance of ServiceFabricClientImpl with the provided parameters. * - * @return an instance of ServiceFabricManagedClustersMgmtClientImpl. + * @return an instance of ServiceFabricClientImpl. */ - public ServiceFabricManagedClustersMgmtClientImpl buildClient() { + public ServiceFabricClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,9 +131,8 @@ public ServiceFabricManagedClustersMgmtClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - ServiceFabricManagedClustersMgmtClientImpl client - = new ServiceFabricManagedClustersMgmtClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + ServiceFabricClientImpl client = new ServiceFabricClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientImpl.java similarity index 94% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientImpl.java index 36196bac78fd..1c09a1df065e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricManagedClustersMgmtClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceFabricClientImpl.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.servicefabricmanagedclusters.implementation; @@ -37,7 +37,7 @@ import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationResultsClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationStatusClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.OperationsClient; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricManagedClustersMgmtClient; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServiceFabricClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -49,31 +49,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the ServiceFabricManagedClustersMgmtClientImpl type. + * Initializes a new instance of the ServiceFabricClientImpl type. */ -@ServiceClient(builder = ServiceFabricManagedClustersMgmtClientBuilder.class) -public final class ServiceFabricManagedClustersMgmtClientImpl implements ServiceFabricManagedClustersMgmtClient { +@ServiceClient(builder = ServiceFabricClientBuilder.class) +public final class ServiceFabricClientImpl implements ServiceFabricClient { /** - * The customer subscription identifier. - */ - private final String subscriptionId; - - /** - * Gets The customer subscription identifier. - * - * @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. */ @@ -82,12 +68,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -95,6 +81,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. */ @@ -137,6 +137,34 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The ApplicationsClient object to access its operations. + */ + private final ApplicationsClient applications; + + /** + * Gets the ApplicationsClient object to access its operations. + * + * @return the ApplicationsClient object. + */ + public ApplicationsClient getApplications() { + return this.applications; + } + /** * The ApplicationTypesClient object to access its operations. */ @@ -166,31 +194,45 @@ public ApplicationTypeVersionsClient getApplicationTypeVersions() { } /** - * The ApplicationsClient object to access its operations. + * The ServicesClient object to access its operations. */ - private final ApplicationsClient applications; + private final ServicesClient services; /** - * Gets the ApplicationsClient object to access its operations. + * Gets the ServicesClient object to access its operations. * - * @return the ApplicationsClient object. + * @return the ServicesClient object. */ - public ApplicationsClient getApplications() { - return this.applications; + public ServicesClient getServices() { + return this.services; } /** - * The ServicesClient object to access its operations. + * The ManagedClusterVersionsClient object to access its operations. */ - private final ServicesClient services; + private final ManagedClusterVersionsClient managedClusterVersions; /** - * Gets the ServicesClient object to access its operations. + * Gets the ManagedClusterVersionsClient object to access its operations. * - * @return the ServicesClient object. + * @return the ManagedClusterVersionsClient object. */ - public ServicesClient getServices() { - return this.services; + public ManagedClusterVersionsClient getManagedClusterVersions() { + return this.managedClusterVersions; + } + + /** + * The ManagedUnsupportedVMSizesClient object to access its operations. + */ + private final ManagedUnsupportedVMSizesClient managedUnsupportedVMSizes; + + /** + * Gets the ManagedUnsupportedVMSizesClient object to access its operations. + * + * @return the ManagedUnsupportedVMSizesClient object. + */ + public ManagedUnsupportedVMSizesClient getManagedUnsupportedVMSizes() { + return this.managedUnsupportedVMSizes; } /** @@ -221,20 +263,6 @@ public ManagedAzResiliencyStatusesClient getManagedAzResiliencyStatuses() { return this.managedAzResiliencyStatuses; } - /** - * The ManagedMaintenanceWindowStatusesClient object to access its operations. - */ - private final ManagedMaintenanceWindowStatusesClient managedMaintenanceWindowStatuses; - - /** - * Gets the ManagedMaintenanceWindowStatusesClient object to access its operations. - * - * @return the ManagedMaintenanceWindowStatusesClient object. - */ - public ManagedMaintenanceWindowStatusesClient getManagedMaintenanceWindowStatuses() { - return this.managedMaintenanceWindowStatuses; - } - /** * The ManagedApplyMaintenanceWindowsClient object to access its operations. */ @@ -250,45 +278,45 @@ public ManagedApplyMaintenanceWindowsClient getManagedApplyMaintenanceWindows() } /** - * The ManagedClusterVersionsClient object to access its operations. + * The ManagedMaintenanceWindowStatusesClient object to access its operations. */ - private final ManagedClusterVersionsClient managedClusterVersions; + private final ManagedMaintenanceWindowStatusesClient managedMaintenanceWindowStatuses; /** - * Gets the ManagedClusterVersionsClient object to access its operations. + * Gets the ManagedMaintenanceWindowStatusesClient object to access its operations. * - * @return the ManagedClusterVersionsClient object. + * @return the ManagedMaintenanceWindowStatusesClient object. */ - public ManagedClusterVersionsClient getManagedClusterVersions() { - return this.managedClusterVersions; + public ManagedMaintenanceWindowStatusesClient getManagedMaintenanceWindowStatuses() { + return this.managedMaintenanceWindowStatuses; } /** - * The ManagedUnsupportedVMSizesClient object to access its operations. + * The NodeTypesClient object to access its operations. */ - private final ManagedUnsupportedVMSizesClient managedUnsupportedVMSizes; + private final NodeTypesClient nodeTypes; /** - * Gets the ManagedUnsupportedVMSizesClient object to access its operations. + * Gets the NodeTypesClient object to access its operations. * - * @return the ManagedUnsupportedVMSizesClient object. + * @return the NodeTypesClient object. */ - public ManagedUnsupportedVMSizesClient getManagedUnsupportedVMSizes() { - return this.managedUnsupportedVMSizes; + public NodeTypesClient getNodeTypes() { + return this.nodeTypes; } /** - * The OperationStatusClient object to access its operations. + * The NodeTypeSkusClient object to access its operations. */ - private final OperationStatusClient operationStatus; + private final NodeTypeSkusClient nodeTypeSkus; /** - * Gets the OperationStatusClient object to access its operations. + * Gets the NodeTypeSkusClient object to access its operations. * - * @return the OperationStatusClient object. + * @return the NodeTypeSkusClient object. */ - public OperationStatusClient getOperationStatus() { - return this.operationStatus; + public NodeTypeSkusClient getNodeTypeSkus() { + return this.nodeTypeSkus; } /** @@ -306,80 +334,52 @@ public OperationResultsClient getOperationResults() { } /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The NodeTypesClient object to access its operations. - */ - private final NodeTypesClient nodeTypes; - - /** - * Gets the NodeTypesClient object to access its operations. - * - * @return the NodeTypesClient object. - */ - public NodeTypesClient getNodeTypes() { - return this.nodeTypes; - } - - /** - * The NodeTypeSkusClient object to access its operations. + * The OperationStatusClient object to access its operations. */ - private final NodeTypeSkusClient nodeTypeSkus; + private final OperationStatusClient operationStatus; /** - * Gets the NodeTypeSkusClient object to access its operations. + * Gets the OperationStatusClient object to access its operations. * - * @return the NodeTypeSkusClient object. + * @return the OperationStatusClient object. */ - public NodeTypeSkusClient getNodeTypeSkus() { - return this.nodeTypeSkus; + public OperationStatusClient getOperationStatus() { + return this.operationStatus; } /** - * Initializes an instance of ServiceFabricManagedClustersMgmtClient client. + * Initializes an instance of ServiceFabricClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The customer subscription identifier. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - ServiceFabricManagedClustersMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + ServiceFabricClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + 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-04-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-03-01-preview"; + this.operations = new OperationsClientImpl(this); + this.applications = new ApplicationsClientImpl(this); this.applicationTypes = new ApplicationTypesClientImpl(this); this.applicationTypeVersions = new ApplicationTypeVersionsClientImpl(this); - this.applications = new ApplicationsClientImpl(this); this.services = new ServicesClientImpl(this); + this.managedClusterVersions = new ManagedClusterVersionsClientImpl(this); + this.managedUnsupportedVMSizes = new ManagedUnsupportedVMSizesClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); this.managedAzResiliencyStatuses = new ManagedAzResiliencyStatusesClientImpl(this); - this.managedMaintenanceWindowStatuses = new ManagedMaintenanceWindowStatusesClientImpl(this); this.managedApplyMaintenanceWindows = new ManagedApplyMaintenanceWindowsClientImpl(this); - this.managedClusterVersions = new ManagedClusterVersionsClientImpl(this); - this.managedUnsupportedVMSizes = new ManagedUnsupportedVMSizesClientImpl(this); - this.operationStatus = new OperationStatusClientImpl(this); - this.operationResults = new OperationResultsClientImpl(this); - this.operations = new OperationsClientImpl(this); + this.managedMaintenanceWindowStatuses = new ManagedMaintenanceWindowStatusesClientImpl(this); this.nodeTypes = new NodeTypesClientImpl(this); this.nodeTypeSkus = new NodeTypeSkusClientImpl(this); + this.operationResults = new OperationResultsClientImpl(this); + this.operationStatus = new OperationStatusClientImpl(this); } /** @@ -508,5 +508,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricManagedClustersMgmtClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServiceFabricClientImpl.class); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java index 8684484c267e..cdd5b6a59f0c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServiceResourceImpl.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.servicefabricmanagedclusters.implementation; @@ -17,7 +17,7 @@ public final class ServiceResourceImpl implements ServiceResource, ServiceResource.Definition, ServiceResource.Update { private ServiceResourceInner innerObject; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public String id() { return this.innerModel().id(); @@ -35,10 +35,6 @@ public ServiceResourceProperties properties() { return this.innerModel().properties(); } - public String location() { - return this.innerModel().location(); - } - public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -48,6 +44,10 @@ public Map tags() { } } + public String location() { + return this.innerModel().location(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -68,7 +68,7 @@ public ServiceResourceInner innerModel() { return this.innerObject; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } @@ -106,7 +106,7 @@ public ServiceResource create(Context context) { } ServiceResourceImpl(String name, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = new ServiceResourceInner(); this.serviceManager = serviceManager; this.serviceName = name; @@ -135,11 +135,11 @@ public ServiceResource apply(Context context) { } ServiceResourceImpl(ServiceResourceInner innerObject, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedclusters"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedClusters"); this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications"); this.serviceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "services"); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java index 6e9ce0702f16..f29756d94225 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesClientImpl.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.servicefabricmanagedclusters.implementation; @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.ServicesClient; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceList; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,95 +52,89 @@ public final class ServicesClientImpl implements ServicesClient { /** * The service client containing this operation class. */ - private final ServiceFabricManagedClustersMgmtClientImpl client; + private final ServiceFabricClientImpl client; /** * Initializes an instance of ServicesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ServicesClientImpl(ServiceFabricManagedClustersMgmtClientImpl client) { + ServicesClientImpl(ServiceFabricClientImpl client) { this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ServiceFabricManagedClustersMgmtClientServices to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ServiceFabricClientServices to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ServiceFabricManaged") + @Host("{endpoint}") + @ServiceInterface(name = "ServiceFabricClientS") public interface ServicesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServiceResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServiceResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServiceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ServiceUpdateParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, @PathParam("applicationName") String applicationName, @PathParam("serviceName") String serviceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByApplications(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByApplications(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByApplicationsNext( - @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); } /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -177,19 +171,17 @@ private Mono> getWithResponseAsync(String resourc } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, serviceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -227,17 +219,15 @@ private Mono> getWithResponseAsync(String resourc } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, - applicationName, serviceName, this.client.getApiVersion(), accept, context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, serviceName, accept, context); } /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -255,12 +245,10 @@ private Mono getAsync(String resourceGroupName, String clu } /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -278,12 +266,10 @@ public Response getWithResponse(String resourceGroupName, } /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -300,11 +286,9 @@ public ServiceResourceInner get(String resourceGroupName, String clusterName, St } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -344,20 +328,19 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, serviceName, this.client.getApiVersion(), parameters, - accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -399,18 +382,18 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, serviceName, this.client.getApiVersion(), parameters, accept, context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, contentType, + accept, parameters, context); } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -431,11 +414,9 @@ private PollerFlux, ServiceResourceInner> begin } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -458,11 +439,9 @@ private PollerFlux, ServiceResourceInner> begin } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -481,11 +460,9 @@ public SyncPoller, ServiceResourceInner> beginC } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -506,11 +483,9 @@ public SyncPoller, ServiceResourceInner> beginC } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -528,11 +503,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -551,11 +524,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -572,11 +543,9 @@ public ServiceResourceInner createOrUpdate(String resourceGroupName, String clus } /** - * Creates or updates a Service Fabric managed service resource. - * * Create or update a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -597,7 +566,7 @@ public ServiceResourceInner createOrUpdate(String resourceGroupName, String clus /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -637,18 +606,19 @@ private Mono> updateWithResponseAsync(String reso } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, serviceName, this.client.getApiVersion(), parameters, - accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -689,16 +659,17 @@ private Mono> updateWithResponseAsync(String reso } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, serviceName, this.client.getApiVersion(), parameters, accept, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, serviceName, contentType, accept, parameters, context); } /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -718,7 +689,7 @@ private Mono updateAsync(String resourceGroupName, String /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -739,7 +710,7 @@ public Response updateWithResponse(String resourceGroupNam /** * Updates the tags of a service resource of a given managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -757,11 +728,9 @@ public ServiceResourceInner update(String resourceGroupName, String clusterName, } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -797,18 +766,16 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, serviceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, serviceName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -845,16 +812,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, serviceName, this.client.getApiVersion(), accept, context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, serviceName, accept, context); } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -873,11 +838,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -898,11 +861,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -918,11 +879,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -940,11 +899,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -961,11 +918,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -983,11 +938,9 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Str } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -1001,11 +954,9 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -1021,12 +972,10 @@ public void delete(String resourceGroupName, String clusterName, String applicat } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1059,21 +1008,18 @@ private Mono> listByApplicationsSinglePageAs } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByApplications(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, clusterName, applicationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByApplications(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, applicationName, 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())); } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. @@ -1108,19 +1054,17 @@ private Mono> listByApplicationsSinglePageAs final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByApplications(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - clusterName, applicationName, this.client.getApiVersion(), accept, context) + .listByApplications(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, applicationName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1137,12 +1081,10 @@ private PagedFlux listByApplicationsAsync(String resourceG } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. @@ -1161,12 +1103,10 @@ private PagedFlux listByApplicationsAsync(String resourceG } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1182,12 +1122,10 @@ public PagedIterable listByApplications(String resourceGro } /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java index 0e5191bd2c26..e14a7ec03b2c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/ServicesImpl.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.servicefabricmanagedclusters.implementation; @@ -19,10 +19,10 @@ public final class ServicesImpl implements Services { private final ServicesClient innerClient; - private final com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager; + private final com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager; public ServicesImpl(ServicesClient innerClient, - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager serviceManager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -79,10 +79,10 @@ public ServiceResource getById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -104,10 +104,10 @@ public Response getByIdWithResponse(String id, Context context) throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -128,10 +128,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -152,10 +152,10 @@ public void deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedclusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "managedClusters"); if (clusterName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedclusters'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'managedClusters'.", id))); } String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { @@ -174,7 +174,7 @@ private ServicesClient serviceClient() { return this.innerClient; } - private com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager() { + private com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager() { return this.serviceManager; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResourceList.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java similarity index 74% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResourceList.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.java index 589c74ec36f0..8c0d89d93f28 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResourceList.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationResourceList.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The list of application resources. */ -@Fluent +@Immutable public final class ApplicationResourceList implements JsonSerializable { /* - * The value property. + * The ApplicationResource items on this page */ private List value; /* - * URL to get the next set of application list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ApplicationResourceList class. */ - public ApplicationResourceList() { + private ApplicationResourceList() { } /** - * Get the value property: The value property. + * Get the value property: The ApplicationResource items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ApplicationResourceList object itself. - */ - public ApplicationResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of application list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -69,11 +59,16 @@ 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 ApplicationResourceList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ApplicationResourceList.class); + /** * {@inheritDoc} */ @@ -81,6 +76,7 @@ public void validate() { 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(); } @@ -90,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ApplicationResourceList 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 ApplicationResourceList. */ public static ApplicationResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResourceList.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java similarity index 74% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResourceList.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.java index 9ba4c386f803..62c8cca525db 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResourceList.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeResourceList.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The list of application type names. */ -@Fluent +@Immutable public final class ApplicationTypeResourceList implements JsonSerializable { /* - * The value property. + * The ApplicationTypeResource items on this page */ private List value; /* - * URL to get the next set of application type list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ApplicationTypeResourceList class. */ - public ApplicationTypeResourceList() { + private ApplicationTypeResourceList() { } /** - * Get the value property: The value property. + * Get the value property: The ApplicationTypeResource items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ApplicationTypeResourceList object itself. - */ - public ApplicationTypeResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of application type list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -69,11 +59,17 @@ 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 ApplicationTypeResourceList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ApplicationTypeResourceList.class); + /** * {@inheritDoc} */ @@ -81,6 +77,7 @@ public void validate() { 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(); } @@ -90,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ApplicationTypeResourceList 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 ApplicationTypeResourceList. */ public static ApplicationTypeResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResourceList.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java similarity index 75% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResourceList.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.java index 66959b3698b6..031e18d8c28d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResourceList.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ApplicationTypeVersionResourceList.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The list of application type version resources for the specified application type name resource. */ -@Fluent +@Immutable public final class ApplicationTypeVersionResourceList implements JsonSerializable { /* - * The value property. + * The ApplicationTypeVersionResource items on this page */ private List value; /* - * URL to get the next set of application type version list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ApplicationTypeVersionResourceList class. */ - public ApplicationTypeVersionResourceList() { + private ApplicationTypeVersionResourceList() { } /** - * Get the value property: The value property. + * Get the value property: The ApplicationTypeVersionResource items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ApplicationTypeVersionResourceList object itself. - */ - public ApplicationTypeVersionResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of application type version list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -69,11 +59,17 @@ 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 ApplicationTypeVersionResourceList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ApplicationTypeVersionResourceList.class); + /** * {@inheritDoc} */ @@ -81,6 +77,7 @@ public void validate() { 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(); } @@ -90,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ApplicationTypeVersionResourceList 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 ApplicationTypeVersionResourceList. */ public static ApplicationTypeVersionResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java new file mode 100644 index 000000000000..f9603a51403d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/FaultSimulationListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.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; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; +import java.io.IOException; +import java.util.List; + +/** + * Fault simulation list results. + */ +@Immutable +public final class FaultSimulationListResult implements JsonSerializable { + /* + * The FaultSimulation items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of FaultSimulationListResult class. + */ + private FaultSimulationListResult() { + } + + /** + * Get the value property: The FaultSimulation items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model FaultSimulationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FaultSimulationListResult.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(); + } + + /** + * Reads an instance of FaultSimulationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationListResult 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 FaultSimulationListResult. + */ + public static FaultSimulationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationListResult deserializedFaultSimulationListResult = new FaultSimulationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> FaultSimulationInner.fromJson(reader1)); + deserializedFaultSimulationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFaultSimulationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationListResult; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterListResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java similarity index 71% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterListResult.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.java index f3fdf5f1e3b0..564b38b10ad0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterListResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedClusterListResult.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -14,28 +15,28 @@ import java.util.List; /** - * Managed Cluster list results. + * The response of a ManagedCluster list operation. */ -@Fluent +@Immutable public final class ManagedClusterListResult implements JsonSerializable { /* - * The value property. + * The ManagedCluster items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ManagedClusterListResult class. */ - public ManagedClusterListResult() { + private ManagedClusterListResult() { } /** - * Get the value property: The value property. + * Get the value property: The ManagedCluster items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ManagedClusterListResult object itself. - */ - public ManagedClusterListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to use for getting the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the ManagedClusterListResult object itself. - */ - public ManagedClusterListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @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 ManagedClusterListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterListResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedClusterListResult 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 ManagedClusterListResult. */ public static ManagedClusterListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSizesResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java similarity index 74% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSizesResult.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.java index ff6287f59f06..5067b8bf3116 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSizesResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ManagedVMSizesResult.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. */ -@Fluent +@Immutable public final class ManagedVMSizesResult implements JsonSerializable { /* - * List of Managed VM Sizes for Service Fabric Managed Clusters. + * The ManagedVMSize items on this page */ private List value; /* - * URL to get the next set of Managed VM Sizes if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ManagedVMSizesResult class. */ - public ManagedVMSizesResult() { + private ManagedVMSizesResult() { } /** - * Get the value property: List of Managed VM Sizes for Service Fabric Managed Clusters. + * Get the value property: The ManagedVMSize items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: List of Managed VM Sizes for Service Fabric Managed Clusters. - * - * @param value the value value to set. - * @return the ManagedVMSizesResult object itself. - */ - public ManagedVMSizesResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of Managed VM Sizes if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -69,11 +59,16 @@ 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 ManagedVMSizesResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ManagedVMSizesResult.class); + /** * {@inheritDoc} */ @@ -81,6 +76,7 @@ public void validate() { 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(); } @@ -90,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ManagedVMSizesResult 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 ManagedVMSizesResult. */ public static ManagedVMSizesResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java similarity index 71% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListResult.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.java index bebe1b37697b..17c8ebe298f0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListResult.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -14,28 +15,28 @@ import java.util.List; /** - * Node type list results. + * The response of a NodeType list operation. */ -@Fluent +@Immutable public final class NodeTypeListResult implements JsonSerializable { /* - * The list of node types. + * The NodeType items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NodeTypeListResult class. */ - public NodeTypeListResult() { + private NodeTypeListResult() { } /** - * Get the value property: The list of node types. + * Get the value property: The NodeType items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of node types. - * - * @param value the value value to set. - * @return the NodeTypeListResult object itself. - */ - public NodeTypeListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to use for getting the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the NodeTypeListResult object itself. - */ - public NodeTypeListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @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 NodeTypeListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(NodeTypeListResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NodeTypeListResult 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 NodeTypeListResult. */ public static NodeTypeListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListSkuResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java similarity index 71% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListSkuResult.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.java index ab957c72b989..bd613307291a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeListSkuResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/NodeTypeListSkuResult.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Node type available sku list results. */ -@Fluent +@Immutable public final class NodeTypeListSkuResult implements JsonSerializable { /* - * The list of available node type SKUs. + * The NodeTypeAvailableSku items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NodeTypeListSkuResult class. */ - public NodeTypeListSkuResult() { + private NodeTypeListSkuResult() { } /** - * Get the value property: The list of available node type SKUs. + * Get the value property: The NodeTypeAvailableSku items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of available node type SKUs. - * - * @param value the value value to set. - * @return the NodeTypeListSkuResult object itself. - */ - public NodeTypeListSkuResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to use for getting the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the NodeTypeListSkuResult object itself. - */ - public NodeTypeListSkuResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * * @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 NodeTypeListSkuResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(NodeTypeListSkuResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NodeTypeListSkuResult 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 NodeTypeListSkuResult. */ public static NodeTypeListSkuResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationListResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java similarity index 75% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationListResult.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/OperationListResult.java index 8bc1291b17f5..a1e68737ffc6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationListResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Describes the result of the request to list Service Fabric resource provider operations. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the Service Fabric resource provider. + * The OperationResult 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 Service Fabric resource provider. + * Get the value property: The OperationResult items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: List of operations supported by the Service Fabric resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * 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. */ @@ -69,11 +59,16 @@ 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} */ @@ -81,6 +76,7 @@ public void validate() { 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(); } @@ -90,6 +86,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/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceList.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java similarity index 74% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceList.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.java index adfc7e56fcb0..caaf6bce1428 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceList.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/models/ServiceResourceList.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.servicefabricmanagedclusters.models; +package com.azure.resourcemanager.servicefabricmanagedclusters.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; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The list of service resources. */ -@Fluent +@Immutable public final class ServiceResourceList implements JsonSerializable { /* - * The value property. + * The ServiceResource items on this page */ private List value; /* - * URL to get the next set of service list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ServiceResourceList class. */ - public ServiceResourceList() { + private ServiceResourceList() { } /** - * Get the value property: The value property. + * Get the value property: The ServiceResource items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ServiceResourceList object itself. - */ - public ServiceResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of service list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -69,11 +59,16 @@ 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 ServiceResourceList")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ServiceResourceList.class); + /** * {@inheritDoc} */ @@ -81,6 +76,7 @@ public void validate() { 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(); } @@ -90,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServiceResourceList 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 ServiceResourceList. */ public static ServiceResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java index 32cacc10f5ad..fec122326018 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/implementation/package-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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 ServiceFabricManagedClustersMgmtClient. + * Package containing the implementations for ServiceFabric. * Service Fabric Managed Clusters Management Client. */ package com.azure.resourcemanager.servicefabricmanagedclusters.implementation; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java index e78992c943ae..9d5df44fceee 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Access.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class Access extends ExpandableStringEnum { /** - * Static value allow for Access. + * The network traffic is allowed. */ public static final Access ALLOW = fromString("allow"); /** - * Static value deny for Access. + * The network traffic is denied. */ public static final Access DENY = fromString("deny"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java index 64d9ca275dbf..32a7c9ed0773 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AddRemoveIncrementalNamedPartitionScalingMechanism.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.servicefabricmanagedclusters.models; @@ -17,7 +17,7 @@ @Fluent public final class AddRemoveIncrementalNamedPartitionScalingMechanism extends ScalingMechanism { /* - * Specifies the mechanism associated with this scaling policy. + * The kind property. */ private ServiceScalingMechanismKind kind = ServiceScalingMechanismKind.ADD_REMOVE_INCREMENTAL_NAMED_PARTITION; @@ -43,7 +43,7 @@ public AddRemoveIncrementalNamedPartitionScalingMechanism() { } /** - * Get the kind property: Specifies the mechanism associated with this scaling policy. + * Get the kind property: The kind property. * * @return the kind value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java index 57f3ef501ee8..2abacf259e44 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AdditionalNetworkInterfaceConfiguration.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java index fbf7bd4ca442..328088e780e7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationHealthPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java index 52e83f3ea801..90c4b69a314a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationResource.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.servicefabricmanagedclusters.models; @@ -36,6 +36,13 @@ public interface ApplicationResource { */ String type(); + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + /** * Gets the identity property: Describes the managed identities for an Azure resource. * @@ -44,21 +51,14 @@ public interface ApplicationResource { ManagedIdentity identity(); /** - * Gets the location property: Resource location depends on the parent resource. + * Gets the location property: The geo-location where the resource lives. * * @return the location value. */ String location(); /** - * Gets the tags property: Azure resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -156,11 +156,11 @@ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @return the next definition stage. */ - WithCreate withExistingManagedcluster(String resourceGroupName, String clusterName); + WithCreate withExistingManagedCluster(String resourceGroupName, String clusterName); } /** @@ -193,7 +193,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -201,7 +201,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -212,9 +212,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Azure resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Azure resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -240,8 +240,7 @@ interface WithVersion { /** * Specifies the version property: The version of the application type as defined in the application * manifest. - * This name must be the full Arm Resource ID for the referenced application type version. - * . + * This name must be the full Arm Resource ID for the referenced application type version.. * * @param version The version of the application type as defined in the application manifest. * This name must be the full Arm Resource ID for the referenced application type version. @@ -353,4 +352,67 @@ interface WithTags { * @return the refreshed resource. */ ApplicationResource refresh(Context context); + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @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. + */ + void readUpgrade(); + + /** + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. + * + * @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. + */ + void readUpgrade(Context context); + + /** + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. + * + * @param parameters The parameters for resuming an application upgrade. + * @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. + */ + void resumeUpgrade(RuntimeResumeApplicationUpgradeParameters parameters); + + /** + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. + * + * @param parameters The parameters for resuming an application upgrade. + * @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. + */ + void resumeUpgrade(RuntimeResumeApplicationUpgradeParameters parameters, Context context); + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. + * + * @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. + */ + void startRollback(); + + /** + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. + * + * @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. + */ + void startRollback(Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java index bb2839518335..b62b6b2eb34f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeResource.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.servicefabricmanagedclusters.models; @@ -36,21 +36,21 @@ public interface ApplicationTypeResource { String type(); /** - * Gets the location property: Resource location depends on the parent resource. + * Gets the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - String location(); + Map tags(); /** - * Gets the tags property: Azure resource tags. + * Gets the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -117,11 +117,11 @@ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @return the next definition stage. */ - WithCreate withExistingManagedcluster(String resourceGroupName, String clusterName); + WithCreate withExistingManagedCluster(String resourceGroupName, String clusterName); } /** @@ -152,7 +152,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -160,7 +160,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -171,9 +171,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Azure resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Azure resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java index c43003444cc7..3b3cf2da7814 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java index a9c28307e946..b3030c1a1b5d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionResource.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.servicefabricmanagedclusters.models; @@ -36,21 +36,21 @@ public interface ApplicationTypeVersionResource { String type(); /** - * Gets the location property: Resource location depends on the parent resource. + * Gets the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - String location(); + Map tags(); /** - * Gets the tags property: Azure resource tags. + * Gets the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -124,7 +124,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, clusterName, applicationTypeName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @return the next definition stage. @@ -162,7 +162,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -170,7 +170,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -181,9 +181,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Azure resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Azure resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java index b277b1e00f0c..9a7ed21db881 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java index 02507b979720..6319541c7335 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersions.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.servicefabricmanagedclusters.models; @@ -13,12 +13,10 @@ */ public interface ApplicationTypeVersions { /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -33,12 +31,10 @@ Response getWithResponse(String resourceGroupNam String applicationTypeName, String version, Context context); /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -52,11 +48,9 @@ ApplicationTypeVersionResource get(String resourceGroupName, String clusterName, String version); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -67,11 +61,9 @@ ApplicationTypeVersionResource get(String resourceGroupName, String clusterName, void delete(String resourceGroupName, String clusterName, String applicationTypeName, String version); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param version The application type version. @@ -84,13 +76,10 @@ void delete(String resourceGroupName, String clusterName, String applicationType Context context); /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,13 +92,10 @@ PagedIterable listByApplicationTypes(String reso String applicationTypeName); /** - * Gets the list of application type version resources created in the specified Service Fabric managed application - * type name resource. - * * Gets all application type version resources created or in the process of being created in the Service Fabric * managed application type name resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -123,8 +109,6 @@ PagedIterable listByApplicationTypes(String reso String applicationTypeName, Context context); /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * @@ -138,8 +122,6 @@ PagedIterable listByApplicationTypes(String reso ApplicationTypeVersionResource getById(String id); /** - * Gets a Service Fabric managed application type version resource. - * * Get a Service Fabric managed application type version resource created or in the process of being created in the * Service Fabric managed application type name resource. * @@ -154,8 +136,6 @@ PagedIterable listByApplicationTypes(String reso Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * * @param id the resource ID. @@ -166,8 +146,6 @@ PagedIterable listByApplicationTypes(String reso void deleteById(String id); /** - * Deletes a Service Fabric managed application type version resource. - * * Delete a Service Fabric managed application type version resource with the specified name. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java index 32b15f444932..5664844c5363 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypeVersionsCleanupPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java index 40577c674d90..fdff43244b3a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationTypes.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.servicefabricmanagedclusters.models; @@ -13,12 +13,10 @@ */ public interface ApplicationTypes { /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -32,12 +30,10 @@ Response getWithResponse(String resourceGroupName, Stri String applicationTypeName, Context context); /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,11 +45,9 @@ Response getWithResponse(String resourceGroupName, Stri ApplicationTypeResource get(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,11 +57,9 @@ Response getWithResponse(String resourceGroupName, Stri void delete(String resourceGroupName, String clusterName, String applicationTypeName); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationTypeName The name of the application type name resource. * @param context The context to associate with this operation. @@ -78,13 +70,10 @@ Response getWithResponse(String resourceGroupName, Stri void delete(String resourceGroupName, String clusterName, String applicationTypeName, Context context); /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,13 +84,10 @@ Response getWithResponse(String resourceGroupName, Stri PagedIterable list(String resourceGroupName, String clusterName); /** - * Gets the list of application type name resources created in the specified Service Fabric managed cluster - * resource. - * * Gets all application type name resources created or in the process of being created in the Service Fabric managed * cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,8 +99,6 @@ Response getWithResponse(String resourceGroupName, Stri PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * @@ -128,8 +112,6 @@ Response getWithResponse(String resourceGroupName, Stri ApplicationTypeResource getById(String id); /** - * Gets a Service Fabric managed application type name resource. - * * Get a Service Fabric application type name resource created or in the process of being created in the Service * Fabric managed cluster resource. * @@ -144,8 +126,6 @@ Response getWithResponse(String resourceGroupName, Stri Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * * @param id the resource ID. @@ -156,8 +136,6 @@ Response getWithResponse(String resourceGroupName, Stri void deleteById(String id); /** - * Deletes a Service Fabric managed application type name resource. - * * Delete a Service Fabric managed application type name resource with the specified name. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java index afcddb831269..def58da507c2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java index fe00033afad2..41e5fdacf38f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ApplicationUpgradePolicy.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.servicefabricmanagedclusters.models; @@ -48,7 +48,7 @@ public final class ApplicationUpgradePolicy implements JsonSerializable { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java index 2f5d5d9f4923..158e1bcaa514 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Applications.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.servicefabricmanagedclusters.models; @@ -13,58 +13,53 @@ */ public interface Applications { /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource along with {@link Response}. */ - void readUpgrade(String resourceGroupName, String clusterName, String applicationName); + Response getWithResponse(String resourceGroupName, String clusterName, String applicationName, + Context context); /** - * Get the status of the latest application upgrade. - * - * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest - * application upgrade. + * Get a Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service + * Fabric cluster resource. */ - void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context); + ApplicationResource get(String resourceGroupName, String clusterName, String applicationName); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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. */ - void startRollback(String resourceGroupName, String clusterName, String applicationName); + void delete(String resourceGroupName, String clusterName, String applicationName); /** - * Send a request to start a rollback of the current application upgrade. - * - * Send a request to start a rollback of the current application upgrade. This will start rolling back the - * application to the previous version. + * Delete a Service Fabric managed application resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. @@ -72,144 +67,123 @@ public interface Applications { * @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. */ - void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); + void delete(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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 all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters); + PagedIterable list(String resourceGroupName, String clusterName); /** - * Send a request to resume the current application upgrade. - * - * Send a request to resume the current application upgrade. This will resume the application upgrade from where it - * was paused. + * Gets all managed application resources created or in the process of being created in the Service Fabric cluster + * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. - * @param applicationName The name of the application resource. - * @param parameters The parameters for resuming an application upgrade. * @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 all managed application resources created or in the process of being created in the Service Fabric + * cluster resource as paginated response with {@link PagedIterable}. */ - void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, - RuntimeResumeApplicationUpgradeParameters parameters, Context context); + PagedIterable list(String resourceGroupName, String clusterName, Context context); /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String applicationName, - Context context); + void readUpgrade(String resourceGroupName, String clusterName, String applicationName); /** - * Gets a Service Fabric managed application resource. - * - * Get a Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. + * Get the status of the latest application upgrade. It will query the cluster to find the status of the latest + * application upgrade. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application 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 Service Fabric managed application resource created or in the process of being created in the Service - * Fabric cluster resource. */ - ApplicationResource get(String resourceGroupName, String clusterName, String applicationName); + void readUpgrade(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. */ - void delete(String resourceGroupName, String clusterName, String applicationName); + void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters); /** - * Deletes a Service Fabric managed application resource. - * - * Delete a Service Fabric managed application resource with the specified name. + * Send a request to resume the current application upgrade. This will resume the application upgrade from where it + * was paused. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. + * @param parameters The parameters for resuming an application upgrade. * @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. */ - void delete(String resourceGroupName, String clusterName, String applicationName, Context context); + void resumeUpgrade(String resourceGroupName, String clusterName, String applicationName, + RuntimeResumeApplicationUpgradeParameters parameters, Context context); /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName); + void startRollback(String resourceGroupName, String clusterName, String applicationName); /** - * Gets the list of managed application resources created in the specified Service Fabric cluster resource. - * - * Gets all managed application resources created or in the process of being created in the Service Fabric cluster - * resource. + * Send a request to start a rollback of the current application upgrade. This will start rolling back the + * application to the previous version. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param applicationName The name of the application 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 all managed application resources created or in the process of being created in the Service Fabric - * cluster resource as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String clusterName, Context context); + void startRollback(String resourceGroupName, String clusterName, String applicationName, Context context); /** - * Gets a Service Fabric managed application resource. - * * Get a Service Fabric managed application resource created or in the process of being created in the Service * Fabric cluster resource. * @@ -223,8 +197,6 @@ Response getWithResponse(String resourceGroupName, String c ApplicationResource getById(String id); /** - * Gets a Service Fabric managed application resource. - * * Get a Service Fabric managed application resource created or in the process of being created in the Service * Fabric cluster resource. * @@ -239,8 +211,6 @@ Response getWithResponse(String resourceGroupName, String c Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric managed application resource. - * * Delete a Service Fabric managed application resource with the specified name. * * @param id the resource ID. @@ -251,8 +221,6 @@ Response getWithResponse(String resourceGroupName, String c void deleteById(String id); /** - * Deletes a Service Fabric managed application resource. - * * Delete a Service Fabric managed application resource with the specified name. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java new file mode 100644 index 000000000000..5d1eaaefc952 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AutoGeneratedDomainNameLabelScope.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to + * solve the + * domain squatting problem with new domains. A domain name will be generated in the following format: + * {clustername}.{hash}.{regionname}.sfmcdomain. + * The hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's + * Tenant, Subscription, Resource Group + * and Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen. + */ +public final class AutoGeneratedDomainNameLabelScope extends ExpandableStringEnum { + /** + * TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same + * resource name. + */ + public static final AutoGeneratedDomainNameLabelScope TENANT_REUSE = fromString("TenantReuse"); + + /** + * SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with + * the same resource name. + */ + public static final AutoGeneratedDomainNameLabelScope SUBSCRIPTION_REUSE = fromString("SubscriptionReuse"); + + /** + * ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group + * with the same resource name. + */ + public static final AutoGeneratedDomainNameLabelScope RESOURCE_GROUP_REUSE = fromString("ResourceGroupReuse"); + + /** + * NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name. + */ + public static final AutoGeneratedDomainNameLabelScope NO_REUSE = fromString("NoReuse"); + + /** + * Creates a new instance of AutoGeneratedDomainNameLabelScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutoGeneratedDomainNameLabelScope() { + } + + /** + * Creates or finds a AutoGeneratedDomainNameLabelScope from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutoGeneratedDomainNameLabelScope. + */ + public static AutoGeneratedDomainNameLabelScope fromString(String name) { + return fromString(name, AutoGeneratedDomainNameLabelScope.class); + } + + /** + * Gets known AutoGeneratedDomainNameLabelScope values. + * + * @return known AutoGeneratedDomainNameLabelScope values. + */ + public static Collection values() { + return values(AutoGeneratedDomainNameLabelScope.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java index f65c01d96b88..3d8db5490018 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/AvailableOperationDisplay.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.servicefabricmanagedclusters.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; @@ -14,7 +14,7 @@ /** * Operation supported by the Service Fabric resource provider. */ -@Fluent +@Immutable public final class AvailableOperationDisplay implements JsonSerializable { /* * The name of the provider. @@ -39,7 +39,7 @@ public final class AvailableOperationDisplay implements JsonSerializable { /** - * Static value WaitingForNodes for ClusterState. + * Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM + * extension to boot up and report to it. */ public static final ClusterState WAITING_FOR_NODES = fromString("WaitingForNodes"); /** - * Static value Deploying for ClusterState. + * Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state + * until the cluster boots up and system services are up. */ public static final ClusterState DEPLOYING = fromString("Deploying"); /** - * Static value BaselineUpgrade for ClusterState. + * Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically + * initiated when the cluster boots up for the first time. */ public static final ClusterState BASELINE_UPGRADE = fromString("BaselineUpgrade"); /** - * Static value Upgrading for ClusterState. + * Indicates that the cluster is being upgraded with the user provided configuration. */ public static final ClusterState UPGRADING = fromString("Upgrading"); /** - * Static value UpgradeFailed for ClusterState. + * Indicates that the last upgrade for the cluster has failed. */ public static final ClusterState UPGRADE_FAILED = fromString("UpgradeFailed"); /** - * Static value Ready for ClusterState. + * Indicates that the cluster is in a stable state. */ public static final ClusterState READY = fromString("Ready"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java index 29690d9d7b45..ff94bfaf0a4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeCadence.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.servicefabricmanagedclusters.models; @@ -12,17 +12,17 @@ */ public final class ClusterUpgradeCadence extends ExpandableStringEnum { /** - * Static value Wave0 for ClusterUpgradeCadence. + * Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters. */ public static final ClusterUpgradeCadence WAVE0 = fromString("Wave0"); /** - * Static value Wave1 for ClusterUpgradeCadence. + * Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters. */ public static final ClusterUpgradeCadence WAVE1 = fromString("Wave1"); /** - * Static value Wave2 for ClusterUpgradeCadence. + * Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. */ public static final ClusterUpgradeCadence WAVE2 = fromString("Wave2"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java index 08e10cb0418f..35d28edd3000 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeDeltaHealthPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java index fdef0e4d7bc7..98b20171c44c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradeMode.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.servicefabricmanagedclusters.models; @@ -12,12 +12,14 @@ */ public final class ClusterUpgradeMode extends ExpandableStringEnum { /** - * Static value Automatic for ClusterUpgradeMode. + * The cluster will be automatically upgraded to the latest Service Fabric runtime version, + * **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available. */ public static final ClusterUpgradeMode AUTOMATIC = fromString("Automatic"); /** - * Static value Manual for ClusterUpgradeMode. + * The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is + * upgraded by setting the **clusterCodeVersion** property in the cluster resource. */ public static final ClusterUpgradeMode MANUAL = fromString("Manual"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java index 5de25e70488f..3551735438b7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ClusterUpgradePolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java index 1e6b41a6b5fb..6e815c5c53b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Direction.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class Direction extends ExpandableStringEnum { /** - * Static value inbound for Direction. + * Inbound direction. */ public static final Direction INBOUND = fromString("inbound"); /** - * Static value outbound for Direction. + * Outbound direction. */ public static final Direction OUTBOUND = fromString("outbound"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java index 543e5c2ba76e..d6fc83227865 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/DiskType.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.servicefabricmanagedclusters.models; @@ -13,20 +13,38 @@ */ public final class DiskType extends ExpandableStringEnum { /** - * Static value Standard_LRS for DiskType. + * Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. */ public static final DiskType STANDARD_LRS = fromString("Standard_LRS"); /** - * Static value StandardSSD_LRS for DiskType. + * Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test. */ public static final DiskType STANDARD_SSD_LRS = fromString("StandardSSD_LRS"); /** - * Static value Premium_LRS for DiskType. + * Premium SSD locally redundant storage. Best for production and performance sensitive workloads. */ public static final DiskType PREMIUM_LRS = fromString("Premium_LRS"); + /** + * Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that + * consistently require low latency and high IOPS and throughput. + */ + public static final DiskType PREMIUM_V2_LRS = fromString("PremiumV2_LRS"); + + /** + * Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that + * need storage resiliency against zone failures. + */ + public static final DiskType STANDARD_SSD_ZRS = fromString("StandardSSD_ZRS"); + + /** + * Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone + * failures. + */ + public static final DiskType PREMIUM_ZRS = fromString("Premium_ZRS"); + /** * Creates a new instance of DiskType value. * diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java index d157ed992109..2f7369962022 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EndpointRangeDescription.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ErrorModelError.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ErrorModelError.java new file mode 100644 index 000000000000..80b4eec8a623 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ErrorModelError.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The error details. + */ +@Immutable +public final class ErrorModelError implements JsonSerializable { + /* + * The error code. + */ + private String code; + + /* + * The error message. + */ + private String message; + + /** + * Creates an instance of ErrorModelError class. + */ + private ErrorModelError() { + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * 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(); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ErrorModelError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ErrorModelError 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 ErrorModelError. + */ + public static ErrorModelError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ErrorModelError deserializedErrorModelError = new ErrorModelError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedErrorModelError.code = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedErrorModelError.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedErrorModelError; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java index c005fe36fee0..f79e69340563 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/EvictionPolicyType.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class EvictionPolicyType extends ExpandableStringEnum { /** - * Static value Delete for EvictionPolicyType. + * Eviction policy will be Delete for SPOT vms. */ public static final EvictionPolicyType DELETE = fromString("Delete"); /** - * Static value Deallocate for EvictionPolicyType. + * Eviction policy will be Deallocate for SPOT vms. */ public static final EvictionPolicyType DEALLOCATE = fromString("Deallocate"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java index 4ee8169ef2b6..81b33fe0e231 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FailureAction.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.servicefabricmanagedclusters.models; @@ -9,17 +9,18 @@ /** * The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. - * Rollback specifies that the upgrade will start rolling back automatically. - * Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. + * Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back + * automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. */ public final class FailureAction extends ExpandableStringEnum { /** - * Static value Rollback for FailureAction. + * Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. */ public static final FailureAction ROLLBACK = fromString("Rollback"); /** - * Static value Manual for FailureAction. + * Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service + * Fabric will not proceed to the next upgrade domain automatically. */ public static final FailureAction MANUAL = fromString("Manual"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java new file mode 100644 index 000000000000..79516d3b58ff --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The kind of fault simulation. + */ +public final class FaultKind extends ExpandableStringEnum { + /** + * Simulates an availability zone down. + */ + public static final FaultKind ZONE = fromString("Zone"); + + /** + * Creates a new instance of FaultKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FaultKind() { + } + + /** + * Creates or finds a FaultKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding FaultKind. + */ + public static FaultKind fromString(String name) { + return fromString(name, FaultKind.class); + } + + /** + * Gets known FaultKind values. + * + * @return known FaultKind values. + */ + public static Collection values() { + return values(FaultKind.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java new file mode 100644 index 000000000000..c869e510eee2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulation.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of FaultSimulation. + */ +public interface FaultSimulation { + /** + * Gets the simulationId property: unique identifier for the fault simulation. + * + * @return the simulationId value. + */ + String simulationId(); + + /** + * Gets the status property: Fault simulation status. + * + * @return the status value. + */ + FaultSimulationStatus status(); + + /** + * Gets the startTime property: The start time of the fault simulation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time of the fault simulation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the details property: Fault simulation details. + * + * @return the details value. + */ + FaultSimulationDetails details(); + + /** + * Gets the inner com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner object. + * + * @return the inner object. + */ + FaultSimulationInner innerModel(); +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java new file mode 100644 index 000000000000..4134e58f7fa1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationConstraints.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Constraints for Fault Simulation action. + */ +@Fluent +public final class FaultSimulationConstraints implements JsonSerializable { + /* + * The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + */ + private OffsetDateTime expirationTime; + + /** + * Creates an instance of FaultSimulationConstraints class. + */ + public FaultSimulationConstraints() { + } + + /** + * Get the expirationTime property: The absolute expiration timestamp (UTC) after which this fault simulation should + * be stopped if it's still active. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set the expirationTime property: The absolute expiration timestamp (UTC) after which this fault simulation should + * be stopped if it's still active. + * + * @param expirationTime the expirationTime value to set. + * @return the FaultSimulationConstraints object itself. + */ + public FaultSimulationConstraints withExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * 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(); + jsonWriter.writeStringField("expirationTime", + this.expirationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expirationTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationConstraints from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationConstraints 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 FaultSimulationConstraints. + */ + public static FaultSimulationConstraints fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationConstraints deserializedFaultSimulationConstraints = new FaultSimulationConstraints(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expirationTime".equals(fieldName)) { + deserializedFaultSimulationConstraints.expirationTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationConstraints; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java new file mode 100644 index 000000000000..072aff4c4f1d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContent.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for Fault Simulation action. + */ +@Fluent +public class FaultSimulationContent implements JsonSerializable { + /* + * The kind of fault to be simulated. + */ + private FaultKind faultKind = FaultKind.fromString("FaultSimulationContent"); + + /* + * Force the action to go through without any check on the cluster. + */ + private Boolean force; + + /* + * Constraints for Fault Simulation action. + */ + private FaultSimulationConstraints constraints; + + /** + * Creates an instance of FaultSimulationContent class. + */ + public FaultSimulationContent() { + } + + /** + * Get the faultKind property: The kind of fault to be simulated. + * + * @return the faultKind value. + */ + public FaultKind faultKind() { + return this.faultKind; + } + + /** + * Get the force property: Force the action to go through without any check on the cluster. + * + * @return the force value. + */ + public Boolean force() { + return this.force; + } + + /** + * Set the force property: Force the action to go through without any check on the cluster. + * + * @param force the force value to set. + * @return the FaultSimulationContent object itself. + */ + public FaultSimulationContent withForce(Boolean force) { + this.force = force; + return this; + } + + /** + * Get the constraints property: Constraints for Fault Simulation action. + * + * @return the constraints value. + */ + public FaultSimulationConstraints constraints() { + return this.constraints; + } + + /** + * Set the constraints property: Constraints for Fault Simulation action. + * + * @param constraints the constraints value to set. + * @return the FaultSimulationContent object itself. + */ + public FaultSimulationContent withConstraints(FaultSimulationConstraints constraints) { + this.constraints = constraints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (constraints() != null) { + constraints().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("faultKind", this.faultKind == null ? null : this.faultKind.toString()); + jsonWriter.writeBooleanField("force", this.force); + jsonWriter.writeJsonField("constraints", this.constraints); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationContent 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 FaultSimulationContent. + */ + public static FaultSimulationContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("faultKind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Zone".equals(discriminatorValue)) { + return ZoneFaultSimulationContent.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static FaultSimulationContent fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationContent deserializedFaultSimulationContent = new FaultSimulationContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("faultKind".equals(fieldName)) { + deserializedFaultSimulationContent.faultKind = FaultKind.fromString(reader.getString()); + } else if ("force".equals(fieldName)) { + deserializedFaultSimulationContent.force = reader.getNullable(JsonReader::getBoolean); + } else if ("constraints".equals(fieldName)) { + deserializedFaultSimulationContent.constraints = FaultSimulationConstraints.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationContent; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java new file mode 100644 index 000000000000..19614721b0c3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationContentWrapper.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Fault Simulation Request for Start action. + */ +@Fluent +public final class FaultSimulationContentWrapper implements JsonSerializable { + /* + * Parameters for Fault Simulation start action. + */ + private FaultSimulationContent parameters; + + /** + * Creates an instance of FaultSimulationContentWrapper class. + */ + public FaultSimulationContentWrapper() { + } + + /** + * Get the parameters property: Parameters for Fault Simulation start action. + * + * @return the parameters value. + */ + public FaultSimulationContent parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters for Fault Simulation start action. + * + * @param parameters the parameters value to set. + * @return the FaultSimulationContentWrapper object itself. + */ + public FaultSimulationContentWrapper withParameters(FaultSimulationContent parameters) { + this.parameters = parameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property parameters in model FaultSimulationContentWrapper")); + } else { + parameters().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FaultSimulationContentWrapper.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("parameters", this.parameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationContentWrapper from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationContentWrapper 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 FaultSimulationContentWrapper. + */ + public static FaultSimulationContentWrapper fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationContentWrapper deserializedFaultSimulationContentWrapper + = new FaultSimulationContentWrapper(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("parameters".equals(fieldName)) { + deserializedFaultSimulationContentWrapper.parameters = FaultSimulationContent.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationContentWrapper; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java new file mode 100644 index 000000000000..0a0443c28962 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationDetails.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details for Fault Simulation. + */ +@Immutable +public final class FaultSimulationDetails implements JsonSerializable { + /* + * unique identifier for the cluster resource. + */ + private String clusterId; + + /* + * unique identifier for the operation associated with the fault simulation. + */ + private String operationId; + + /* + * List of node type simulations associated with the cluster fault simulation. + */ + private List nodeTypeFaultSimulation; + + /* + * Fault simulation parameters. + */ + private FaultSimulationContent parameters; + + /** + * Creates an instance of FaultSimulationDetails class. + */ + private FaultSimulationDetails() { + } + + /** + * Get the clusterId property: unique identifier for the cluster resource. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the operationId property: unique identifier for the operation associated with the fault simulation. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the nodeTypeFaultSimulation property: List of node type simulations associated with the cluster fault + * simulation. + * + * @return the nodeTypeFaultSimulation value. + */ + public List nodeTypeFaultSimulation() { + return this.nodeTypeFaultSimulation; + } + + /** + * Get the parameters property: Fault simulation parameters. + * + * @return the parameters value. + */ + public FaultSimulationContent parameters() { + return this.parameters; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nodeTypeFaultSimulation() != null) { + nodeTypeFaultSimulation().forEach(e -> e.validate()); + } + if (parameters() != null) { + parameters().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clusterId", this.clusterId); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeArrayField("nodeTypeFaultSimulation", this.nodeTypeFaultSimulation, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("parameters", this.parameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationDetails 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 FaultSimulationDetails. + */ + public static FaultSimulationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationDetails deserializedFaultSimulationDetails = new FaultSimulationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterId".equals(fieldName)) { + deserializedFaultSimulationDetails.clusterId = reader.getString(); + } else if ("operationId".equals(fieldName)) { + deserializedFaultSimulationDetails.operationId = reader.getString(); + } else if ("nodeTypeFaultSimulation".equals(fieldName)) { + List nodeTypeFaultSimulation + = reader.readArray(reader1 -> NodeTypeFaultSimulation.fromJson(reader1)); + deserializedFaultSimulationDetails.nodeTypeFaultSimulation = nodeTypeFaultSimulation; + } else if ("parameters".equals(fieldName)) { + deserializedFaultSimulationDetails.parameters = FaultSimulationContent.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationDetails; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java new file mode 100644 index 000000000000..d938b833011c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationIdContent.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Parameters for Fault Simulation id. + */ +@Fluent +public final class FaultSimulationIdContent implements JsonSerializable { + /* + * unique identifier for the fault simulation. + */ + private String simulationId; + + /** + * Creates an instance of FaultSimulationIdContent class. + */ + public FaultSimulationIdContent() { + } + + /** + * Get the simulationId property: unique identifier for the fault simulation. + * + * @return the simulationId value. + */ + public String simulationId() { + return this.simulationId; + } + + /** + * Set the simulationId property: unique identifier for the fault simulation. + * + * @param simulationId the simulationId value to set. + * @return the FaultSimulationIdContent object itself. + */ + public FaultSimulationIdContent withSimulationId(String simulationId) { + this.simulationId = simulationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (simulationId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property simulationId in model FaultSimulationIdContent")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FaultSimulationIdContent.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("simulationId", this.simulationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FaultSimulationIdContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FaultSimulationIdContent 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 FaultSimulationIdContent. + */ + public static FaultSimulationIdContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FaultSimulationIdContent deserializedFaultSimulationIdContent = new FaultSimulationIdContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("simulationId".equals(fieldName)) { + deserializedFaultSimulationIdContent.simulationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFaultSimulationIdContent; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java new file mode 100644 index 000000000000..a888868f083f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FaultSimulationStatus.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Fault simulation status. + */ +public final class FaultSimulationStatus extends ExpandableStringEnum { + /** + * Indicates the fault simulation is starting. The simulation will have this status while the start operation is in + * progress. + */ + public static final FaultSimulationStatus STARTING = fromString("Starting"); + + /** + * Indicates the fault simulation is active. The simulation will have this status after the start operation has + * completed successfully. + */ + public static final FaultSimulationStatus ACTIVE = fromString("Active"); + + /** + * Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in + * progress. + */ + public static final FaultSimulationStatus STOPPING = fromString("Stopping"); + + /** + * Indicates the fault simulation is done. The simulation will have this status after the stop operation has + * completed successfully. + */ + public static final FaultSimulationStatus DONE = fromString("Done"); + + /** + * Indicates the fault simulation has failed on start. The simulation will have this status after the start + * operation fails. + */ + public static final FaultSimulationStatus START_FAILED = fromString("StartFailed"); + + /** + * Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation + * fails. + */ + public static final FaultSimulationStatus STOP_FAILED = fromString("StopFailed"); + + /** + * Creates a new instance of FaultSimulationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FaultSimulationStatus() { + } + + /** + * Creates or finds a FaultSimulationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding FaultSimulationStatus. + */ + public static FaultSimulationStatus fromString(String name) { + return fromString(name, FaultSimulationStatus.class); + } + + /** + * Gets known FaultSimulationStatus values. + * + * @return known FaultSimulationStatus values. + */ + public static Collection values() { + return values(FaultSimulationStatus.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java index bb268d77d712..d09fc9bec740 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/FrontendConfiguration.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.servicefabricmanagedclusters.models; @@ -19,28 +19,28 @@ public final class FrontendConfiguration implements JsonSerializable/resourceGroups//providers/Microsoft.Network/loadBalancers/< - * loadBalancerName>/backendAddressPools/'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{ + * loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. */ private String loadBalancerBackendAddressPoolId; /* * The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. * The format of the resource Id is - * '/subscriptions//resourceGroups//providers/Microsoft.Network/loadBalancers/< - * loadBalancerName>/inboundNatPools/'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{ + * loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. */ private String loadBalancerInboundNatPoolId; /* * The resource Id of application gateway backend address pool. The format of the resource Id is - * '/subscriptions//resourceGroups//providers/Microsoft.Network/ - * applicationGateways//backendAddressPools/'. + * '/subscriptions//resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ + * applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. */ private String applicationGatewayBackendAddressPoolId; @@ -56,7 +56,7 @@ public FrontendConfiguration() { * * @return the ipAddressType value. */ - public IpAddressType ipAddressType() { + public IPAddressType ipAddressType() { return this.ipAddressType; } @@ -67,7 +67,7 @@ public IpAddressType ipAddressType() { * @param ipAddressType the ipAddressType value to set. * @return the FrontendConfiguration object itself. */ - public FrontendConfiguration withIpAddressType(IpAddressType ipAddressType) { + public FrontendConfiguration withIpAddressType(IPAddressType ipAddressType) { this.ipAddressType = ipAddressType; return this; } @@ -75,7 +75,7 @@ public FrontendConfiguration withIpAddressType(IpAddressType ipAddressType) { /** * Get the loadBalancerBackendAddressPoolId property: The resource Id of the Load Balancer backend address pool that * the VM instances of the node type are associated with. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. * * @return the loadBalancerBackendAddressPoolId value. */ @@ -86,7 +86,7 @@ public String loadBalancerBackendAddressPoolId() { /** * Set the loadBalancerBackendAddressPoolId property: The resource Id of the Load Balancer backend address pool that * the VM instances of the node type are associated with. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. * * @param loadBalancerBackendAddressPoolId the loadBalancerBackendAddressPoolId value to set. * @return the FrontendConfiguration object itself. @@ -99,7 +99,7 @@ public FrontendConfiguration withLoadBalancerBackendAddressPoolId(String loadBal /** * Get the loadBalancerInboundNatPoolId property: The resource Id of the Load Balancer inbound NAT pool that the VM * instances of the node type are associated with. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. * * @return the loadBalancerInboundNatPoolId value. */ @@ -110,7 +110,7 @@ public String loadBalancerInboundNatPoolId() { /** * Set the loadBalancerInboundNatPoolId property: The resource Id of the Load Balancer inbound NAT pool that the VM * instances of the node type are associated with. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. * * @param loadBalancerInboundNatPoolId the loadBalancerInboundNatPoolId value to set. * @return the FrontendConfiguration object itself. @@ -123,7 +123,7 @@ public FrontendConfiguration withLoadBalancerInboundNatPoolId(String loadBalance /** * Get the applicationGatewayBackendAddressPoolId property: The resource Id of application gateway backend address * pool. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + * '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. * * @return the applicationGatewayBackendAddressPoolId value. */ @@ -134,7 +134,7 @@ public String applicationGatewayBackendAddressPoolId() { /** * Set the applicationGatewayBackendAddressPoolId property: The resource Id of application gateway backend address * pool. The format of the resource Id is - * '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + * '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. * * @param applicationGatewayBackendAddressPoolId the applicationGatewayBackendAddressPoolId value to set. * @return the FrontendConfiguration object itself. @@ -183,7 +183,7 @@ public static FrontendConfiguration fromJson(JsonReader jsonReader) throws IOExc reader.nextToken(); if ("ipAddressType".equals(fieldName)) { - deserializedFrontendConfiguration.ipAddressType = IpAddressType.fromString(reader.getString()); + deserializedFrontendConfiguration.ipAddressType = IPAddressType.fromString(reader.getString()); } else if ("loadBalancerBackendAddressPoolId".equals(fieldName)) { deserializedFrontendConfiguration.loadBalancerBackendAddressPoolId = reader.getString(); } else if ("loadBalancerInboundNatPoolId".equals(fieldName)) { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPAddressType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPAddressType.java new file mode 100644 index 000000000000..b7f7442df826 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPAddressType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The IP address type. + */ +public final class IPAddressType extends ExpandableStringEnum { + /** + * IPv4 address type. + */ + public static final IPAddressType IPV4 = fromString("IPv4"); + + /** + * IPv6 address type. + */ + public static final IPAddressType IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IPAddressType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IPAddressType() { + } + + /** + * Creates or finds a IPAddressType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IPAddressType. + */ + public static IPAddressType fromString(String name) { + return fromString(name, IPAddressType.class); + } + + /** + * Gets known IPAddressType values. + * + * @return known IPAddressType values. + */ + public static Collection values() { + return values(IPAddressType.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPConfigurationPublicIPAddressConfiguration.java similarity index 64% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPConfigurationPublicIPAddressConfiguration.java index 9bd1e520d9fe..c8f3c20c0ec0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfigurationPublicIpAddressConfiguration.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IPConfigurationPublicIPAddressConfiguration.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.servicefabricmanagedclusters.models; @@ -17,8 +17,8 @@ * The public IP address configuration of the network interface. */ @Fluent -public final class IpConfigurationPublicIpAddressConfiguration - implements JsonSerializable { +public final class IPConfigurationPublicIPAddressConfiguration + implements JsonSerializable { /* * Name of the network interface. */ @@ -32,12 +32,12 @@ public final class IpConfigurationPublicIpAddressConfiguration /* * Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. */ - private PublicIpAddressVersion publicIpAddressVersion; + private PublicIPAddressVersion publicIPAddressVersion; /** - * Creates an instance of IpConfigurationPublicIpAddressConfiguration class. + * Creates an instance of IPConfigurationPublicIPAddressConfiguration class. */ - public IpConfigurationPublicIpAddressConfiguration() { + public IPConfigurationPublicIPAddressConfiguration() { } /** @@ -53,9 +53,9 @@ public String name() { * Set the name property: Name of the network interface. * * @param name the name value to set. - * @return the IpConfigurationPublicIpAddressConfiguration object itself. + * @return the IPConfigurationPublicIPAddressConfiguration object itself. */ - public IpConfigurationPublicIpAddressConfiguration withName(String name) { + public IPConfigurationPublicIPAddressConfiguration withName(String name) { this.name = name; return this; } @@ -73,33 +73,33 @@ public List ipTags() { * Set the ipTags property: Specifies the list of IP tags associated with the public IP address. * * @param ipTags the ipTags value to set. - * @return the IpConfigurationPublicIpAddressConfiguration object itself. + * @return the IPConfigurationPublicIPAddressConfiguration object itself. */ - public IpConfigurationPublicIpAddressConfiguration withIpTags(List ipTags) { + public IPConfigurationPublicIPAddressConfiguration withIpTags(List ipTags) { this.ipTags = ipTags; return this; } /** - * Get the publicIpAddressVersion property: Specifies whether the IP configuration's public IP is IPv4 or IPv6. + * Get the publicIPAddressVersion property: Specifies whether the IP configuration's public IP is IPv4 or IPv6. * Default is IPv4. * - * @return the publicIpAddressVersion value. + * @return the publicIPAddressVersion value. */ - public PublicIpAddressVersion publicIpAddressVersion() { - return this.publicIpAddressVersion; + public PublicIPAddressVersion publicIPAddressVersion() { + return this.publicIPAddressVersion; } /** - * Set the publicIpAddressVersion property: Specifies whether the IP configuration's public IP is IPv4 or IPv6. + * Set the publicIPAddressVersion property: Specifies whether the IP configuration's public IP is IPv4 or IPv6. * Default is IPv4. * - * @param publicIpAddressVersion the publicIpAddressVersion value to set. - * @return the IpConfigurationPublicIpAddressConfiguration object itself. + * @param publicIPAddressVersion the publicIPAddressVersion value to set. + * @return the IPConfigurationPublicIPAddressConfiguration object itself. */ - public IpConfigurationPublicIpAddressConfiguration - withPublicIpAddressVersion(PublicIpAddressVersion publicIpAddressVersion) { - this.publicIpAddressVersion = publicIpAddressVersion; + public IPConfigurationPublicIPAddressConfiguration + withPublicIPAddressVersion(PublicIPAddressVersion publicIPAddressVersion) { + this.publicIPAddressVersion = publicIPAddressVersion; return this; } @@ -112,14 +112,14 @@ public void validate() { if (name() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property name in model IpConfigurationPublicIpAddressConfiguration")); + "Missing required property name in model IPConfigurationPublicIPAddressConfiguration")); } if (ipTags() != null) { ipTags().forEach(e -> e.validate()); } } - private static final ClientLogger LOGGER = new ClientLogger(IpConfigurationPublicIpAddressConfiguration.class); + private static final ClientLogger LOGGER = new ClientLogger(IPConfigurationPublicIPAddressConfiguration.class); /** * {@inheritDoc} @@ -130,41 +130,41 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("publicIPAddressVersion", - this.publicIpAddressVersion == null ? null : this.publicIpAddressVersion.toString()); + this.publicIPAddressVersion == null ? null : this.publicIPAddressVersion.toString()); return jsonWriter.writeEndObject(); } /** - * Reads an instance of IpConfigurationPublicIpAddressConfiguration from the JsonReader. + * Reads an instance of IPConfigurationPublicIPAddressConfiguration from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IpConfigurationPublicIpAddressConfiguration if the JsonReader was pointing to an instance + * @return An instance of IPConfigurationPublicIPAddressConfiguration 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 IpConfigurationPublicIpAddressConfiguration. + * @throws IOException If an error occurs while reading the IPConfigurationPublicIPAddressConfiguration. */ - public static IpConfigurationPublicIpAddressConfiguration fromJson(JsonReader jsonReader) throws IOException { + public static IPConfigurationPublicIPAddressConfiguration fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IpConfigurationPublicIpAddressConfiguration deserializedIpConfigurationPublicIpAddressConfiguration - = new IpConfigurationPublicIpAddressConfiguration(); + IPConfigurationPublicIPAddressConfiguration deserializedIPConfigurationPublicIPAddressConfiguration + = new IPConfigurationPublicIPAddressConfiguration(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("name".equals(fieldName)) { - deserializedIpConfigurationPublicIpAddressConfiguration.name = reader.getString(); + deserializedIPConfigurationPublicIPAddressConfiguration.name = reader.getString(); } else if ("ipTags".equals(fieldName)) { List ipTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); - deserializedIpConfigurationPublicIpAddressConfiguration.ipTags = ipTags; + deserializedIPConfigurationPublicIPAddressConfiguration.ipTags = ipTags; } else if ("publicIPAddressVersion".equals(fieldName)) { - deserializedIpConfigurationPublicIpAddressConfiguration.publicIpAddressVersion - = PublicIpAddressVersion.fromString(reader.getString()); + deserializedIPConfigurationPublicIPAddressConfiguration.publicIPAddressVersion + = PublicIPAddressVersion.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedIpConfigurationPublicIpAddressConfiguration; + return deserializedIPConfigurationPublicIPAddressConfiguration; }); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.java deleted file mode 100644 index 58d68ab69620..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpAddressType.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.servicefabricmanagedclusters.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The IP address type. - */ -public final class IpAddressType extends ExpandableStringEnum { - /** - * Static value IPv4 for IpAddressType. - */ - public static final IpAddressType IPV4 = fromString("IPv4"); - - /** - * Static value IPv6 for IpAddressType. - */ - public static final IpAddressType IPV6 = fromString("IPv6"); - - /** - * Creates a new instance of IpAddressType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IpAddressType() { - } - - /** - * Creates or finds a IpAddressType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IpAddressType. - */ - public static IpAddressType fromString(String name) { - return fromString(name, IpAddressType.class); - } - - /** - * Gets known IpAddressType values. - * - * @return known IpAddressType values. - */ - public static Collection values() { - return values(IpAddressType.class); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java index 3afebf59985c..9c86bb433918 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpConfiguration.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.servicefabricmanagedclusters.models; @@ -53,12 +53,12 @@ public final class IpConfiguration implements JsonSerializable /* * Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. */ - private PrivateIpAddressVersion privateIpAddressVersion; + private PrivateIPAddressVersion privateIPAddressVersion; /* * The public IP address configuration of the network interface. */ - private IpConfigurationPublicIpAddressConfiguration publicIpAddressConfiguration; + private IPConfigurationPublicIPAddressConfiguration publicIPAddressConfiguration; /** * Creates an instance of IpConfiguration class. @@ -180,45 +180,45 @@ public IpConfiguration withSubnet(SubResource subnet) { } /** - * Get the privateIpAddressVersion property: Specifies whether the IP configuration's private IP is IPv4 or IPv6. + * Get the privateIPAddressVersion property: Specifies whether the IP configuration's private IP is IPv4 or IPv6. * Default is IPv4. * - * @return the privateIpAddressVersion value. + * @return the privateIPAddressVersion value. */ - public PrivateIpAddressVersion privateIpAddressVersion() { - return this.privateIpAddressVersion; + public PrivateIPAddressVersion privateIPAddressVersion() { + return this.privateIPAddressVersion; } /** - * Set the privateIpAddressVersion property: Specifies whether the IP configuration's private IP is IPv4 or IPv6. + * Set the privateIPAddressVersion property: Specifies whether the IP configuration's private IP is IPv4 or IPv6. * Default is IPv4. * - * @param privateIpAddressVersion the privateIpAddressVersion value to set. + * @param privateIPAddressVersion the privateIPAddressVersion value to set. * @return the IpConfiguration object itself. */ - public IpConfiguration withPrivateIpAddressVersion(PrivateIpAddressVersion privateIpAddressVersion) { - this.privateIpAddressVersion = privateIpAddressVersion; + public IpConfiguration withPrivateIPAddressVersion(PrivateIPAddressVersion privateIPAddressVersion) { + this.privateIPAddressVersion = privateIPAddressVersion; return this; } /** - * Get the publicIpAddressConfiguration property: The public IP address configuration of the network interface. + * Get the publicIPAddressConfiguration property: The public IP address configuration of the network interface. * - * @return the publicIpAddressConfiguration value. + * @return the publicIPAddressConfiguration value. */ - public IpConfigurationPublicIpAddressConfiguration publicIpAddressConfiguration() { - return this.publicIpAddressConfiguration; + public IPConfigurationPublicIPAddressConfiguration publicIPAddressConfiguration() { + return this.publicIPAddressConfiguration; } /** - * Set the publicIpAddressConfiguration property: The public IP address configuration of the network interface. + * Set the publicIPAddressConfiguration property: The public IP address configuration of the network interface. * - * @param publicIpAddressConfiguration the publicIpAddressConfiguration value to set. + * @param publicIPAddressConfiguration the publicIPAddressConfiguration value to set. * @return the IpConfiguration object itself. */ public IpConfiguration - withPublicIpAddressConfiguration(IpConfigurationPublicIpAddressConfiguration publicIpAddressConfiguration) { - this.publicIpAddressConfiguration = publicIpAddressConfiguration; + withPublicIPAddressConfiguration(IPConfigurationPublicIPAddressConfiguration publicIPAddressConfiguration) { + this.publicIPAddressConfiguration = publicIPAddressConfiguration; return this; } @@ -232,8 +232,8 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property name in model IpConfiguration")); } - if (publicIpAddressConfiguration() != null) { - publicIpAddressConfiguration().validate(); + if (publicIPAddressConfiguration() != null) { + publicIPAddressConfiguration().validate(); } } @@ -254,8 +254,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("subnet", this.subnet); jsonWriter.writeStringField("privateIPAddressVersion", - this.privateIpAddressVersion == null ? null : this.privateIpAddressVersion.toString()); - jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIpAddressConfiguration); + this.privateIPAddressVersion == null ? null : this.privateIPAddressVersion.toString()); + jsonWriter.writeJsonField("publicIPAddressConfiguration", this.publicIPAddressConfiguration); return jsonWriter.writeEndObject(); } @@ -293,11 +293,11 @@ public static IpConfiguration fromJson(JsonReader jsonReader) throws IOException } else if ("subnet".equals(fieldName)) { deserializedIpConfiguration.subnet = SubResource.fromJson(reader); } else if ("privateIPAddressVersion".equals(fieldName)) { - deserializedIpConfiguration.privateIpAddressVersion - = PrivateIpAddressVersion.fromString(reader.getString()); + deserializedIpConfiguration.privateIPAddressVersion + = PrivateIPAddressVersion.fromString(reader.getString()); } else if ("publicIPAddressConfiguration".equals(fieldName)) { - deserializedIpConfiguration.publicIpAddressConfiguration - = IpConfigurationPublicIpAddressConfiguration.fromJson(reader); + deserializedIpConfiguration.publicIPAddressConfiguration + = IPConfigurationPublicIPAddressConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java index 0d32658bcb43..d48f9c3e89c1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/IpTag.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java index 4d9a54d0f0a4..ad9ccde5e1a9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LoadBalancingRule.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LongRunningOperationResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LongRunningOperationResult.java index 1c3517ee2f12..989d7698e5aa 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LongRunningOperationResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/LongRunningOperationResult.java @@ -1,10 +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 com.azure.resourcemanager.servicefabricmanagedclusters.models; -import com.azure.core.management.exception.ManagementError; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.LongRunningOperationResultInner; import java.time.OffsetDateTime; @@ -52,7 +51,7 @@ public interface LongRunningOperationResult { * * @return the error value. */ - ManagementError error(); + ErrorModelError error(); /** * Gets the inner diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java index 62999653ed74..526f82dc7f65 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedApplyMaintenanceWindows.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.servicefabricmanagedclusters.models; @@ -15,7 +15,7 @@ public interface ManagedApplyMaintenanceWindows { * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,7 +29,7 @@ public interface ManagedApplyMaintenanceWindows { * Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be * applied. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java index e9b5bb3e121c..cb0bad16d660 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatus.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java index 462e6214b958..30a89120793d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedAzResiliencyStatuses.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.servicefabricmanagedclusters.models; @@ -14,7 +14,7 @@ public interface ManagedAzResiliencyStatuses { /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +28,7 @@ public interface ManagedAzResiliencyStatuses { /** * Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java index d01a5543368b..d77d223aaddf 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedCluster.java @@ -1,9 +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.servicefabricmanagedclusters.models; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -51,21 +53,24 @@ public interface ManagedCluster { Map tags(); /** - * Gets the sku property: The sku of the managed cluster. + * Gets the etag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields.",. * - * @return the sku value. + * @return the etag value. */ - Sku sku(); + String etag(); /** - * Gets the etag property: Azure resource etag. + * Gets the sku property: The sku of the managed cluster. * - * @return the etag value. + * @return the sku value. */ - String etag(); + Sku sku(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -128,11 +133,11 @@ public interface ManagedCluster { Integer httpGatewayConnectionPort(); /** - * Gets the adminUsername property: VM admin user name. + * Gets the adminUserName property: VM admin user name. * - * @return the adminUsername value. + * @return the adminUserName value. */ - String adminUsername(); + String adminUserName(); /** * Gets the adminPassword property: VM admin user password. @@ -228,8 +233,8 @@ public interface ManagedCluster { List addonFeatures(); /** - * Gets the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the node types that - * are created using any platform OS image with version 'latest'. The default value for this setting is false. + * Gets the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS images with + * version 'latest'. The default value for this setting is false. * * @return the enableAutoOSUpgrade value. */ @@ -281,12 +286,12 @@ public interface ManagedCluster { String ipv6Address(); /** - * Gets the enableServicePublicIp property: Setting this to true will link the IPv4 address as the ServicePublicIP + * Gets the enableServicePublicIP property: Setting this to true will link the IPv4 address as the ServicePublicIP * of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. * - * @return the enableServicePublicIp value. + * @return the enableServicePublicIP value. */ - Boolean enableServicePublicIp(); + Boolean enableServicePublicIP(); /** * Gets the auxiliarySubnets property: Auxiliary subnets for the cluster. @@ -319,12 +324,12 @@ public interface ManagedCluster { Boolean useCustomVnet(); /** - * Gets the publicIpPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will + * Gets the publicIPPrefixId property: Specify the resource id of a public IPv4 prefix that the load balancer will * allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. * - * @return the publicIpPrefixId value. + * @return the publicIPPrefixId value. */ - String publicIpPrefixId(); + String publicIPPrefixId(); /** * Gets the publicIPv6PrefixId property: Specify the resource id of a public IPv6 prefix that the load balancer will @@ -366,6 +371,33 @@ public interface ManagedCluster { */ Boolean enableHttpGatewayExclusiveAuthMode(); + /** + * Gets the autoGeneratedDomainNameLabelScope property: This property is the entry point to using a public CA cert + * for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject + * of the public CA cert. + * + * @return the autoGeneratedDomainNameLabelScope value. + */ + AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope(); + + /** + * Gets the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each node in the + * backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on + * pool size. + * + * @return the allocatedOutboundPorts value. + */ + Integer allocatedOutboundPorts(); + + /** + * Gets the vMImage property: The VM image the node types are configured with. This property controls the Service + * Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is + * 'Windows'. + * + * @return the vMImage value. + */ + String vMImage(); + /** * Gets the region of the resource. * @@ -439,7 +471,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); @@ -464,7 +496,7 @@ interface WithSku { */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDnsName, DefinitionStages.WithClientConnectionPort, - DefinitionStages.WithHttpGatewayConnectionPort, DefinitionStages.WithAdminUsername, + DefinitionStages.WithHttpGatewayConnectionPort, DefinitionStages.WithAdminUserName, DefinitionStages.WithAdminPassword, DefinitionStages.WithLoadBalancingRules, DefinitionStages.WithAllowRdpAccess, DefinitionStages.WithNetworkSecurityRules, DefinitionStages.WithClients, DefinitionStages.WithAzureActiveDirectory, @@ -473,12 +505,14 @@ interface WithCreate DefinitionStages.WithAddonFeatures, DefinitionStages.WithEnableAutoOSUpgrade, DefinitionStages.WithZonalResiliency, DefinitionStages.WithApplicationTypeVersionsCleanupPolicy, DefinitionStages.WithEnableIpv6, DefinitionStages.WithSubnetId, DefinitionStages.WithIpTags, - DefinitionStages.WithEnableServicePublicIp, DefinitionStages.WithAuxiliarySubnets, + DefinitionStages.WithEnableServicePublicIP, DefinitionStages.WithAuxiliarySubnets, DefinitionStages.WithServiceEndpoints, DefinitionStages.WithZonalUpdateMode, - DefinitionStages.WithUseCustomVnet, DefinitionStages.WithPublicIpPrefixId, + DefinitionStages.WithUseCustomVnet, DefinitionStages.WithPublicIPPrefixId, DefinitionStages.WithPublicIPv6PrefixId, DefinitionStages.WithDdosProtectionPlanId, DefinitionStages.WithUpgradeDescription, DefinitionStages.WithHttpGatewayTokenAuthConnectionPort, - DefinitionStages.WithEnableHttpGatewayExclusiveAuthMode { + DefinitionStages.WithEnableHttpGatewayExclusiveAuthMode, + DefinitionStages.WithAutoGeneratedDomainNameLabelScope, DefinitionStages.WithAllocatedOutboundPorts, + DefinitionStages.WithVMImage { /** * Executes the create request. * @@ -548,16 +582,16 @@ interface WithHttpGatewayConnectionPort { } /** - * The stage of the ManagedCluster definition allowing to specify adminUsername. + * The stage of the ManagedCluster definition allowing to specify adminUserName. */ - interface WithAdminUsername { + interface WithAdminUserName { /** - * Specifies the adminUsername property: VM admin user name.. + * Specifies the adminUserName property: VM admin user name.. * - * @param adminUsername VM admin user name. + * @param adminUserName VM admin user name. * @return the next definition stage. */ - WithCreate withAdminUsername(String adminUsername); + WithCreate withAdminUserName(String adminUserName); } /** @@ -684,8 +718,7 @@ interface WithClusterCodeVersion { interface WithClusterUpgradeMode { /** * Specifies the clusterUpgradeMode property: The upgrade mode of the cluster when new Service Fabric - * runtime version is available. - * . + * runtime version is available.. * * @param clusterUpgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is * available. @@ -728,12 +761,11 @@ interface WithAddonFeatures { */ interface WithEnableAutoOSUpgrade { /** - * Specifies the enableAutoOSUpgrade property: Setting this to true enables automatic OS upgrade for the - * node types that are created using any platform OS image with version 'latest'. The default value for this - * setting is false.. + * Specifies the enableAutoOSUpgrade property: Enables automatic OS upgrade for node types created using OS + * images with version 'latest'. The default value for this setting is false.. * - * @param enableAutoOSUpgrade Setting this to true enables automatic OS upgrade for the node types that are - * created using any platform OS image with version 'latest'. The default value for this setting is false. + * @param enableAutoOSUpgrade Enables automatic OS upgrade for node types created using OS images with + * version 'latest'. The default value for this setting is false. * @return the next definition stage. */ WithCreate withEnableAutoOSUpgrade(Boolean enableAutoOSUpgrade); @@ -816,18 +848,18 @@ interface WithIpTags { } /** - * The stage of the ManagedCluster definition allowing to specify enableServicePublicIp. + * The stage of the ManagedCluster definition allowing to specify enableServicePublicIP. */ - interface WithEnableServicePublicIp { + interface WithEnableServicePublicIP { /** - * Specifies the enableServicePublicIp property: Setting this to true will link the IPv4 address as the + * Specifies the enableServicePublicIP property: Setting this to true will link the IPv4 address as the * ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster.. * - * @param enableServicePublicIp Setting this to true will link the IPv4 address as the ServicePublicIP of + * @param enableServicePublicIP Setting this to true will link the IPv4 address as the ServicePublicIP of * the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. * @return the next definition stage. */ - WithCreate withEnableServicePublicIp(Boolean enableServicePublicIp); + WithCreate withEnableServicePublicIP(Boolean enableServicePublicIP); } /** @@ -887,19 +919,19 @@ interface WithUseCustomVnet { } /** - * The stage of the ManagedCluster definition allowing to specify publicIpPrefixId. + * The stage of the ManagedCluster definition allowing to specify publicIPPrefixId. */ - interface WithPublicIpPrefixId { + interface WithPublicIPPrefixId { /** - * Specifies the publicIpPrefixId property: Specify the resource id of a public IPv4 prefix that the load + * Specifies the publicIPPrefixId property: Specify the resource id of a public IPv4 prefix that the load * balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is * created.. * - * @param publicIpPrefixId Specify the resource id of a public IPv4 prefix that the load balancer will + * @param publicIPPrefixId Specify the resource id of a public IPv4 prefix that the load balancer will * allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. * @return the next definition stage. */ - WithCreate withPublicIpPrefixId(String publicIpPrefixId); + WithCreate withPublicIPPrefixId(String publicIPPrefixId); } /** @@ -977,6 +1009,58 @@ interface WithEnableHttpGatewayExclusiveAuthMode { */ WithCreate withEnableHttpGatewayExclusiveAuthMode(Boolean enableHttpGatewayExclusiveAuthMode); } + + /** + * The stage of the ManagedCluster definition allowing to specify autoGeneratedDomainNameLabelScope. + */ + interface WithAutoGeneratedDomainNameLabelScope { + /** + * Specifies the autoGeneratedDomainNameLabelScope property: This property is the entry point to using a + * public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN + * created, matching the subject of the public CA cert.. + * + * @param autoGeneratedDomainNameLabelScope This property is the entry point to using a public CA cert for + * your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the + * subject of the public CA cert. + * @return the next definition stage. + */ + WithCreate withAutoGeneratedDomainNameLabelScope( + AutoGeneratedDomainNameLabelScope autoGeneratedDomainNameLabelScope); + } + + /** + * The stage of the ManagedCluster definition allowing to specify allocatedOutboundPorts. + */ + interface WithAllocatedOutboundPorts { + /** + * Specifies the allocatedOutboundPorts property: The number of outbound ports allocated for SNAT for each + * node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port + * allocation based on pool size.. + * + * @param allocatedOutboundPorts The number of outbound ports allocated for SNAT for each node in the + * backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation + * based on pool size. + * @return the next definition stage. + */ + WithCreate withAllocatedOutboundPorts(Integer allocatedOutboundPorts); + } + + /** + * The stage of the ManagedCluster definition allowing to specify vMImage. + */ + interface WithVMImage { + /** + * Specifies the vMImage property: The VM image the node types are configured with. This property controls + * the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The + * default value is 'Windows'.. + * + * @param vMImage The VM image the node types are configured with. This property controls the Service Fabric + * component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is + * 'Windows'. + * @return the next definition stage. + */ + WithCreate withVMImage(String vMImage); + } } /** @@ -1038,4 +1122,89 @@ interface WithTags { * @return the refreshed resource. */ ManagedCluster refresh(Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId along with {@link Response}. + */ + Response getFaultSimulationWithResponse(FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId. + */ + FaultSimulation getFaultSimulation(FaultSimulationIdContent parameters); + + /** + * Gets the list of recent fault simulations for the cluster. + * + * @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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(); + + /** + * Gets the list of recent fault simulations for the cluster. + * + * @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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(Context context); + + /** + * Starts a fault simulation on the cluster. + * + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the cluster. + * + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); + + /** + * Stops a fault simulation on the cluster. + * + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(FaultSimulationIdContent parameters); + + /** + * Stops a fault simulation on the cluster. + * + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(FaultSimulationIdContent parameters, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java index c8fca5f3a95b..95b31037e078 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterAddOnFeature.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.servicefabricmanagedclusters.models; @@ -12,17 +12,17 @@ */ public final class ManagedClusterAddOnFeature extends ExpandableStringEnum { /** - * Static value DnsService for ManagedClusterAddOnFeature. + * Dns service. */ public static final ManagedClusterAddOnFeature DNS_SERVICE = fromString("DnsService"); /** - * Static value BackupRestoreService for ManagedClusterAddOnFeature. + * Backup and restore service. */ public static final ManagedClusterAddOnFeature BACKUP_RESTORE_SERVICE = fromString("BackupRestoreService"); /** - * Static value ResourceMonitorService for ManagedClusterAddOnFeature. + * Resource monitor service. */ public static final ManagedClusterAddOnFeature RESOURCE_MONITOR_SERVICE = fromString("ResourceMonitorService"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java index af6a698d3616..6f077d129cef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterCodeVersionResult.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.servicefabricmanagedclusters.models; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedClusterCodeVersionResultInner; +import java.time.OffsetDateTime; /** * An immutable client-side representation of ManagedClusterCodeVersionResult. @@ -43,7 +44,7 @@ public interface ManagedClusterCodeVersionResult { * * @return the supportExpiryUtc value. */ - String supportExpiryUtc(); + OffsetDateTime supportExpiryUtc(); /** * Gets the osType property: Cluster operating system, the default will be Windows. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java index 4df44f5a9c1a..a7ef485dfeee 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java index d3baa8be2c3b..56d119d2685f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersionEnvironment.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.servicefabricmanagedclusters.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Defines values for ManagedClusterVersionEnvironment. + * The operating system of the cluster. The default means all. */ public final class ManagedClusterVersionEnvironment extends ExpandableStringEnum { /** - * Static value Windows for ManagedClusterVersionEnvironment. + * Indicates os is Windows. */ public static final ManagedClusterVersionEnvironment WINDOWS = fromString("Windows"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java index 758d037a341c..e22244a58615 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusterVersions.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.servicefabricmanagedclusters.models; @@ -23,7 +23,9 @@ public interface ManagedClusterVersions { * @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 information about an available Service Fabric managed cluster code version along with {@link Response}. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version along with {@link Response}. */ Response getWithResponse(String location, String clusterVersion, Context context); @@ -37,70 +39,80 @@ public interface ManagedClusterVersions { * @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 information about an available Service Fabric managed cluster code version. + * @return information about a Service Fabric managed cluster code version available in the specified location. + * + * Gets information about an available Service Fabric managed cluster code version. */ ManagedClusterCodeVersionResult get(String location, String clusterVersion); /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location along with {@link Response}. */ - Response getByEnvironmentWithResponse(String location, - ManagedClusterVersionEnvironment environment, String clusterVersion, Context context); + Response> listWithResponse(String location, Context context); /** - * Gets information about a Service Fabric cluster code version available for the specified environment. + * Gets the list of Service Fabric cluster code versions available for the specified location. * - * Gets information about an available Service Fabric cluster code version by environment. + * Gets all available code versions for Service Fabric cluster resources by location. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. - * @param clusterVersion The cluster code version. * @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 information about an available Service Fabric cluster code version by environment. + * @return the list of Service Fabric cluster code versions available for the specified location. + * + * Gets all available code versions for Service Fabric cluster resources by location. */ - ManagedClusterCodeVersionResult getByEnvironment(String location, ManagedClusterVersionEnvironment environment, - String clusterVersion); + List list(String location); /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location along with {@link Response}. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment along with + * {@link Response}. */ - Response> listWithResponse(String location, Context context); + Response getByEnvironmentWithResponse(String location, + ManagedClusterVersionEnvironment environment, String clusterVersion, Context context); /** - * Gets the list of Service Fabric cluster code versions available for the specified location. + * Gets information about a Service Fabric cluster code version available for the specified environment. * - * Gets all available code versions for Service Fabric cluster resources by location. + * Gets information about an available Service Fabric cluster code version by environment. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param environment The operating system of the cluster. + * @param clusterVersion The cluster code version. * @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 all available code versions for Service Fabric cluster resources by location. + * @return information about a Service Fabric cluster code version available for the specified environment. + * + * Gets information about an available Service Fabric cluster code version by environment. */ - List list(String location); + ManagedClusterCodeVersionResult getByEnvironment(String location, ManagedClusterVersionEnvironment environment, + String clusterVersion); /** * Gets the list of Service Fabric cluster code versions available for the specified environment. @@ -108,13 +120,14 @@ ManagedClusterCodeVersionResult getByEnvironment(String location, ManagedCluster * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment along with - * {@link Response}. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment along with {@link Response}. */ Response> listByEnvironmentWithResponse(String location, ManagedClusterVersionEnvironment environment, Context context); @@ -125,11 +138,13 @@ Response> listByEnvironmentWithResponse(St * Gets all available code versions for Service Fabric cluster resources by environment. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param environment The operating system of the cluster. The default means all. + * @param environment The operating system of the cluster. * @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 all available code versions for Service Fabric cluster resources by environment. + * @return the list of Service Fabric cluster code versions available for the specified environment. + * + * Gets all available code versions for Service Fabric cluster resources by environment. */ List listByEnvironment(String location, ManagedClusterVersionEnvironment environment); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java index 0edbb4cb3211..6d586ce7855c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedClusters.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.servicefabricmanagedclusters.models; @@ -13,11 +13,62 @@ */ public interface ManagedClusters { /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Get a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 a Service Fabric managed cluster resource created or in the process of being created in the specified + * resource group. + */ + ManagedCluster getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete a Service Fabric managed cluster resource with the specified name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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. + */ + void deleteByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete a Service Fabric managed cluster resource with the specified name. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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. + */ + void delete(String resourceGroupName, String clusterName, Context context); + + /** * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -27,11 +78,9 @@ public interface ManagedClusters { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets the list of Service Fabric cluster resources created in the specified resource group. - * * Gets all Service Fabric cluster resources created or in the process of being created in the resource group. * - * @param resourceGroupName The name of the 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. @@ -42,8 +91,6 @@ public interface ManagedClusters { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,8 +101,6 @@ public interface ManagedClusters { PagedIterable list(); /** - * Gets the list of Service Fabric cluster resources created in the specified subscription. - * * Gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @param context The context to associate with this operation. @@ -68,69 +113,112 @@ public interface ManagedClusters { PagedIterable list(Context context); /** - * Gets a Service Fabric managed cluster resource. - * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group along with {@link Response}. + * @return a fault simulation by the simulationId along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, - Context context); + Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters, Context context); /** - * Gets a Service Fabric managed cluster resource. + * Gets a fault simulation by the simulationId. * - * Get a Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. * @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 Service Fabric managed cluster resource created or in the process of being created in the specified - * resource group. + * @return a fault simulation by the simulationId. */ - ManagedCluster getByResourceGroup(String resourceGroupName, String clusterName); + FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, + FaultSimulationIdContent parameters); /** - * Deletes a Service Fabric managed cluster resource. + * Gets the list of recent fault simulations for the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster 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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName); + + /** + * Gets the list of recent fault simulations for the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster 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 list of recent fault simulations for the cluster as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String clusterName); + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, Context context); /** - * Deletes a Service Fabric managed cluster resource. + * Starts a fault simulation on the cluster. * - * Delete a Service Fabric managed cluster resource with the specified name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. + * @param parameters parameters describing the fault simulation. * @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. */ - void delete(String resourceGroupName, String clusterName, Context context); + void startFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationContentWrapper parameters, + Context context); + + /** + * Stops a fault simulation on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters); /** - * Gets a Service Fabric managed cluster resource. + * Stops a fault simulation on the cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(String resourceGroupName, String clusterName, FaultSimulationIdContent parameters, + Context context); + + /** * Get a Service Fabric managed cluster resource created or in the process of being created in the specified * resource group. * @@ -144,8 +232,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName ManagedCluster getById(String id); /** - * Gets a Service Fabric managed cluster resource. - * * Get a Service Fabric managed cluster resource created or in the process of being created in the specified * resource group. * @@ -160,8 +246,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * * @param id the resource ID. @@ -172,8 +256,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName void deleteById(String id); /** - * Deletes a Service Fabric managed cluster resource. - * * Delete a Service Fabric managed cluster resource with the specified name. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java index dd932db1a443..29531b19f28a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentity.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java index 01674271b092..db2492cb34ab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedIdentityType.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.servicefabricmanagedclusters.models; @@ -9,22 +9,22 @@ */ public enum ManagedIdentityType { /** - * Enum value None. + * Indicates that no identity is associated with the resource. */ NONE("None"), /** - * Enum value SystemAssigned. + * Indicates that system assigned identity is associated with the resource. */ SYSTEM_ASSIGNED("SystemAssigned"), /** - * Enum value UserAssigned. + * Indicates that user assigned identity is associated with the resource. */ USER_ASSIGNED("UserAssigned"), /** - * Enum value SystemAssigned, UserAssigned. + * Indicates that both system assigned and user assigned identity are associated with the resource. */ SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java index ee340237e931..cc0c963e32d2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatus.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.servicefabricmanagedclusters.models; @@ -40,25 +40,25 @@ public interface ManagedMaintenanceWindowStatus { Boolean canApplyUpdates(); /** - * Gets the lastWindowStatusUpdateAtUtc property: Last window update time in UTC. + * Gets the lastWindowStatusUpdateAtUTC property: Last window update time in UTC. * - * @return the lastWindowStatusUpdateAtUtc value. + * @return the lastWindowStatusUpdateAtUTC value. */ - OffsetDateTime lastWindowStatusUpdateAtUtc(); + OffsetDateTime lastWindowStatusUpdateAtUTC(); /** - * Gets the lastWindowStartTimeUtc property: Last window start time in UTC. + * Gets the lastWindowStartTimeUTC property: Last window start time in UTC. * - * @return the lastWindowStartTimeUtc value. + * @return the lastWindowStartTimeUTC value. */ - OffsetDateTime lastWindowStartTimeUtc(); + OffsetDateTime lastWindowStartTimeUTC(); /** - * Gets the lastWindowEndTimeUtc property: Last window end time in UTC. + * Gets the lastWindowEndTimeUTC property: Last window end time in UTC. * - * @return the lastWindowEndTimeUtc value. + * @return the lastWindowEndTimeUTC value. */ - OffsetDateTime lastWindowEndTimeUtc(); + OffsetDateTime lastWindowEndTimeUTC(); /** * Gets the inner diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java index fb9b5bbce51f..764ec9a2a712 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedMaintenanceWindowStatuses.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.servicefabricmanagedclusters.models; @@ -14,7 +14,7 @@ public interface ManagedMaintenanceWindowStatuses { /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,7 +29,7 @@ Response getWithResponse(String resourceGroupNam /** * Action to get Maintenance Window Status of the Service Fabric Managed Clusters. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedProxyResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedProxyResource.java deleted file mode 100644 index 94361c8a53ef..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedProxyResource.java +++ /dev/null @@ -1,175 +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.servicefabricmanagedclusters.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The resource model definition for proxy-only resource. - */ -@Fluent -public class ManagedProxyResource extends ProxyResource { - /* - * Azure resource tags. - */ - private Map tags; - - /* - * Metadata pertaining to creation and last modification of the resource. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedProxyResource class. - */ - public ManagedProxyResource() { - } - - /** - * Get the tags property: Azure resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Azure resource tags. - * - * @param tags the tags value to set. - * @return the ManagedProxyResource object itself. - */ - public ManagedProxyResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Set the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @param systemData the systemData value to set. - * @return the ManagedProxyResource object itself. - */ - ManagedProxyResource withSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * 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(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedProxyResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedProxyResource 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 ManagedProxyResource. - */ - public static ManagedProxyResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedProxyResource deserializedManagedProxyResource = new ManagedProxyResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedProxyResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedProxyResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedProxyResource.type = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedProxyResource.tags = tags; - } else if ("systemData".equals(fieldName)) { - deserializedManagedProxyResource.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedProxyResource; - }); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java index c6963c94408b..f55ea00c80f2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedResourceProvisioningState.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.servicefabricmanagedclusters.models; @@ -12,52 +12,52 @@ */ public final class ManagedResourceProvisioningState extends ExpandableStringEnum { /** - * Static value None for ManagedResourceProvisioningState. + * The resource does not have a provisioning state. */ public static final ManagedResourceProvisioningState NONE = fromString("None"); /** - * Static value Creating for ManagedResourceProvisioningState. + * The resource is being created. */ public static final ManagedResourceProvisioningState CREATING = fromString("Creating"); /** - * Static value Created for ManagedResourceProvisioningState. + * The resource is created. */ public static final ManagedResourceProvisioningState CREATED = fromString("Created"); /** - * Static value Updating for ManagedResourceProvisioningState. + * The resource is being updated. */ public static final ManagedResourceProvisioningState UPDATING = fromString("Updating"); /** - * Static value Succeeded for ManagedResourceProvisioningState. + * The resource provisioning has succeeded. */ public static final ManagedResourceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ManagedResourceProvisioningState. + * The resource provisioning has failed. */ public static final ManagedResourceProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ManagedResourceProvisioningState. + * The resource provisioning has been canceled. */ public static final ManagedResourceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Deleting for ManagedResourceProvisioningState. + * The resource is being deleted. */ public static final ManagedResourceProvisioningState DELETING = fromString("Deleting"); /** - * Static value Deleted for ManagedResourceProvisioningState. + * The resource has been deleted. */ public static final ManagedResourceProvisioningState DELETED = fromString("Deleted"); /** - * Static value Other for ManagedResourceProvisioningState. + * The resource provisioning state is a state other than the previously specified states. */ public static final ManagedResourceProvisioningState OTHER = fromString("Other"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java index b05b538c604e..4341bb7ed14b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedUnsupportedVMSizes.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.servicefabricmanagedclusters.models; @@ -13,52 +13,52 @@ */ public interface ManagedUnsupportedVMSizes { /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. + * @param vmSize VM Size name. + * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. + * @return unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. */ - PagedIterable list(String location); + Response getWithResponse(String location, String vmSize, Context context); /** - * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + * Get unsupported vm size for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param context The context to associate with this operation. + * @param vmSize VM Size name. * @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 lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with - * {@link PagedIterable}. + * @return unsupported vm size for Service Fabric Managed Clusters. */ - PagedIterable list(String location, Context context); + ManagedVMSize get(String location, String vmSize); /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. - * @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 unsupported vm size for Service Fabric Managed Clusters along with {@link Response}. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String location, String vmSize, Context context); + PagedIterable list(String location); /** - * Get unsupported vm size for Service Fabric Managed Clusters. + * Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @param location The location for the cluster code versions. This is different from cluster location. - * @param vmSize VM Size name. + * @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 unsupported vm size for Service Fabric Managed Clusters. + * @return the lists of unsupported vm sizes for Service Fabric Managed Clusters as paginated response with + * {@link PagedIterable}. */ - ManagedVMSize get(String location, String vmSize); + PagedIterable list(String location, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java index 165733bc1e4c..eb91b6a7895f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ManagedVMSize.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java index b43cb5d4f2a4..190f5c625026 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/MoveCost.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.servicefabricmanagedclusters.models; @@ -12,22 +12,22 @@ */ public final class MoveCost extends ExpandableStringEnum { /** - * Static value Zero for MoveCost. + * Zero move cost. This value is zero. */ public static final MoveCost ZERO = fromString("Zero"); /** - * Static value Low for MoveCost. + * Specifies the move cost of the service as Low. The value is 1. */ public static final MoveCost LOW = fromString("Low"); /** - * Static value Medium for MoveCost. + * Specifies the move cost of the service as Medium. The value is 2. */ public static final MoveCost MEDIUM = fromString("Medium"); /** - * Static value High for MoveCost. + * Specifies the move cost of the service as High. The value is 3. */ public static final MoveCost HIGH = fromString("High"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java index 85b17fb6ea9a..43368e388426 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NamedPartitionScheme.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.servicefabricmanagedclusters.models; @@ -18,7 +18,7 @@ @Fluent public final class NamedPartitionScheme extends Partition { /* - * Specifies how the service is partitioned. + * The partitionScheme property. */ private PartitionScheme partitionScheme = PartitionScheme.NAMED; @@ -34,7 +34,7 @@ public NamedPartitionScheme() { } /** - * Get the partitionScheme property: Specifies how the service is partitioned. + * Get the partitionScheme property: The partitionScheme property. * * @return the partitionScheme value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java index 7a12b8934aa2..3259f00cacb9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NetworkSecurityRule.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java index 9b393d71eb44..7b8734255244 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeType.java @@ -1,9 +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.servicefabricmanagedclusters.models; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeInner; @@ -36,25 +38,25 @@ public interface NodeType { String type(); /** - * Gets the tags property: Azure resource tags. + * Gets the tags property: Resource tags. * * @return the tags value. */ Map tags(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the sku property: The node type sku. * - * @return the systemData value. + * @return the sku value. */ - SystemData systemData(); + NodeTypeSku sku(); /** - * Gets the sku property: The node type sku. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the sku value. + * @return the systemData value. */ - NodeTypeSku sku(); + SystemData systemData(); /** * Gets the isPrimary property: Indicates the Service Fabric system services for the cluster will run on this node @@ -65,9 +67,8 @@ public interface NodeType { boolean isPrimary(); /** - * Gets the vmInstanceCount property: The number of nodes in the node type. <br /><br />**Values:** - * <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * Gets the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when auto scale + * rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * * @return the vmInstanceCount value. */ @@ -179,7 +180,7 @@ public interface NodeType { * * @return the vmExtensions value. */ - List vmExtensions(); + List vmExtensions(); /** * Gets the vmManagedIdentity property: Identities to assign to the virtual machine scale set under the node type. @@ -367,12 +368,12 @@ public interface NodeType { Boolean secureBootEnabled(); /** - * Gets the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 address. This + * Gets the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 address. This * is only supported on secondary node types with custom Load Balancers. * - * @return the enableNodePublicIp value. + * @return the enableNodePublicIP value. */ - Boolean enableNodePublicIp(); + Boolean enableNodePublicIP(); /** * Gets the enableNodePublicIPv6 property: Specifies whether each node is allocated its own public IPv6 address. @@ -449,6 +450,22 @@ public interface NodeType { */ String computerNamePrefix(); + /** + * Gets the vmApplications property: Specifies the gallery applications that should be made available to the + * underlying VMSS. + * + * @return the vmApplications value. + */ + List vmApplications(); + + /** + * Gets the zoneBalance property: Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * + * @return the zoneBalance value. + */ + Boolean zoneBalance(); + /** * Gets the name of the resource group. * @@ -487,7 +504,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, clusterName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @return the next definition stage. */ @@ -515,11 +532,12 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku DefinitionStages.WithSpotRestoreTimeout, DefinitionStages.WithEvictionPolicy, DefinitionStages.WithVmImageResourceId, DefinitionStages.WithSubnetId, DefinitionStages.WithVmSetupActions, DefinitionStages.WithSecurityType, DefinitionStages.WithSecureBootEnabled, - DefinitionStages.WithEnableNodePublicIp, DefinitionStages.WithEnableNodePublicIPv6, + DefinitionStages.WithEnableNodePublicIP, DefinitionStages.WithEnableNodePublicIPv6, DefinitionStages.WithVmSharedGalleryImageId, DefinitionStages.WithNatGatewayId, DefinitionStages.WithNatConfigurations, DefinitionStages.WithVmImagePlan, DefinitionStages.WithServiceArtifactReferenceId, DefinitionStages.WithDscpConfigurationId, - DefinitionStages.WithAdditionalNetworkInterfaceConfigurations, DefinitionStages.WithComputerNamePrefix { + DefinitionStages.WithAdditionalNetworkInterfaceConfigurations, DefinitionStages.WithComputerNamePrefix, + DefinitionStages.WithVmApplications, DefinitionStages.WithZoneBalance { /** * Executes the create request. * @@ -541,9 +559,9 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithSku */ interface WithTags { /** - * Specifies the tags property: Azure resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Azure resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -582,13 +600,12 @@ interface WithIsPrimary { */ interface WithVmInstanceCount { /** - * Specifies the vmInstanceCount property: The number of nodes in the node type. <br /><br - * />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined - * <br /> 0 - Not supported <br /> >0 - Use for manual scale.. + * Specifies the vmInstanceCount property: The number of nodes in the node type. **Values:** -1 - Use when + * auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual + * scale.. * - * @param vmInstanceCount The number of nodes in the node type. <br /><br />**Values:** <br - * />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not - * supported <br /> >0 - Use for manual scale. + * @param vmInstanceCount The number of nodes in the node type. **Values:** -1 - Use when auto scale rules + * are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. * @return the next definition stage. */ WithCreate withVmInstanceCount(int vmInstanceCount); @@ -797,7 +814,7 @@ interface WithVmExtensions { * @param vmExtensions Set of extensions that should be installed onto the virtual machines. * @return the next definition stage. */ - WithCreate withVmExtensions(List vmExtensions); + WithCreate withVmExtensions(List vmExtensions); } /** @@ -1139,18 +1156,18 @@ interface WithSecureBootEnabled { } /** - * The stage of the NodeType definition allowing to specify enableNodePublicIp. + * The stage of the NodeType definition allowing to specify enableNodePublicIP. */ - interface WithEnableNodePublicIp { + interface WithEnableNodePublicIP { /** - * Specifies the enableNodePublicIp property: Specifies whether each node is allocated its own public IPv4 + * Specifies the enableNodePublicIP property: Specifies whether each node is allocated its own public IPv4 * address. This is only supported on secondary node types with custom Load Balancers.. * - * @param enableNodePublicIp Specifies whether each node is allocated its own public IPv4 address. This is + * @param enableNodePublicIP Specifies whether each node is allocated its own public IPv4 address. This is * only supported on secondary node types with custom Load Balancers. * @return the next definition stage. */ - WithCreate withEnableNodePublicIp(Boolean enableNodePublicIp); + WithCreate withEnableNodePublicIP(Boolean enableNodePublicIP); } /** @@ -1294,6 +1311,36 @@ interface WithComputerNamePrefix { */ WithCreate withComputerNamePrefix(String computerNamePrefix); } + + /** + * The stage of the NodeType definition allowing to specify vmApplications. + */ + interface WithVmApplications { + /** + * Specifies the vmApplications property: Specifies the gallery applications that should be made available + * to the underlying VMSS.. + * + * @param vmApplications Specifies the gallery applications that should be made available to the underlying + * VMSS. + * @return the next definition stage. + */ + WithCreate withVmApplications(List vmApplications); + } + + /** + * The stage of the NodeType definition allowing to specify zoneBalance. + */ + interface WithZoneBalance { + /** + * Specifies the zoneBalance property: Setting this to true allows stateless node types to scale out without + * equal distribution across zones.. + * + * @param zoneBalance Setting this to true allows stateless node types to scale out without equal + * distribution across zones. + * @return the next definition stage. + */ + WithCreate withZoneBalance(Boolean zoneBalance); + } } /** @@ -1370,35 +1417,75 @@ interface WithSku { NodeType refresh(Context context); /** - * Restarts one or more nodes on the node type. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param parameters parameters for deallocate action. + * @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. + */ + void deallocate(NodeTypeActionParameters parameters); + + /** + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * @param parameters parameters for restart action. + * @param parameters parameters for deallocate action. + * @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. */ - void restart(NodeTypeActionParameters parameters); + void deallocate(NodeTypeActionParameters parameters, Context context); /** - * Restarts one or more nodes on the node type. + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param parameters parameters for delete action. + * @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. + */ + void deleteNode(NodeTypeActionParameters parameters); + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. * - * @param parameters parameters for restart action. + * @param parameters parameters for delete action. * @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. */ - void restart(NodeTypeActionParameters parameters, Context context); + void deleteNode(NodeTypeActionParameters parameters, Context context); /** - * Reimages one or more nodes on the node type. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * + * @param parameters parameters for redeploy action. + * @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. + */ + void redeploy(NodeTypeActionParameters parameters); + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. + * + * @param parameters parameters for redeploy action. + * @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. + */ + void redeploy(NodeTypeActionParameters parameters, Context context); + + /** * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * @@ -1410,8 +1497,6 @@ interface WithSku { void reimage(NodeTypeActionParameters parameters); /** - * Reimages one or more nodes on the node type. - * * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * @@ -1424,29 +1509,133 @@ interface WithSku { void reimage(NodeTypeActionParameters parameters, Context context); /** - * Deletes one or more nodes on the node type. + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * @param parameters parameters for restart action. + * @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. + */ + void restart(NodeTypeActionParameters parameters); + + /** + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * @param parameters parameters for delete action. + * @param parameters parameters for restart action. + * @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. */ - void deleteNode(NodeTypeActionParameters parameters); + void restart(NodeTypeActionParameters parameters, Context context); /** - * Deletes one or more nodes on the node type. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * @param parameters parameters for start action. + * @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. + */ + void start(NodeTypeActionParameters parameters); + + /** + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param parameters parameters for delete action. + * @param parameters parameters for start action. * @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. */ - void deleteNode(NodeTypeActionParameters parameters, Context context); + void start(NodeTypeActionParameters parameters, Context context); + + /** + * Starts a fault simulation on the node type. + * + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(FaultSimulationContentWrapper parameters); + + /** + * Starts a fault simulation on the node type. + * + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(FaultSimulationContentWrapper parameters, Context context); + + /** + * Stops a fault simulation on the node type. + * + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(FaultSimulationIdContent parameters); + + /** + * Stops a fault simulation on the node type. + * + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId along with {@link Response}. + */ + Response getFaultSimulationWithResponse(FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. + * + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId. + */ + FaultSimulation getFaultSimulation(FaultSimulationIdContent parameters); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java index d28747652dfb..ce627b392a55 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeActionParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java index ea8ac6d99a64..22b5d1c6c0fd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeAvailableSku.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.servicefabricmanagedclusters.models; @@ -11,7 +11,7 @@ */ public interface NodeTypeAvailableSku { /** - * Gets the resourceType property: The type of resource the sku applies to. <br /><br />Value: + * Gets the resourceType property: The type of resource the sku applies to. Value: * Microsoft.ServiceFabric/managedClusters/nodeTypes. * * @return the resourceType value. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java new file mode 100644 index 000000000000..ce19288ed009 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeFaultSimulation.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Node type fault simulation object with status. + */ +@Immutable +public final class NodeTypeFaultSimulation implements JsonSerializable { + /* + * Node type name. + */ + private String nodeTypeName; + + /* + * Fault simulation status + */ + private FaultSimulationStatus status; + + /* + * Current or latest asynchronous operation identifier on the node type. + */ + private String operationId; + + /* + * Current or latest asynchronous operation status on the node type + */ + private SfmcOperationStatus operationStatus; + + /** + * Creates an instance of NodeTypeFaultSimulation class. + */ + private NodeTypeFaultSimulation() { + } + + /** + * Get the nodeTypeName property: Node type name. + * + * @return the nodeTypeName value. + */ + public String nodeTypeName() { + return this.nodeTypeName; + } + + /** + * Get the status property: Fault simulation status. + * + * @return the status value. + */ + public FaultSimulationStatus status() { + return this.status; + } + + /** + * Get the operationId property: Current or latest asynchronous operation identifier on the node type. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the operationStatus property: Current or latest asynchronous operation status on the node type. + * + * @return the operationStatus value. + */ + public SfmcOperationStatus operationStatus() { + return this.operationStatus; + } + + /** + * 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(); + jsonWriter.writeStringField("nodeTypeName", this.nodeTypeName); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("operationId", this.operationId); + jsonWriter.writeStringField("operationStatus", + this.operationStatus == null ? null : this.operationStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeTypeFaultSimulation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeTypeFaultSimulation 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 NodeTypeFaultSimulation. + */ + public static NodeTypeFaultSimulation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeTypeFaultSimulation deserializedNodeTypeFaultSimulation = new NodeTypeFaultSimulation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeTypeName".equals(fieldName)) { + deserializedNodeTypeFaultSimulation.nodeTypeName = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedNodeTypeFaultSimulation.status = FaultSimulationStatus.fromString(reader.getString()); + } else if ("operationId".equals(fieldName)) { + deserializedNodeTypeFaultSimulation.operationId = reader.getString(); + } else if ("operationStatus".equals(fieldName)) { + deserializedNodeTypeFaultSimulation.operationStatus + = SfmcOperationStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeTypeFaultSimulation; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java index efd4d9e3a0ab..30028db1845e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeNatConfig.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java index b7c6289dc336..888dd6b60516 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSku.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.servicefabricmanagedclusters.models; @@ -17,20 +17,18 @@ @Fluent public final class NodeTypeSku implements JsonSerializable { /* - * The sku name.

Name is internally generated and is used in auto-scale scenarios.
Property does - * not allow to be changed to other values than generated.
To avoid deployment errors please omit the - * property. + * The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be + * changed to other values than generated. To avoid deployment errors please omit the property. */ private String name; /* - * Specifies the tier of the node type.

Possible Values:
**Standard** + * Specifies the tier of the node type. Possible Values: **Standard** */ private String tier; /* - * The number of nodes in the node type.

If present in request it will override - * properties.vmInstanceCount. + * The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. */ private int capacity; @@ -41,9 +39,8 @@ public NodeTypeSku() { } /** - * Get the name property: The sku name. <br /><br />Name is internally generated and is used in - * auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br - * /> To avoid deployment errors please omit the property. + * Get the name property: The sku name. Name is internally generated and is used in auto-scale scenarios. Property + * does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. * * @return the name value. */ @@ -52,9 +49,8 @@ public String name() { } /** - * Set the name property: The sku name. <br /><br />Name is internally generated and is used in - * auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br - * /> To avoid deployment errors please omit the property. + * Set the name property: The sku name. Name is internally generated and is used in auto-scale scenarios. Property + * does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. * * @param name the name value to set. * @return the NodeTypeSku object itself. @@ -65,8 +61,7 @@ public NodeTypeSku withName(String name) { } /** - * Get the tier property: Specifies the tier of the node type. <br /><br /> Possible Values:<br /> - * **Standard**. + * Get the tier property: Specifies the tier of the node type. Possible Values: **Standard**. * * @return the tier value. */ @@ -75,8 +70,7 @@ public String tier() { } /** - * Set the tier property: Specifies the tier of the node type. <br /><br /> Possible Values:<br /> - * **Standard**. + * Set the tier property: Specifies the tier of the node type. Possible Values: **Standard**. * * @param tier the tier value to set. * @return the NodeTypeSku object itself. @@ -87,8 +81,8 @@ public NodeTypeSku withTier(String tier) { } /** - * Get the capacity property: The number of nodes in the node type.<br /><br />If present in request it - * will override properties.vmInstanceCount. + * Get the capacity property: The number of nodes in the node type. If present in request it will override + * properties.vmInstanceCount. * * @return the capacity value. */ @@ -97,8 +91,8 @@ public int capacity() { } /** - * Set the capacity property: The number of nodes in the node type.<br /><br />If present in request it - * will override properties.vmInstanceCount. + * Set the capacity property: The number of nodes in the node type. If present in request it will override + * properties.vmInstanceCount. * * @param capacity the capacity value to set. * @return the NodeTypeSku object itself. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java index d01bd7abf874..594d52423d49 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkuCapacity.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.servicefabricmanagedclusters.models; @@ -39,7 +39,7 @@ public final class NodeTypeSkuCapacity implements JsonSerializable { /** - * Static value None for NodeTypeSkuScaleType. + * Node count is not adjustable in any way (e.g. it is fixed). */ public static final NodeTypeSkuScaleType NONE = fromString("None"); /** - * Static value Manual for NodeTypeSkuScaleType. + * The user must manually scale out/in. */ public static final NodeTypeSkuScaleType MANUAL = fromString("Manual"); /** - * Static value Automatic for NodeTypeSkuScaleType. + * Automatic scale is allowed. */ public static final NodeTypeSkuScaleType AUTOMATIC = fromString("Automatic"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java index 6c284b9966d5..bb6553751214 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSkus.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.servicefabricmanagedclusters.models; @@ -12,11 +12,9 @@ */ public interface NodeTypeSkus { /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,11 +25,9 @@ public interface NodeTypeSkus { PagedIterable list(String resourceGroupName, String clusterName, String nodeTypeName); /** - * Gets a Service Fabric node type SKUs. - * * Get a Service Fabric node type supported SKUs. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param context The context to associate with this operation. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java index 8c47e3fd362e..c9f8343980c5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeSupportedSku.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.servicefabricmanagedclusters.models; @@ -22,14 +22,14 @@ public final class NodeTypeSupportedSku implements JsonSerializable
Possible Values:
**Standard** + * Specifies the tier of the node type. Possible Values: **Standard** */ private String tier; /** * Creates an instance of NodeTypeSupportedSku class. */ - public NodeTypeSupportedSku() { + private NodeTypeSupportedSku() { } /** @@ -42,8 +42,7 @@ public String name() { } /** - * Get the tier property: Specifies the tier of the node type. <br /><br /> Possible Values:<br /> - * **Standard**. + * Get the tier property: Specifies the tier of the node type. Possible Values: **Standard**. * * @return the tier value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java index 934b10dd156a..7e7040234266 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypeUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java index 5ab19f413847..574edbdbaa67 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NodeTypes.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.servicefabricmanagedclusters.models; @@ -13,11 +13,62 @@ */ public interface NodeTypes { /** - * Gets the list of Node types of the specified managed cluster. + * Get a Service Fabric node type of a given managed cluster. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Service Fabric node type of a given managed cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, + Context context); + + /** + * Get a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 Service Fabric node type of a given managed cluster. + */ + NodeType get(String resourceGroupName, String clusterName, String nodeTypeName); + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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. + */ + void delete(String resourceGroupName, String clusterName, String nodeTypeName); + + /** + * Delete a Service Fabric node type of a given managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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. + */ + void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context); + + /** * Gets all Node types of the specified managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,11 +78,9 @@ public interface NodeTypes { PagedIterable listByManagedClusters(String resourceGroupName, String clusterName); /** - * Gets the list of Node types of the specified managed cluster. - * * Gets all Node types of the specified managed cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,47 +91,103 @@ public interface NodeTypes { PagedIterable listByManagedClusters(String resourceGroupName, String clusterName, Context context); /** - * Restarts one or more nodes on the node type. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. - * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for deallocate action. * @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. */ - void restart(String resourceGroupName, String clusterName, String nodeTypeName, + void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); /** - * Restarts one or more nodes on the node type. + * Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs + * and release them from the cluster. * - * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and - * activate the nodes back again. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for deallocate action. + * @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. + */ + void deallocate(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for restart action. + * @param parameters parameters for delete action. + * @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. + */ + void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); + + /** + * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and + * removes the state from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for delete action. * @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. */ - void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, - Context context); + void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); + + /** + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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. + */ + void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters); /** - * Reimages one or more nodes on the node type. + * Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, + * move them to a new node, and power them back on. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for redeploy action. + * @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. + */ + void redeploy(String resourceGroupName, String clusterName, String nodeTypeName, + NodeTypeActionParameters parameters, Context context); + + /** * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for reimage action. @@ -94,12 +199,10 @@ void reimage(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); /** - * Reimages one or more nodes on the node type. - * * Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. * @param parameters parameters for reimage action. @@ -112,104 +215,185 @@ void reimage(String resourceGroupName, String clusterName, String nodeTypeName, Context context); /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for restart action. * @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. */ - void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, + void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); /** - * Deletes one or more nodes on the node type. - * - * Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and - * removes the state from the cluster. + * Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and + * activate the nodes back again. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. - * @param parameters parameters for delete action. + * @param parameters parameters for restart action. * @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. */ - void deleteNode(String resourceGroupName, String clusterName, String nodeTypeName, - NodeTypeActionParameters parameters, Context context); + void restart(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, + Context context); /** - * Gets a Service Fabric node type. + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * Get a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters for start action. + * @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. + */ + void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters); + + /** + * Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and + * activate them. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters for start action. * @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 Service Fabric node type of a given managed cluster along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String clusterName, String nodeTypeName, + void start(String resourceGroupName, String clusterName, String nodeTypeName, NodeTypeActionParameters parameters, Context context); /** - * Gets a Service Fabric node type. - * - * Get a Service Fabric node type of a given managed cluster. + * Starts a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. * @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 Service Fabric node type of a given managed cluster. */ - NodeType get(String resourceGroupName, String clusterName, String nodeTypeName); + void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters); /** - * Deletes a Service Fabric node type. + * Starts a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameters describing the fault simulation. + * @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. + */ + void startFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationContentWrapper parameters, Context context); + + /** + * Stops a fault simulation on the node type. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. * @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. */ - void delete(String resourceGroupName, String clusterName, String nodeTypeName); + void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters); /** - * Deletes a Service Fabric node type. + * Stops a fault simulation on the node type. * - * Delete a Service Fabric node type of a given managed cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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. + */ + void stopFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters, Context context); + + /** + * Gets a fault simulation by the simulationId. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. * @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 fault simulation by the simulationId along with {@link Response}. */ - void delete(String resourceGroupName, String clusterName, String nodeTypeName, Context context); + Response getFaultSimulationWithResponse(String resourceGroupName, String clusterName, + String nodeTypeName, FaultSimulationIdContent parameters, Context context); /** - * Gets a Service Fabric node type. + * Gets a fault simulation by the simulationId. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @param parameters parameter with fault simulation id. + * @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 fault simulation by the simulationId. + */ + FaultSimulation getFaultSimulation(String resourceGroupName, String clusterName, String nodeTypeName, + FaultSimulationIdContent parameters); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName); + + /** + * Gets the list of recent fault simulations for the node type. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster resource. + * @param nodeTypeName The name of the node type. + * @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 list of recent fault simulations for the node type as paginated response with {@link PagedIterable}. + */ + PagedIterable listFaultSimulation(String resourceGroupName, String clusterName, + String nodeTypeName, Context context); + + /** * Get a Service Fabric node type of a given managed cluster. * * @param id the resource ID. @@ -221,8 +405,6 @@ Response getWithResponse(String resourceGroupName, String clusterName, NodeType getById(String id); /** - * Gets a Service Fabric node type. - * * Get a Service Fabric node type of a given managed cluster. * * @param id the resource ID. @@ -235,8 +417,6 @@ Response getWithResponse(String resourceGroupName, String clusterName, Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric node type. - * * Delete a Service Fabric node type of a given managed cluster. * * @param id the resource ID. @@ -247,8 +427,6 @@ Response getWithResponse(String resourceGroupName, String clusterName, void deleteById(String id); /** - * Deletes a Service Fabric node type. - * * Delete a Service Fabric node type of a given managed cluster. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java index bf23462eba09..9e3391cde54d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/NsgProtocol.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.servicefabricmanagedclusters.models; @@ -12,37 +12,37 @@ */ public final class NsgProtocol extends ExpandableStringEnum { /** - * Static value http for NsgProtocol. + * Protocol applies to HTTP. */ public static final NsgProtocol HTTP = fromString("http"); /** - * Static value https for NsgProtocol. + * Protocol applies to HTTPS. */ public static final NsgProtocol HTTPS = fromString("https"); /** - * Static value tcp for NsgProtocol. + * Protocol applies to TCP. */ public static final NsgProtocol TCP = fromString("tcp"); /** - * Static value udp for NsgProtocol. + * Protocol applies to UDP. */ public static final NsgProtocol UDP = fromString("udp"); /** - * Static value icmp for NsgProtocol. + * Protocol applies to ICMP. */ public static final NsgProtocol ICMP = fromString("icmp"); /** - * Static value ah for NsgProtocol. + * Protocol applies to AH. */ public static final NsgProtocol AH = fromString("ah"); /** - * Static value esp for NsgProtocol. + * Protocol applies to ESP. */ public static final NsgProtocol ESP = fromString("esp"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java index ef3d2355dde5..6e83f5672ea9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResult.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResults.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResults.java index de124028482d..bca02c793463 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResults.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResults.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.servicefabricmanagedclusters.models; @@ -13,24 +13,23 @@ public interface OperationResults { /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. - * @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 long running operation result. */ - OperationResultsGetResponse getWithResponse(String location, String operationId, Context context); + void get(String location, String operationId); /** * Get long running operation result. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. + * @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. */ - void get(String location, String operationId); + void get(String location, String operationId, Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetHeaders.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetHeaders.java deleted file mode 100644 index 140bcb71099f..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetHeaders.java +++ /dev/null @@ -1,58 +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.servicefabricmanagedclusters.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The OperationResultsGetHeaders model. - */ -@Fluent -public final class OperationResultsGetHeaders { - /* - * The Location property. - */ - private String location; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of OperationResultsGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public OperationResultsGetHeaders(HttpHeaders rawHeaders) { - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The Location property. - * - * @param location the location value to set. - * @return the OperationResultsGetHeaders object itself. - */ - public OperationResultsGetHeaders withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetResponse.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetResponse.java deleted file mode 100644 index 49db094df2e9..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationResultsGetResponse.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.servicefabricmanagedclusters.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** - * Contains all response data for the get operation. - */ -public final class OperationResultsGetResponse extends ResponseBase { - /** - * Creates an instance of OperationResultsGetResponse. - * - * @param request the request which resulted in this OperationResultsGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public OperationResultsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - OperationResultsGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationStatus.java index 99f3fe6a910a..984ad0d14553 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationStatus.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OperationStatus.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.servicefabricmanagedclusters.models; @@ -14,7 +14,7 @@ public interface OperationStatus { /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +27,7 @@ public interface OperationStatus { /** * Get long running operation status. * - * @param location The location for the cluster code versions. This is different from cluster location. + * @param location The name of the Azure region. * @param operationId operation identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java index c34dc8e1a734..043ff9610f1a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Operations.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.servicefabricmanagedclusters.models; @@ -18,8 +18,8 @@ public interface Operations { * * @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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ PagedIterable list(); @@ -32,8 +32,8 @@ public interface Operations { * @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 list of available Service Fabric resource provider API operations as paginated response with - * {@link PagedIterable}. + * @return describes the result of the request to list Service Fabric resource provider operations as paginated + * response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java index e339a1347b25..780e624ebea0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/OsType.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.servicefabricmanagedclusters.models; @@ -12,7 +12,7 @@ */ public final class OsType extends ExpandableStringEnum { /** - * Static value Windows for OsType. + * Indicates os is Windows. */ public static final OsType WINDOWS = fromString("Windows"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java index 3b6b4bbbed23..a0614bb96251 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Partition.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.servicefabricmanagedclusters.models; @@ -17,7 +17,7 @@ @Immutable public class Partition implements JsonSerializable { /* - * Specifies how the service is partitioned. + * The partitionScheme property. */ private PartitionScheme partitionScheme = PartitionScheme.fromString("Partition"); @@ -28,7 +28,7 @@ public Partition() { } /** - * Get the partitionScheme property: Specifies how the service is partitioned. + * Get the partitionScheme property: The partitionScheme property. * * @return the partitionScheme value. */ @@ -79,12 +79,12 @@ public static Partition fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Named".equals(discriminatorValue)) { - return NamedPartitionScheme.fromJson(readerToUse.reset()); + if ("UniformInt64Range".equals(discriminatorValue)) { + return UniformInt64RangePartitionScheme.fromJson(readerToUse.reset()); } else if ("Singleton".equals(discriminatorValue)) { return SingletonPartitionScheme.fromJson(readerToUse.reset()); - } else if ("UniformInt64Range".equals(discriminatorValue)) { - return UniformInt64RangePartitionScheme.fromJson(readerToUse.reset()); + } else if ("Named".equals(discriminatorValue)) { + return NamedPartitionScheme.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java index fb711c853c3d..031603f258dd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionInstanceCountScaleMechanism.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.servicefabricmanagedclusters.models; @@ -16,7 +16,7 @@ @Fluent public final class PartitionInstanceCountScaleMechanism extends ScalingMechanism { /* - * Specifies the mechanism associated with this scaling policy. + * The kind property. */ private ServiceScalingMechanismKind kind = ServiceScalingMechanismKind.SCALE_PARTITION_INSTANCE_COUNT; @@ -42,7 +42,7 @@ public PartitionInstanceCountScaleMechanism() { } /** - * Get the kind property: Specifies the mechanism associated with this scaling policy. + * Get the kind property: The kind property. * * @return the kind value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java index 874bb507ed07..b062d4bbcac2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PartitionScheme.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.servicefabricmanagedclusters.models; @@ -12,17 +12,18 @@ */ public final class PartitionScheme extends ExpandableStringEnum { /** - * Static value Singleton for PartitionScheme. + * Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0. */ public static final PartitionScheme SINGLETON = fromString("Singleton"); /** - * Static value UniformInt64Range for PartitionScheme. + * Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The + * value is 1. */ public static final PartitionScheme UNIFORM_INT64RANGE = fromString("UniformInt64Range"); /** - * Static value Named for PartitionScheme. + * Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2. */ public static final PartitionScheme NAMED = fromString("Named"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java index 9475de62484a..378fd8ae9686 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateEndpointNetworkPolicies.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class PrivateEndpointNetworkPolicies extends ExpandableStringEnum { /** - * Static value enabled for PrivateEndpointNetworkPolicies. + * Enable apply network policies on private end point in the subnet. */ public static final PrivateEndpointNetworkPolicies ENABLED = fromString("enabled"); /** - * Static value disabled for PrivateEndpointNetworkPolicies. + * Disable apply network policies on private end point in the subnet. */ public static final PrivateEndpointNetworkPolicies DISABLED = fromString("disabled"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIPAddressVersion.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIPAddressVersion.java new file mode 100644 index 000000000000..0350439b78e6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIPAddressVersion.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. + */ +public final class PrivateIPAddressVersion extends ExpandableStringEnum { + /** + * The IP configuration's private IP is IPv4. + */ + public static final PrivateIPAddressVersion IPV4 = fromString("IPv4"); + + /** + * The IP configuration's private IP is IPv6. + */ + public static final PrivateIPAddressVersion IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of PrivateIPAddressVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateIPAddressVersion() { + } + + /** + * Creates or finds a PrivateIPAddressVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateIPAddressVersion. + */ + public static PrivateIPAddressVersion fromString(String name) { + return fromString(name, PrivateIPAddressVersion.class); + } + + /** + * Gets known PrivateIPAddressVersion values. + * + * @return known PrivateIPAddressVersion values. + */ + public static Collection values() { + return values(PrivateIPAddressVersion.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.java deleted file mode 100644 index b4fae427ab28..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateIpAddressVersion.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.servicefabricmanagedclusters.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. - */ -public final class PrivateIpAddressVersion extends ExpandableStringEnum { - /** - * Static value IPv4 for PrivateIpAddressVersion. - */ - public static final PrivateIpAddressVersion IPV4 = fromString("IPv4"); - - /** - * Static value IPv6 for PrivateIpAddressVersion. - */ - public static final PrivateIpAddressVersion IPV6 = fromString("IPv6"); - - /** - * Creates a new instance of PrivateIpAddressVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateIpAddressVersion() { - } - - /** - * Creates or finds a PrivateIpAddressVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateIpAddressVersion. - */ - public static PrivateIpAddressVersion fromString(String name) { - return fromString(name, PrivateIpAddressVersion.class); - } - - /** - * Gets known PrivateIpAddressVersion values. - * - * @return known PrivateIpAddressVersion values. - */ - public static Collection values() { - return values(PrivateIpAddressVersion.class); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java index 992c7ef7e85d..08e578a39ff8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PrivateLinkServiceNetworkPolicies.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class PrivateLinkServiceNetworkPolicies extends ExpandableStringEnum { /** - * Static value enabled for PrivateLinkServiceNetworkPolicies. + * Enable apply network policies on private link service in the subnet. */ public static final PrivateLinkServiceNetworkPolicies ENABLED = fromString("enabled"); /** - * Static value disabled for PrivateLinkServiceNetworkPolicies. + * Disable apply network policies on private link service in the subnet. */ public static final PrivateLinkServiceNetworkPolicies DISABLED = fromString("disabled"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java index 41ad08df4b4c..720f04cd08b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ProbeProtocol.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.servicefabricmanagedclusters.models; @@ -8,21 +8,21 @@ import java.util.Collection; /** - * the reference to the load balancer probe used by the load balancing rule. + * The reference to the load balancer probe used by the load balancing rule. */ public final class ProbeProtocol extends ExpandableStringEnum { /** - * Static value tcp for ProbeProtocol. + * Probe protocol is TCP. */ public static final ProbeProtocol TCP = fromString("tcp"); /** - * Static value http for ProbeProtocol. + * Probe protocol is HTTP. */ public static final ProbeProtocol HTTP = fromString("http"); /** - * Static value https for ProbeProtocol. + * Probe protocol is HTTPS. */ public static final ProbeProtocol HTTPS = fromString("https"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java index c0caef22e23a..d2b87a36a259 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Protocol.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class Protocol extends ExpandableStringEnum { /** - * Static value tcp for Protocol. + * Transport protocol is TCP. */ public static final Protocol TCP = fromString("tcp"); /** - * Static value udp for Protocol. + * Transport protocol is UDP. */ public static final Protocol UDP = fromString("udp"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIPAddressVersion.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIPAddressVersion.java new file mode 100644 index 000000000000..13251f7289f3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIPAddressVersion.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. + */ +public final class PublicIPAddressVersion extends ExpandableStringEnum { + /** + * The IP configuration's public IP is IPv4. + */ + public static final PublicIPAddressVersion IPV4 = fromString("IPv4"); + + /** + * The IP configuration's public IP is IPv6. + */ + public static final PublicIPAddressVersion IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of PublicIPAddressVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublicIPAddressVersion() { + } + + /** + * Creates or finds a PublicIPAddressVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicIPAddressVersion. + */ + public static PublicIPAddressVersion fromString(String name) { + return fromString(name, PublicIPAddressVersion.class); + } + + /** + * Gets known PublicIPAddressVersion values. + * + * @return known PublicIPAddressVersion values. + */ + public static Collection values() { + return values(PublicIPAddressVersion.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.java deleted file mode 100644 index c09d42cadd20..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/PublicIpAddressVersion.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.servicefabricmanagedclusters.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4. - */ -public final class PublicIpAddressVersion extends ExpandableStringEnum { - /** - * Static value IPv4 for PublicIpAddressVersion. - */ - public static final PublicIpAddressVersion IPV4 = fromString("IPv4"); - - /** - * Static value IPv6 for PublicIpAddressVersion. - */ - public static final PublicIpAddressVersion IPV6 = fromString("IPv6"); - - /** - * Creates a new instance of PublicIpAddressVersion value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicIpAddressVersion() { - } - - /** - * Creates or finds a PublicIpAddressVersion from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicIpAddressVersion. - */ - public static PublicIpAddressVersion fromString(String name) { - return fromString(name, PublicIpAddressVersion.class); - } - - /** - * Gets known PublicIpAddressVersion values. - * - * @return known PublicIpAddressVersion values. - */ - public static Collection values() { - return values(PublicIpAddressVersion.class); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java index cc87ced0c665..6f438d993f93 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ResourceAzStatus.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.servicefabricmanagedclusters.models; @@ -39,7 +39,7 @@ public final class ResourceAzStatus implements JsonSerializable { /** - * Static value Monitored for RollingUpgradeMode. + * The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. + * The value is 0. */ public static final RollingUpgradeMode MONITORED = fromString("Monitored"); /** - * Static value UnmonitoredAuto for RollingUpgradeMode. + * The upgrade will proceed automatically without performing any health monitoring. The value is 1. */ public static final RollingUpgradeMode UNMONITORED_AUTO = fromString("UnmonitoredAuto"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java index 16886abd17a1..0796879162a6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RollingUpgradeMonitoringPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java index 2e52563ded03..3f69adcf332d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/RuntimeResumeApplicationUpgradeParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java index 4f3bf7b32204..ceee4c18f1c8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingMechanism.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.servicefabricmanagedclusters.models; @@ -17,7 +17,7 @@ @Immutable public class ScalingMechanism implements JsonSerializable { /* - * Specifies the mechanism associated with this scaling policy. + * The kind property. */ private ServiceScalingMechanismKind kind = ServiceScalingMechanismKind.fromString("ScalingMechanism"); @@ -28,7 +28,7 @@ public ScalingMechanism() { } /** - * Get the kind property: Specifies the mechanism associated with this scaling policy. + * Get the kind property: The kind property. * * @return the kind value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java index a890ca6819e2..d81420f8eeb5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java index 2d1aa6ae447b..ce8d86399ec5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ScalingTrigger.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.servicefabricmanagedclusters.models; @@ -17,7 +17,7 @@ @Immutable public class ScalingTrigger implements JsonSerializable { /* - * Specifies the trigger associated with this scaling policy. + * The kind property. */ private ServiceScalingTriggerKind kind = ServiceScalingTriggerKind.fromString("ScalingTrigger"); @@ -28,7 +28,7 @@ public ScalingTrigger() { } /** - * Get the kind property: Specifies the trigger associated with this scaling policy. + * Get the kind property: The kind property. * * @return the kind value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java index 853e21923059..9295a338073d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SecurityType.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class SecurityType extends ExpandableStringEnum { /** - * Static value TrustedLaunch for SecurityType. + * Trusted Launch is a security type that secures generation 2 virtual machines. */ public static final SecurityType TRUSTED_LAUNCH = fromString("TrustedLaunch"); /** - * Static value Standard for SecurityType. + * Standard is the default security type for all machines. */ public static final SecurityType STANDARD = fromString("Standard"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java index ced73ebca742..c0406f22e29c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelation.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java index 98c611a58e13..edd91c173b62 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceCorrelationScheme.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.servicefabricmanagedclusters.models; @@ -12,12 +12,14 @@ */ public final class ServiceCorrelationScheme extends ExpandableStringEnum { /** - * Static value AlignedAffinity for ServiceCorrelationScheme. + * Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the + * same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0. */ public static final ServiceCorrelationScheme ALIGNED_AFFINITY = fromString("AlignedAffinity"); /** - * Static value NonAlignedAffinity for ServiceCorrelationScheme. + * Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike + * Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1. */ public static final ServiceCorrelationScheme NON_ALIGNED_AFFINITY = fromString("NonAlignedAffinity"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java index 68252418038b..ca0a3be499fd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceEndpoint.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java index c8038dfd51cb..c35d8da3644c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceKind.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class ServiceKind extends ExpandableStringEnum { /** - * Static value Stateless for ServiceKind. + * Does not use Service Fabric to make its state highly available or reliable. The value is 0. */ public static final ServiceKind STATELESS = fromString("Stateless"); /** - * Static value Stateful for ServiceKind. + * Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1. */ public static final ServiceKind STATEFUL = fromString("Stateful"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java index a9f1fdd21d85..54e837e8f657 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetric.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java index 2534b83c49d4..0c08d5762e4a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceLoadMetricWeight.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.servicefabricmanagedclusters.models; @@ -13,22 +13,22 @@ */ public final class ServiceLoadMetricWeight extends ExpandableStringEnum { /** - * Static value Zero for ServiceLoadMetricWeight. + * Disables resource balancing for this metric. This value is zero. */ public static final ServiceLoadMetricWeight ZERO = fromString("Zero"); /** - * Static value Low for ServiceLoadMetricWeight. + * Specifies the metric weight of the service load as Low. The value is 1. */ public static final ServiceLoadMetricWeight LOW = fromString("Low"); /** - * Static value Medium for ServiceLoadMetricWeight. + * Specifies the metric weight of the service load as Medium. The value is 2. */ public static final ServiceLoadMetricWeight MEDIUM = fromString("Medium"); /** - * Static value High for ServiceLoadMetricWeight. + * Specifies the metric weight of the service load as High. The value is 3. */ public static final ServiceLoadMetricWeight HIGH = fromString("High"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java index 77e11af19546..7a87965a0df7 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePackageActivationMode.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class ServicePackageActivationMode extends ExpandableStringEnum { /** - * Static value SharedProcess for ServicePackageActivationMode. + * Indicates the application package activation mode will use shared process. */ public static final ServicePackageActivationMode SHARED_PROCESS = fromString("SharedProcess"); /** - * Static value ExclusiveProcess for ServicePackageActivationMode. + * Indicates the application package activation mode will use exclusive process. */ public static final ServicePackageActivationMode EXCLUSIVE_PROCESS = fromString("ExclusiveProcess"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java index fb9d14068093..3040dc530bfb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementInvalidDomainPolicy.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.servicefabricmanagedclusters.models; @@ -18,7 +18,7 @@ @Fluent public final class ServicePlacementInvalidDomainPolicy extends ServicePlacementPolicy { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.INVALID_DOMAIN; @@ -34,8 +34,7 @@ public ServicePlacementInvalidDomainPolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java index 15f11683ea50..4c6a804e3b1e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementNonPartiallyPlaceServicePolicy.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.servicefabricmanagedclusters.models; @@ -11,12 +11,12 @@ import java.io.IOException; /** - * ServicePlacementNonPartiallyPlaceServicePolicy. + * The type of placement policy for a service fabric service. Following are the possible values. */ @Immutable public final class ServicePlacementNonPartiallyPlaceServicePolicy extends ServicePlacementPolicy { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.NON_PARTIALLY_PLACE_SERVICE; @@ -27,8 +27,7 @@ public ServicePlacementNonPartiallyPlaceServicePolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java index ea255f9294b5..dbbbeb78dd50 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicy.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.servicefabricmanagedclusters.models; @@ -17,7 +17,7 @@ @Immutable public class ServicePlacementPolicy implements JsonSerializable { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.fromString("ServicePlacementPolicy"); @@ -28,8 +28,7 @@ public ServicePlacementPolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ @@ -81,14 +80,14 @@ public static ServicePlacementPolicy fromJson(JsonReader jsonReader) throws IOEx // Use the discriminator value to determine which subtype should be deserialized. if ("InvalidDomain".equals(discriminatorValue)) { return ServicePlacementInvalidDomainPolicy.fromJson(readerToUse.reset()); - } else if ("NonPartiallyPlaceService".equals(discriminatorValue)) { - return ServicePlacementNonPartiallyPlaceServicePolicy.fromJson(readerToUse.reset()); - } else if ("PreferredPrimaryDomain".equals(discriminatorValue)) { - return ServicePlacementPreferPrimaryDomainPolicy.fromJson(readerToUse.reset()); } else if ("RequiredDomain".equals(discriminatorValue)) { return ServicePlacementRequiredDomainPolicy.fromJson(readerToUse.reset()); + } else if ("PreferredPrimaryDomain".equals(discriminatorValue)) { + return ServicePlacementPreferPrimaryDomainPolicy.fromJson(readerToUse.reset()); } else if ("RequiredDomainDistribution".equals(discriminatorValue)) { return ServicePlacementRequireDomainDistributionPolicy.fromJson(readerToUse.reset()); + } else if ("NonPartiallyPlaceService".equals(discriminatorValue)) { + return ServicePlacementNonPartiallyPlaceServicePolicy.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java index f416ad9cc8fc..aae23b6a0d27 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPolicyType.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.servicefabricmanagedclusters.models; @@ -12,28 +12,38 @@ */ public final class ServicePlacementPolicyType extends ExpandableStringEnum { /** - * Static value InvalidDomain for ServicePlacementPolicyType. + * Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, + * which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value + * is 0. */ public static final ServicePlacementPolicyType INVALID_DOMAIN = fromString("InvalidDomain"); /** - * Static value RequiredDomain for ServicePlacementPolicyType. + * Indicates that the ServicePlacementPolicyDescription is of type + * ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be + * placed in a specific domain. The value is 1. */ public static final ServicePlacementPolicyType REQUIRED_DOMAIN = fromString("RequiredDomain"); /** - * Static value PreferredPrimaryDomain for ServicePlacementPolicyType. + * Indicates that the ServicePlacementPolicyDescription is of type + * ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for + * the partitions of the service should be located in a particular domain as an optimization. The value is 2. */ public static final ServicePlacementPolicyType PREFERRED_PRIMARY_DOMAIN = fromString("PreferredPrimaryDomain"); /** - * Static value RequiredDomainDistribution for ServicePlacementPolicyType. + * Indicates that the ServicePlacementPolicyDescription is of type + * ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of + * any two replicas from the same partition in the same domain at any time. The value is 3. */ public static final ServicePlacementPolicyType REQUIRED_DOMAIN_DISTRIBUTION = fromString("RequiredDomainDistribution"); /** - * Static value NonPartiallyPlaceService for ServicePlacementPolicyType. + * Indicates that the ServicePlacementPolicyDescription is of type + * ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a + * particular partition of the service should be placed atomically. The value is 4. */ public static final ServicePlacementPolicyType NON_PARTIALLY_PLACE_SERVICE = fromString("NonPartiallyPlaceService"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java index b65850479496..ae19bab19329 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementPreferPrimaryDomainPolicy.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.servicefabricmanagedclusters.models; @@ -24,7 +24,7 @@ @Fluent public final class ServicePlacementPreferPrimaryDomainPolicy extends ServicePlacementPolicy { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.PREFERRED_PRIMARY_DOMAIN; @@ -40,8 +40,7 @@ public ServicePlacementPreferPrimaryDomainPolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java index d5000ee20371..aeeb07aa0e48 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequireDomainDistributionPolicy.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.servicefabricmanagedclusters.models; @@ -25,7 +25,7 @@ @Fluent public final class ServicePlacementRequireDomainDistributionPolicy extends ServicePlacementPolicy { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.REQUIRED_DOMAIN_DISTRIBUTION; @@ -41,8 +41,7 @@ public ServicePlacementRequireDomainDistributionPolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java index 08140ea10256..d54b76982e5e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServicePlacementRequiredDomainPolicy.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.servicefabricmanagedclusters.models; @@ -18,7 +18,7 @@ @Fluent public final class ServicePlacementRequiredDomainPolicy extends ServicePlacementPolicy { /* - * The type of placement policy for a service fabric service. Following are the possible values. + * The type property. */ private ServicePlacementPolicyType type = ServicePlacementPolicyType.REQUIRED_DOMAIN; @@ -34,8 +34,7 @@ public ServicePlacementRequiredDomainPolicy() { } /** - * Get the type property: The type of placement policy for a service fabric service. Following are the possible - * values. + * Get the type property: The type property. * * @return the type value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java index 5aa514634dd2..15ee9e179cea 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResource.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.servicefabricmanagedclusters.models; @@ -43,21 +43,21 @@ public interface ServiceResource { ServiceResourceProperties properties(); /** - * Gets the location property: Resource location depends on the parent resource. + * Gets the tags property: Resource tags. * - * @return the location value. + * @return the tags value. */ - String location(); + Map tags(); /** - * Gets the tags property: Azure resource tags. + * Gets the location property: The geo-location where the resource lives. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -115,7 +115,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, clusterName, applicationName. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @return the next definition stage. @@ -152,7 +152,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -160,7 +160,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Resource location depends on the parent resource. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -171,9 +171,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Azure resource tags.. + * Specifies the tags property: Resource tags.. * - * @param tags Azure resource tags. + * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java index 329502166279..d9fd02984671 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourceProperties.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java index d0bafb52594f..c31b88a73b81 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceResourcePropertiesBase.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java index d9a788e6f44e..bead70780ba2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingMechanismKind.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.servicefabricmanagedclusters.models; @@ -12,13 +12,13 @@ */ public final class ServiceScalingMechanismKind extends ExpandableStringEnum { /** - * Static value ScalePartitionInstanceCount for ServiceScalingMechanismKind. + * Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0. */ public static final ServiceScalingMechanismKind SCALE_PARTITION_INSTANCE_COUNT = fromString("ScalePartitionInstanceCount"); /** - * Static value AddRemoveIncrementalNamedPartition for ServiceScalingMechanismKind. + * Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1. */ public static final ServiceScalingMechanismKind ADD_REMOVE_INCREMENTAL_NAMED_PARTITION = fromString("AddRemoveIncrementalNamedPartition"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java index cd87d01d01e0..b01634bad72c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceScalingTriggerKind.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.servicefabricmanagedclusters.models; @@ -12,13 +12,13 @@ */ public final class ServiceScalingTriggerKind extends ExpandableStringEnum { /** - * Static value AveragePartitionLoadTrigger for ServiceScalingTriggerKind. + * Represents a scaling trigger related to an average load of a metric/resource of a partition. The value is 0. */ public static final ServiceScalingTriggerKind AVERAGE_PARTITION_LOAD_TRIGGER = fromString("AveragePartitionLoadTrigger"); /** - * Static value AverageServiceLoadTrigger for ServiceScalingTriggerKind. + * Represents a scaling policy related to an average load of a metric/resource of a service. The value is 1. */ public static final ServiceScalingTriggerKind AVERAGE_SERVICE_LOAD_TRIGGER = fromString("AverageServiceLoadTrigger"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java index 14a53b1d2071..08e5348a510c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceTypeHealthPolicy.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java index 60851294e1ab..78341a622795 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ServiceUpdateParameters.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java index f2ee0b682b87..525801838065 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Services.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.servicefabricmanagedclusters.models; @@ -13,12 +13,10 @@ */ public interface Services { /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -33,12 +31,10 @@ Response getWithResponse(String resourceGroupName, String clust String serviceName, Context context); /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -51,11 +47,9 @@ Response getWithResponse(String resourceGroupName, String clust ServiceResource get(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -66,11 +60,9 @@ Response getWithResponse(String resourceGroupName, String clust void delete(String resourceGroupName, String clusterName, String applicationName, String serviceName); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}. @@ -83,12 +75,10 @@ void delete(String resourceGroupName, String clusterName, String applicationName Context context); /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,12 +91,10 @@ PagedIterable listByApplications(String resourceGroupName, Stri String applicationName); /** - * Gets the list of service resources created in the specified Service Fabric managed application resource. - * * Gets all service resources created or in the process of being created in the Service Fabric managed application * resource. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the cluster resource. * @param applicationName The name of the application resource. * @param context The context to associate with this operation. @@ -120,8 +108,6 @@ PagedIterable listByApplications(String resourceGroupName, Stri String applicationName, Context context); /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * @@ -135,8 +121,6 @@ PagedIterable listByApplications(String resourceGroupName, Stri ServiceResource getById(String id); /** - * Gets a Service Fabric managed service resource. - * * Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed * application resource. * @@ -151,8 +135,6 @@ PagedIterable listByApplications(String resourceGroupName, Stri Response getByIdWithResponse(String id, Context context); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * * @param id the resource ID. @@ -163,8 +145,6 @@ PagedIterable listByApplications(String resourceGroupName, Stri void deleteById(String id); /** - * Deletes a Service Fabric managed service resource. - * * Delete a Service Fabric managed service resource with the specified name. * * @param id the resource ID. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java index 48fd3866b05f..bac8003f71bd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsParameterDescription.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java index 0fdb54a1941a..7c6536733cf1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SettingsSectionDescription.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java new file mode 100644 index 000000000000..63f1c0b87588 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SfmcOperationStatus.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Sfmc operation status. + */ +public final class SfmcOperationStatus extends ExpandableStringEnum { + /** + * Operation created. + */ + public static final SfmcOperationStatus CREATED = fromString("Created"); + + /** + * Operation started. + */ + public static final SfmcOperationStatus STARTED = fromString("Started"); + + /** + * Operation succeeded. + */ + public static final SfmcOperationStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Operation failed. + */ + public static final SfmcOperationStatus FAILED = fromString("Failed"); + + /** + * Operation aborted. + */ + public static final SfmcOperationStatus ABORTED = fromString("Aborted"); + + /** + * Operation canceled. + */ + public static final SfmcOperationStatus CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of SfmcOperationStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SfmcOperationStatus() { + } + + /** + * Creates or finds a SfmcOperationStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SfmcOperationStatus. + */ + public static SfmcOperationStatus fromString(String name) { + return fromString(name, SfmcOperationStatus.class); + } + + /** + * Gets known SfmcOperationStatus values. + * + * @return known SfmcOperationStatus values. + */ + public static Collection values() { + return values(SfmcOperationStatus.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java index bfbcbf44fd06..33e9032f82a1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SingletonPartitionScheme.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.servicefabricmanagedclusters.models; @@ -11,12 +11,12 @@ import java.io.IOException; /** - * SingletonPartitionScheme. + * Describes the partition scheme of a singleton-partitioned, or non-partitioned service. */ @Immutable public final class SingletonPartitionScheme extends Partition { /* - * Specifies how the service is partitioned. + * The partitionScheme property. */ private PartitionScheme partitionScheme = PartitionScheme.SINGLETON; @@ -27,7 +27,7 @@ public SingletonPartitionScheme() { } /** - * Get the partitionScheme property: Specifies how the service is partitioned. + * Get the partitionScheme property: The partitionScheme property. * * @return the partitionScheme value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java index eb28c246c81e..367386d7d4f0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Sku.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java index 601cd7977e4d..032bf73d3779 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/SkuName.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class SkuName extends ExpandableStringEnum { /** - * Static value Basic for SkuName. + * Basic requires a minimum of 3 nodes and allows only 1 node type. */ public static final SkuName BASIC = fromString("Basic"); /** - * Static value Standard for SkuName. + * Requires a minimum of 5 nodes and allows 1 or more node type. */ public static final SkuName STANDARD = fromString("Standard"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java index a0bf6e513e4b..86393c916913 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatefulServiceProperties.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java index 61edf3a80d28..b94b8aadcfdd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/StatelessServiceProperties.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java index b6c80961c1cd..f27faf2647fa 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/Subnet.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java index ae16a5067cf5..f136f41dee3c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UniformInt64RangePartitionScheme.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.servicefabricmanagedclusters.models; @@ -16,7 +16,7 @@ @Fluent public final class UniformInt64RangePartitionScheme extends Partition { /* - * Specifies how the service is partitioned. + * The partitionScheme property. */ private PartitionScheme partitionScheme = PartitionScheme.UNIFORM_INT64RANGE; @@ -44,7 +44,7 @@ public UniformInt64RangePartitionScheme() { } /** - * Get the partitionScheme property: Specifies how the service is partitioned. + * Get the partitionScheme property: The partitionScheme property. * * @return the partitionScheme value. */ diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java index 4969ed81ce6d..53de111550ea 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UpdateType.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class UpdateType extends ExpandableStringEnum { /** - * Static value Default for UpdateType. + * The operation will proceed in all specified nodes at the same time. */ public static final UpdateType DEFAULT = fromString("Default"); /** - * Static value ByUpgradeDomain for UpdateType. + * The operation will proceed one upgrade domain at a time, checking the health in between each to continue. */ public static final UpdateType BY_UPGRADE_DOMAIN = fromString("ByUpgradeDomain"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java index 2dbbd648125d..6afcb1b54ad2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/UserAssignedIdentity.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The UserAssignedIdentity model. + * User assigned identity. */ @Immutable public final class UserAssignedIdentity implements JsonSerializable { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtension.java similarity index 78% rename from sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java rename to sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtension.java index 267754ed9e3c..960c4ebdbdc9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtension.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtension.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.servicefabricmanagedclusters.models; @@ -10,7 +10,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VmssExtensionProperties; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties; import java.io.IOException; import java.util.List; @@ -18,7 +18,7 @@ * Specifies set of extensions that should be installed onto the virtual machines. */ @Fluent -public final class VmssExtension implements JsonSerializable { +public final class VMSSExtension implements JsonSerializable { /* * The name of the extension. */ @@ -27,12 +27,12 @@ public final class VmssExtension implements JsonSerializable { /* * Describes the properties of a Virtual Machine Scale Set Extension. */ - private VmssExtensionProperties innerProperties = new VmssExtensionProperties(); + private VMSSExtensionProperties innerProperties = new VMSSExtensionProperties(); /** - * Creates an instance of VmssExtension class. + * Creates an instance of VMSSExtension class. */ - public VmssExtension() { + public VMSSExtension() { } /** @@ -48,9 +48,9 @@ public String name() { * Set the name property: The name of the extension. * * @param name the name value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withName(String name) { + public VMSSExtension withName(String name) { this.name = name; return this; } @@ -60,7 +60,7 @@ public VmssExtension withName(String name) { * * @return the innerProperties value. */ - private VmssExtensionProperties innerProperties() { + private VMSSExtensionProperties innerProperties() { return this.innerProperties; } @@ -77,11 +77,11 @@ public String publisher() { * Set the publisher property: The name of the extension handler publisher. * * @param publisher the publisher value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withPublisher(String publisher) { + public VMSSExtension withPublisher(String publisher) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withPublisher(publisher); return this; @@ -100,11 +100,11 @@ public String type() { * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". * * @param type the type value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withType(String type) { + public VMSSExtension withType(String type) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withType(type); return this; @@ -123,11 +123,11 @@ public String typeHandlerVersion() { * Set the typeHandlerVersion property: Specifies the version of the script handler. * * @param typeHandlerVersion the typeHandlerVersion value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withTypeHandlerVersion(String typeHandlerVersion) { + public VMSSExtension withTypeHandlerVersion(String typeHandlerVersion) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withTypeHandlerVersion(typeHandlerVersion); return this; @@ -150,11 +150,11 @@ public Boolean autoUpgradeMinorVersion() { * redeployed, even with this property set to true. * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + public VMSSExtension withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); return this; @@ -165,7 +165,7 @@ public VmssExtension withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion * * @return the settings value. */ - public Object settings() { + public VMSSExtensionPropertiesSettings settings() { return this.innerProperties() == null ? null : this.innerProperties().settings(); } @@ -173,11 +173,11 @@ public Object settings() { * Set the settings property: Json formatted public settings for the extension. * * @param settings the settings value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withSettings(Object settings) { + public VMSSExtension withSettings(VMSSExtensionPropertiesSettings settings) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withSettings(settings); return this; @@ -189,7 +189,7 @@ public VmssExtension withSettings(Object settings) { * * @return the protectedSettings value. */ - public Object protectedSettings() { + public VMSSExtensionPropertiesProtectedSettings protectedSettings() { return this.innerProperties() == null ? null : this.innerProperties().protectedSettings(); } @@ -198,11 +198,11 @@ public Object protectedSettings() { * protectedSettingsFromKeyVault or no protected settings at all. * * @param protectedSettings the protectedSettings value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withProtectedSettings(Object protectedSettings) { + public VMSSExtension withProtectedSettings(VMSSExtensionPropertiesProtectedSettings protectedSettings) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withProtectedSettings(protectedSettings); return this; @@ -223,11 +223,11 @@ public String forceUpdateTag() { * handler will be forced to update even if the extension configuration has not changed. * * @param forceUpdateTag the forceUpdateTag value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withForceUpdateTag(String forceUpdateTag) { + public VMSSExtension withForceUpdateTag(String forceUpdateTag) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withForceUpdateTag(forceUpdateTag); return this; @@ -248,11 +248,11 @@ public List provisionAfterExtensions() { * provisioned. * * @param provisionAfterExtensions the provisionAfterExtensions value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withProvisionAfterExtensions(List provisionAfterExtensions) { + public VMSSExtension withProvisionAfterExtensions(List provisionAfterExtensions) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withProvisionAfterExtensions(provisionAfterExtensions); return this; @@ -282,11 +282,11 @@ public Boolean enableAutomaticUpgrade() { * platform if there is a newer version of the extension available. * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + public VMSSExtension withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withEnableAutomaticUpgrade(enableAutomaticUpgrade); return this; @@ -305,11 +305,11 @@ public List setupOrder() { * Set the setupOrder property: Indicates the setup order for the extension. * * @param setupOrder the setupOrder value to set. - * @return the VmssExtension object itself. + * @return the VMSSExtension object itself. */ - public VmssExtension withSetupOrder(List setupOrder) { + public VMSSExtension withSetupOrder(List setupOrder) { if (this.innerProperties() == null) { - this.innerProperties = new VmssExtensionProperties(); + this.innerProperties = new VMSSExtensionProperties(); } this.innerProperties().withSetupOrder(setupOrder); return this; @@ -323,17 +323,17 @@ public VmssExtension withSetupOrder(List setupOrder) { public void validate() { if (name() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model VmssExtension")); + .log(new IllegalArgumentException("Missing required property name in model VMSSExtension")); } if (innerProperties() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model VmssExtension")); + .log(new IllegalArgumentException("Missing required property innerProperties in model VMSSExtension")); } else { innerProperties().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(VmssExtension.class); + private static final ClientLogger LOGGER = new ClientLogger(VMSSExtension.class); /** * {@inheritDoc} @@ -347,31 +347,31 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of VmssExtension from the JsonReader. + * Reads an instance of VMSSExtension from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of VmssExtension if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of VMSSExtension 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 VmssExtension. + * @throws IOException If an error occurs while reading the VMSSExtension. */ - public static VmssExtension fromJson(JsonReader jsonReader) throws IOException { + public static VMSSExtension fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - VmssExtension deserializedVmssExtension = new VmssExtension(); + VMSSExtension deserializedVMSSExtension = new VMSSExtension(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("name".equals(fieldName)) { - deserializedVmssExtension.name = reader.getString(); + deserializedVMSSExtension.name = reader.getString(); } else if ("properties".equals(fieldName)) { - deserializedVmssExtension.innerProperties = VmssExtensionProperties.fromJson(reader); + deserializedVMSSExtension.innerProperties = VMSSExtensionProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedVmssExtension; + return deserializedVMSSExtension; }); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesProtectedSettings.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesProtectedSettings.java new file mode 100644 index 000000000000..2eaf96dbf3ca --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesProtectedSettings.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The VMSSExtensionPropertiesProtectedSettings model. + */ +@Immutable +public final class VMSSExtensionPropertiesProtectedSettings + implements JsonSerializable { + /** + * Creates an instance of VMSSExtensionPropertiesProtectedSettings class. + */ + public VMSSExtensionPropertiesProtectedSettings() { + } + + /** + * 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 VMSSExtensionPropertiesProtectedSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMSSExtensionPropertiesProtectedSettings 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 VMSSExtensionPropertiesProtectedSettings. + */ + public static VMSSExtensionPropertiesProtectedSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMSSExtensionPropertiesProtectedSettings deserializedVMSSExtensionPropertiesProtectedSettings + = new VMSSExtensionPropertiesProtectedSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedVMSSExtensionPropertiesProtectedSettings; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesSettings.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesSettings.java new file mode 100644 index 000000000000..c1998d23e0b8 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSSExtensionPropertiesSettings.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The VMSSExtensionPropertiesSettings model. + */ +@Immutable +public final class VMSSExtensionPropertiesSettings implements JsonSerializable { + /** + * Creates an instance of VMSSExtensionPropertiesSettings class. + */ + public VMSSExtensionPropertiesSettings() { + } + + /** + * 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 VMSSExtensionPropertiesSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMSSExtensionPropertiesSettings 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 VMSSExtensionPropertiesSettings. + */ + public static VMSSExtensionPropertiesSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMSSExtensionPropertiesSettings deserializedVMSSExtensionPropertiesSettings + = new VMSSExtensionPropertiesSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedVMSSExtensionPropertiesSettings; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java index 66936955e413..1afac441b84f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VMSize.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.servicefabricmanagedclusters.models; @@ -24,7 +24,7 @@ public final class VMSize implements JsonSerializable { /** * Creates an instance of VMSize class. */ - public VMSize() { + private VMSize() { } /** diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java index 05ab48b21c8f..984e83c79022 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultCertificate.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.servicefabricmanagedclusters.models; @@ -20,17 +20,15 @@ public final class VaultCertificate implements JsonSerializable
{
- * "data":"",
"dataType":"pfx",
"password":""
} + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). */ private String certificateUrl; /* * For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. - * The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate - * file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 - * certificate file and .prv for private key. Both of these files are .pem formatted. + * The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is + * placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 + * certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. */ private String certificateStore; @@ -43,10 +41,7 @@ public VaultCertificate() { /** * Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: - * <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> - * "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). * * @return the certificateUrl value. */ @@ -57,10 +52,7 @@ public String certificateUrl() { /** * Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a * secret. For adding a secret to the Key Vault, see [Add a key or secret to the key - * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate - * needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: - * <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> - * "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>}. + * vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). * * @param certificateUrl the certificateUrl value to set. * @return the VaultCertificate object itself. @@ -73,9 +65,9 @@ public VaultCertificate withCertificateUrl(String certificateUrl) { /** * Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. - * <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the - * file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for - * private key. Both of these files are .pem formatted. + * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name + * {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of + * these files are .pem formatted. * * @return the certificateStore value. */ @@ -86,9 +78,9 @@ public String certificateStore() { /** * Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to * which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. - * <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the - * file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for - * private key. Both of these files are .pem formatted. + * For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name + * {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of + * these files are .pem formatted. * * @param certificateStore the certificateStore value to set. * @return the VaultCertificate object itself. diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java index 6b7f403a3974..3d69c0e45000 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VaultSecretGroup.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java new file mode 100644 index 000000000000..7ed3325881d0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmApplication.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies the gallery application that should be made available to the underlying VMSS. + */ +@Fluent +public final class VmApplication implements JsonSerializable { + /* + * Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if + * provided. + */ + private String configurationReference; + + /* + * If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated + * for the underlying VMSS. + */ + private Boolean enableAutomaticUpgrade; + + /* + * Optional, Specifies the order in which the packages have to be installed. + */ + private Integer order; + + /* + * Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ + * galleryName}/applications/{application}/versions/{version}. + */ + private String packageReferenceId; + + /* + * Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. + * '{"Tag1":"Value1","Tag2":"Value2"}'. + */ + private String vmGalleryTags; + + /* + * Optional, If true, any failure for any operation in the VmApplication will fail the deployment. + */ + private Boolean treatFailureAsDeploymentFailure; + + /** + * Creates an instance of VmApplication class. + */ + public VmApplication() { + } + + /** + * Get the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the + * default configuration for the package if provided. + * + * @return the configurationReference value. + */ + public String configurationReference() { + return this.configurationReference; + } + + /** + * Set the configurationReference property: Optional, Specifies the uri to an azure blob that will replace the + * default configuration for the package if provided. + * + * @param configurationReference the configurationReference value to set. + * @return the VmApplication object itself. + */ + public VmApplication withConfigurationReference(String configurationReference) { + this.configurationReference = configurationReference; + return this; + } + + /** + * Get the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in + * PIR/SIG, it will be automatically updated for the underlying VMSS. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: If set to true, when a new Gallery Application version is available in + * PIR/SIG, it will be automatically updated for the underlying VMSS. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the VmApplication object itself. + */ + public VmApplication withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + + /** + * Get the order property: Optional, Specifies the order in which the packages have to be installed. + * + * @return the order value. + */ + public Integer order() { + return this.order; + } + + /** + * Set the order property: Optional, Specifies the order in which the packages have to be installed. + * + * @param order the order value to set. + * @return the VmApplication object itself. + */ + public VmApplication withOrder(Integer order) { + this.order = order; + return this; + } + + /** + * Get the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + * + * @return the packageReferenceId value. + */ + public String packageReferenceId() { + return this.packageReferenceId; + } + + /** + * Set the packageReferenceId property: Specifies the GalleryApplicationVersion resource id on the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + * + * @param packageReferenceId the packageReferenceId value to set. + * @return the VmApplication object itself. + */ + public VmApplication withPackageReferenceId(String packageReferenceId) { + this.packageReferenceId = packageReferenceId; + return this; + } + + /** + * Get the vmGalleryTags property: Optional, Specifies a passthrough value for more generic context. Accepts a + * JSON-formatted string e.g. '{"Tag1":"Value1","Tag2":"Value2"}'. + * + * @return the vmGalleryTags value. + */ + public String vmGalleryTags() { + return this.vmGalleryTags; + } + + /** + * Set the vmGalleryTags property: Optional, Specifies a passthrough value for more generic context. Accepts a + * JSON-formatted string e.g. '{"Tag1":"Value1","Tag2":"Value2"}'. + * + * @param vmGalleryTags the vmGalleryTags value to set. + * @return the VmApplication object itself. + */ + public VmApplication withVmGalleryTags(String vmGalleryTags) { + this.vmGalleryTags = vmGalleryTags; + return this; + } + + /** + * Get the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the + * VmApplication will fail the deployment. + * + * @return the treatFailureAsDeploymentFailure value. + */ + public Boolean treatFailureAsDeploymentFailure() { + return this.treatFailureAsDeploymentFailure; + } + + /** + * Set the treatFailureAsDeploymentFailure property: Optional, If true, any failure for any operation in the + * VmApplication will fail the deployment. + * + * @param treatFailureAsDeploymentFailure the treatFailureAsDeploymentFailure value to set. + * @return the VmApplication object itself. + */ + public VmApplication withTreatFailureAsDeploymentFailure(Boolean treatFailureAsDeploymentFailure) { + this.treatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageReferenceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property packageReferenceId in model VmApplication")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmApplication.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("packageReferenceId", this.packageReferenceId); + jsonWriter.writeStringField("configurationReference", this.configurationReference); + jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); + jsonWriter.writeNumberField("order", this.order); + jsonWriter.writeStringField("vmGalleryTags", this.vmGalleryTags); + jsonWriter.writeBooleanField("treatFailureAsDeploymentFailure", this.treatFailureAsDeploymentFailure); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmApplication from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmApplication 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 VmApplication. + */ + public static VmApplication fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmApplication deserializedVmApplication = new VmApplication(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("packageReferenceId".equals(fieldName)) { + deserializedVmApplication.packageReferenceId = reader.getString(); + } else if ("configurationReference".equals(fieldName)) { + deserializedVmApplication.configurationReference = reader.getString(); + } else if ("enableAutomaticUpgrade".equals(fieldName)) { + deserializedVmApplication.enableAutomaticUpgrade = reader.getNullable(JsonReader::getBoolean); + } else if ("order".equals(fieldName)) { + deserializedVmApplication.order = reader.getNullable(JsonReader::getInt); + } else if ("vmGalleryTags".equals(fieldName)) { + deserializedVmApplication.vmGalleryTags = reader.getString(); + } else if ("treatFailureAsDeploymentFailure".equals(fieldName)) { + deserializedVmApplication.treatFailureAsDeploymentFailure + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedVmApplication; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java index 6c2bd738e638..2208d714fada 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmImagePlan.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.servicefabricmanagedclusters.models; @@ -15,7 +15,7 @@ * Specifies information about the marketplace image used to create the virtual machine. This element is only used for * marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic * use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy - * programmatically, Get Started ->. Enter any required information and then click Save. + * programmatically, Get Started. Enter any required information and then click Save. */ @Fluent public final class VmImagePlan implements JsonSerializable { diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java index 36088a7ab19f..cfbc234b1005 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmManagedIdentity.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java index 4a5fce0529b6..53c8158e1487 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmSetupAction.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.servicefabricmanagedclusters.models; @@ -12,12 +12,12 @@ */ public final class VmSetupAction extends ExpandableStringEnum { /** - * Static value EnableContainers for VmSetupAction. + * Enable windows containers feature. */ public static final VmSetupAction ENABLE_CONTAINERS = fromString("EnableContainers"); /** - * Static value EnableHyperV for VmSetupAction. + * Enables windows HyperV feature. */ public static final VmSetupAction ENABLE_HYPERV = fromString("EnableHyperV"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java index 27da6690cf2e..6eeb1402c3ad 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssDataDisk.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.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java index fb19a9f9ff4e..03c0bc4ac85f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/VmssExtensionSetupOrder.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.servicefabricmanagedclusters.models; @@ -12,7 +12,7 @@ */ public final class VmssExtensionSetupOrder extends ExpandableStringEnum { /** - * Static value BeforeSFRuntime for VmssExtensionSetupOrder. + * Indicates that the vm extension should run before the service fabric runtime starts. */ public static final VmssExtensionSetupOrder BEFORE_SFRUNTIME = fromString("BeforeSFRuntime"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java index 0a4cc3fb4fce..afe807ae92ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZonalUpdateMode.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.servicefabricmanagedclusters.models; @@ -12,12 +12,13 @@ */ public final class ZonalUpdateMode extends ExpandableStringEnum { /** - * Static value Standard for ZonalUpdateMode. + * The cluster will use 5 upgrade domains for Cross Az Node types. */ public static final ZonalUpdateMode STANDARD = fromString("Standard"); /** - * Static value Fast for ZonalUpdateMode. + * The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster + * deployments. */ public static final ZonalUpdateMode FAST = fromString("Fast"); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java new file mode 100644 index 000000000000..c916047459c8 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/ZoneFaultSimulationContent.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Parameters for Zone Fault Simulation action. + */ +@Fluent +public final class ZoneFaultSimulationContent extends FaultSimulationContent { + /* + * The kind of fault to be simulated. + */ + private FaultKind faultKind = FaultKind.ZONE; + + /* + * Indicates the zones of the fault simulation. + */ + private List zones; + + /** + * Creates an instance of ZoneFaultSimulationContent class. + */ + public ZoneFaultSimulationContent() { + } + + /** + * Get the faultKind property: The kind of fault to be simulated. + * + * @return the faultKind value. + */ + @Override + public FaultKind faultKind() { + return this.faultKind; + } + + /** + * Get the zones property: Indicates the zones of the fault simulation. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: Indicates the zones of the fault simulation. + * + * @param zones the zones value to set. + * @return the ZoneFaultSimulationContent object itself. + */ + public ZoneFaultSimulationContent withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ZoneFaultSimulationContent withForce(Boolean force) { + super.withForce(force); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ZoneFaultSimulationContent withConstraints(FaultSimulationConstraints constraints) { + super.withConstraints(constraints); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (constraints() != null) { + constraints().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("force", force()); + jsonWriter.writeJsonField("constraints", constraints()); + jsonWriter.writeStringField("faultKind", this.faultKind == null ? null : this.faultKind.toString()); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ZoneFaultSimulationContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ZoneFaultSimulationContent 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 ZoneFaultSimulationContent. + */ + public static ZoneFaultSimulationContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ZoneFaultSimulationContent deserializedZoneFaultSimulationContent = new ZoneFaultSimulationContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("force".equals(fieldName)) { + deserializedZoneFaultSimulationContent.withForce(reader.getNullable(JsonReader::getBoolean)); + } else if ("constraints".equals(fieldName)) { + deserializedZoneFaultSimulationContent.withConstraints(FaultSimulationConstraints.fromJson(reader)); + } else if ("faultKind".equals(fieldName)) { + deserializedZoneFaultSimulationContent.faultKind = FaultKind.fromString(reader.getString()); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedZoneFaultSimulationContent.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedZoneFaultSimulationContent; + }); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java index 5b24dd2db993..70bbb2af5c0e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/models/package-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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 ServiceFabricManagedClustersMgmtClient. + * Package containing the data models for ServiceFabric. * Service Fabric Managed Clusters Management Client. */ package com.azure.resourcemanager.servicefabricmanagedclusters.models; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java index 72083c778dd7..dfb193d60857 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/package-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/com/azure/resourcemanager/servicefabricmanagedclusters/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 ServiceFabricManagedClustersMgmtClient. + * Package containing the classes for ServiceFabric. * Service Fabric Managed Clusters Management Client. */ package com.azure.resourcemanager.servicefabricmanagedclusters; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/module-info.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/module-info.java index 312fd6a5f20e..3648c332d0a5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/java/module-info.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/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.servicefabricmanagedclusters { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models to com.azure.core; opens com.azure.resourcemanager.servicefabricmanagedclusters.models to com.azure.core; + opens com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models to com.azure.core; } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/azure-resourcemanager-servicefabricmanagedclusters.properties b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/azure-resourcemanager-servicefabricmanagedclusters.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/main/resources/azure-resourcemanager-servicefabricmanagedclusters.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java index 9d86e469c5e7..2969850165ef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json */ /** * Sample code: Put an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .define("1.0") .withExistingApplicationType("resRg", "myCluster", "myAppType") diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java index 615ddab8c5bc..fe8114d5b692 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ /** * Sample code: Delete an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .delete("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java index f4341091d354..85fd0926624a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypeVersionsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json */ /** * Sample code: Get an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .getWithResponse("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesSa.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesSa.java index 3c783eb455bf..97999acc2ea1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesSa.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationTypesSa.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypeVersionsListByApplicationTypesSa { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json */ /** * Sample code: Get a list of application type version resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAListOfApplicationTypeVersionResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypeVersions() .listByApplicationTypes("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java index 52e7aa49964e..584b98784c53 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class ApplicationTypeVersionsUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json */ /** * Sample code: Patch an application type version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAnApplicationTypeVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ApplicationTypeVersionResource resource = manager.applicationTypeVersions() .getWithResponse("resRg", "myCluster", "myAppType", "1.0", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java index fd0f3de99f80..499059cab85a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -9,20 +9,18 @@ */ public final class ApplicationTypesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json */ /** * Sample code: Put an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypes() .define("myAppType") - .withExistingManagedcluster("resRg", "myCluster") + .withExistingManagedCluster("resRg", "myCluster") .withRegion("eastus") .create(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java index 2a57874b15a8..40876befcdb0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json */ /** * Sample code: Delete an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypes().delete("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java index 204664788151..6c8e6ecd98d1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json */ /** * Sample code: Get an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypes().getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java index a8f621c7ecea..c5074e786b5b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationTypesListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json */ /** * Sample code: Get a list of application type name resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAListOfApplicationTypeNameResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applicationTypes().list("resRg", "myCluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java index 4d4ad03799d9..12c08a5c253b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class ApplicationTypesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json */ /** * Sample code: Patch an application type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAnApplicationType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ApplicationTypeResource resource = manager.applicationTypes() .getWithResponse("resRg", "myCluster", "myAppType", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java index 9987f6658ef5..8691625f58ba 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -18,20 +18,18 @@ */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json */ /** * Sample code: Put an application with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnApplicationWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications() .define("myApp") - .withExistingManagedcluster("resRg", "myCluster") + .withExistingManagedCluster("resRg", "myCluster") .withRegion("eastus") .withTags(mapOf("a", "b")) .withVersion( @@ -63,20 +61,18 @@ public static void putAnApplicationWithMaximumParameters( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_min.json */ /** * Sample code: Put an application with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnApplicationWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications() .define("myApp") - .withExistingManagedcluster("resRg", "myCluster") + .withExistingManagedCluster("resRg", "myCluster") .withRegion("eastus") .withVersion( "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0") diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java index 424583cfad1b..3901bcbacf7f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json */ /** * Sample code: Delete an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications().delete("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java index 65087933dae3..0a119eee74f8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json */ /** * Sample code: Get an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications().getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java index c5453ab90fb1..bdbf6b8debee 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationsListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json */ /** * Sample code: Get a list of application resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAListOfApplicationResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications().list("resRg", "myCluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java index 8a776d4f9f84..50fe204e756d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsReadUpgradeSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationsReadUpgradeSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json */ /** * Sample code: Get an application upgrade. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAnApplicationUpgrade( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications().readUpgrade("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java index dbfb79d17693..60fe11e3f9d4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsResumeUpgradeSamples.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.servicefabricmanagedclusters.generated; @@ -11,17 +11,15 @@ */ public final class ApplicationsResumeUpgradeSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json */ /** * Sample code: Resume upgrade. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void resumeUpgrade( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications() .resumeUpgrade("resRg", "myCluster", "myApp", new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("UD1"), diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java index 6c64289259a1..bc536381b9e3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsStartRollbackSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ApplicationsStartRollbackSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json */ /** * Sample code: Start an application upgrade rollback. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void startAnApplicationUpgradeRollback( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.applications().startRollback("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java index 6c0b0ba46298..71a890c72b62 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json */ /** * Sample code: Patch an application. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAnApplication( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ApplicationResource resource = manager.applications() .getWithResponse("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java index dd9b4a9cc08a..88094e83303a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowPostSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedApplyMaintenanceWindowPostSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ /** - * Sample code: Maintenance Window Status. + * Sample code: Apply Maintenance Window Status. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void maintenanceWindowStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void applyMaintenanceWindowStatus( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedApplyMaintenanceWindows() .postWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java index 6dc6a6025c26..bba29d14f280 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedAzResiliencyStatusesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json */ /** * Sample code: Az Resiliency status of Base Resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void azResiliencyStatusOfBaseResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedAzResiliencyStatuses() .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java index 9d3bda538870..dc15be7bdd4c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetByEnvironmentSamples.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.servicefabricmanagedclusters.generated; @@ -11,17 +11,15 @@ */ public final class ManagedClusterVersionGetByEnvironmentSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ /** * Sample code: Get cluster version by environment. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getClusterVersionByEnvironment( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusterVersions() .getByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, "7.2.477.9590", com.azure.core.util.Context.NONE); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java index 42210c3f91a2..6d5585bf4a32 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClusterVersionGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json */ /** * Sample code: Get cluster version. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getClusterVersion( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusterVersions().getWithResponse("eastus", "7.2.477.9590", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java index 032f4437ee38..aac1a8587c69 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListByEnvironmentSamples.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.servicefabricmanagedclusters.generated; @@ -11,17 +11,15 @@ */ public final class ManagedClusterVersionListByEnvironmentSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json */ /** * Sample code: List cluster versions by environment. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listClusterVersionsByEnvironment( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusterVersions() .listByEnvironmentWithResponse("eastus", ManagedClusterVersionEnvironment.WINDOWS, com.azure.core.util.Context.NONE); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java index fa610c20f4f2..ff5659521abe 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterVersionListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClusterVersionListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json */ /** * Sample code: List cluster versions. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listClusterVersions( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusterVersions().listWithResponse("eastus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java index ace58d7160fe..f2f9cd7bc3d2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersCreateOrUpdateSamples.java @@ -1,11 +1,12 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Access; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionsCleanupPolicy; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AutoGeneratedDomainNameLabelScope; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterHealthPolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterMonitoringPolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ClusterUpgradeCadence; @@ -38,27 +39,25 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json */ /** * Sample code: Put a cluster with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAClusterWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters() - .define("myCluster") + .define("mycluster") .withRegion("eastus") .withExistingResourceGroup("resRg") .withSku(new Sku().withName(SkuName.BASIC)) .withTags(mapOf()) - .withDnsName("myCluster") + .withDnsName("mycluster") .withClientConnectionPort(19000) .withHttpGatewayConnectionPort(19080) - .withAdminUsername("vmadmin") + .withAdminUserName("vmadmin") .withAdminPassword("{vm-password}") .withLoadBalancingRules(Arrays.asList( new LoadBalancingRule().withFrontendPort(80) @@ -121,7 +120,7 @@ public static void putAClusterWithMaximumParameters( .withLocations(Arrays.asList("eastus2", "usnorth")))) .withZonalUpdateMode(ZonalUpdateMode.FAST) .withUseCustomVnet(true) - .withPublicIpPrefixId( + .withPublicIPPrefixId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix") .withPublicIPv6PrefixId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix") @@ -140,28 +139,28 @@ public static void putAClusterWithMaximumParameters( .withUpgradeDomainTimeout("03:00:00"))) .withHttpGatewayTokenAuthConnectionPort(19081) .withEnableHttpGatewayExclusiveAuthMode(true) + .withAutoGeneratedDomainNameLabelScope(AutoGeneratedDomainNameLabelScope.SUBSCRIPTION_REUSE) + .withAllocatedOutboundPorts(0) .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json */ /** * Sample code: Put a cluster with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAClusterWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters() .define("myCluster") .withRegion("eastus") .withExistingResourceGroup("resRg") .withSku(new Sku().withName(SkuName.BASIC)) .withDnsName("myCluster") - .withAdminUsername("vmadmin") + .withAdminUserName("vmadmin") .withAdminPassword("{vm-password}") .withFabricSettings(Arrays.asList(new SettingsSectionDescription().withName("ManagedIdentityTokenService") .withParameters( diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java index f3d21dcd8d25..0fbc4f5c8521 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json */ /** * Sample code: Delete a cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteACluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters().delete("resRg", "myCluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java index ec3138c3b2e4..5b26363a3b40 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersGetByResourceGroupSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json */ /** * Sample code: Get a cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getACluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters() .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java index 625fe4c4b4b9..0b3f2fcbca51 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListByResourceGroupSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ /** * Sample code: List cluster by resource group. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listClusterByResourceGroup( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters().listByResourceGroup("resRg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java index e95e796ce975..e066f5c5ae2c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ /** * Sample code: List managed clusters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listManagedClusters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedClusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java index 645c0b510ae3..3be3d69a3655 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class ManagedClustersUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json */ /** * Sample code: Patch a managed cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAManagedCluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ManagedCluster resource = manager.managedClusters() .getByResourceGroupWithResponse("resRg", "myCluster", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java index 20720fcfe373..6cf1855eac76 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedMaintenanceWindowStatusesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ /** - * Sample code: Maintenance Window Status. + * Sample code: Get Maintenance Window Status. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void maintenanceWindowStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void getMaintenanceWindowStatus( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedMaintenanceWindowStatuses() .getWithResponse("resourceGroup1", "mycluster1", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java index 93aa9878caa9..d423a1d440ca 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedUnsupportedVMSizesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json */ /** * Sample code: Get unsupported vm sizes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getUnsupportedVmSizes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedUnsupportedVMSizes() .getWithResponse("eastus", "Standard_B1ls1", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java index 539618a4776c..f9f25f5f3b43 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ManagedUnsupportedVMSizesListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json */ /** * Sample code: List unsupported vm sizes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listUnsupportedVmSizes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.managedUnsupportedVMSizes().list("eastus", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java index 4a7afdd92035..c5b2ff66028a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class NodeTypeSkusListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json */ /** * Sample code: List a node type SKUs. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listANodeTypeSKUs( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypeSkus().list("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java index 0876ebee04cc..52d6f5c6fdda 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesCreateOrUpdateSamples.java @@ -1,31 +1,30 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.management.SubResource; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.DiskType; import com.azure.resourcemanager.servicefabricmanagedclusters.models.EvictionPolicyType; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPConfigurationPublicIPAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIPAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIPAddressVersion; import com.azure.resourcemanager.servicefabricmanagedclusters.models.SecurityType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtension; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultCertificate; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VaultSecretGroup; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmImagePlan; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmManagedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmSetupAction; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssDataDisk; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension; import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; -import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -35,18 +34,15 @@ */ public final class NodeTypesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationStateless_example.json */ /** * Sample code: Put an stateless node type with temporary disk for service fabric. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -57,13 +53,12 @@ public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( .withVmImageOffer("WindowsServer") .withVmImageSku("2016-Datacenter-Server-Core") .withVmImageVersion("latest") - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") .withPublisher("Microsoft.Azure.Geneva") .withType("GenevaMonitoring") .withTypeHandlerVersion("2.0") .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSettings(new VMSSExtensionPropertiesSettings()))) .withIsStateless(true) .withMultiplePlacementGroups(true) .withEnableEncryptionAtHost(true) @@ -72,18 +67,15 @@ public static void putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_max.json */ /** * Sample code: Put a node type with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putANodeTypeWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE-testResourceGroup-testRegion-test") .withExistingManagedCluster("resRg", "myCluster") @@ -105,13 +97,12 @@ public static void putANodeTypeWithMaximumParameters( .withCertificateUrl( "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") .withCertificateStore("My"))))) - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") .withPublisher("Microsoft.Azure.Geneva") .withType("GenevaMonitoring") .withTypeHandlerVersion("2.0") .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) + .withSettings(new VMSSExtensionPropertiesSettings()) .withForceUpdateTag("v.1.0") .withEnableAutomaticUpgrade(true) .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME)))) @@ -148,7 +139,7 @@ public static void putANodeTypeWithMaximumParameters( .withVmSetupActions(Arrays.asList(VmSetupAction.ENABLE_CONTAINERS, VmSetupAction.ENABLE_HYPERV)) .withSecurityType(SecurityType.TRUSTED_LAUNCH) .withSecureBootEnabled(true) - .withEnableNodePublicIp(true) + .withEnableNodePublicIP(true) .withEnableNodePublicIPv6(true) .withNatGatewayId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway") @@ -170,28 +161,33 @@ public static void putANodeTypeWithMaximumParameters( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"))) .withSubnet(new SubResource().withId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() + .withPrivateIPAddressVersion(PrivateIPAddressVersion.IPV4) + .withPublicIPAddressConfiguration(new IPConfigurationPublicIPAddressConfiguration() .withName("publicip-1") .withIpTags(Arrays.asList(new IpTag().withIpTagType("RoutingPreference").withTag("Internet"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)))))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV4)))))) .withComputerNamePrefix("BE") + .withVmApplications(Arrays.asList(new VmApplication() + .withConfigurationReference("https://mystorageaccount.blob.core.windows.net/containername/blobname") + .withEnableAutomaticUpgrade(true) + .withOrder(1) + .withPackageReferenceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0") + .withVmGalleryTags("{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}") + .withTreatFailureAsDeploymentFailure(false))) .create(); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json */ /** * Sample code: Put a node type with auto-scale parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putANodeTypeWithAutoScaleParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) - throws IOException { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -212,13 +208,12 @@ public static void putANodeTypeWithAutoScaleParameters( .withCertificateUrl( "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c") .withCertificateStore("My"))))) - .withVmExtensions(Arrays.asList(new VmssExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") + .withVmExtensions(Arrays.asList(new VMSSExtension().withName("Microsoft.Azure.Geneva.GenevaMonitoring") .withPublisher("Microsoft.Azure.Geneva") .withType("GenevaMonitoring") .withTypeHandlerVersion("2.0") .withAutoUpgradeMinorVersion(true) - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSettings(new VMSSExtensionPropertiesSettings()))) .withVmManagedIdentity(new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2"))) @@ -228,17 +223,15 @@ public static void putANodeTypeWithAutoScaleParameters( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_min.json */ /** * Sample code: Put a node type with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putANodeTypeWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -254,17 +247,15 @@ public static void putANodeTypeWithMinimumParameters( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json */ /** * Sample code: Put node type with dedicated hosts. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putNodeTypeWithDedicatedHosts( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -286,17 +277,15 @@ public static void putNodeTypeWithDedicatedHosts( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json */ /** * Sample code: Put node type with vm image plan. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putNodeTypeWithVmImagePlan( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -315,17 +304,15 @@ public static void putNodeTypeWithVmImagePlan( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ /** * Sample code: Put node type with shared galleries custom vm image. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putNodeTypeWithSharedGalleriesCustomVmImage( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") @@ -339,17 +326,15 @@ public static void putNodeTypeWithSharedGalleriesCustomVmImage( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json */ /** * Sample code: Put node type with custom vm image. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putNodeTypeWithCustomVmImage( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .define("BE") .withExistingManagedCluster("resRg", "myCluster") diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java new file mode 100644 index 000000000000..4bf512787639 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeallocateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import java.util.Arrays; + +/** + * Samples for NodeTypes Deallocate. + */ +public final class NodeTypesDeallocateSamples { + /* + * x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json + */ + /** + * Sample code: Deallocate nodes. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void deallocateNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .deallocate("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java index ec0d0d69dfe1..c66227fe4099 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeSamples.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.servicefabricmanagedclusters.generated; @@ -12,17 +12,15 @@ */ public final class NodeTypesDeleteNodeSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * DeleteNodes_example.json + * x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json */ /** * Sample code: Delete nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .deleteNode("resRg", "myCluster", "BE", new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java index 7654b4705b09..22c8f7b6ed9a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class NodeTypesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json */ /** * Sample code: Delete a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes().delete("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java index 9c0f907ab525..fab95f11c831 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class NodeTypesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json */ /** * Sample code: Get a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes().getWithResponse("resRg", "myCluster", "FE", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java index 4d4b35c5b2ff..76f7032b10a3 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesListByManagedClustersSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class NodeTypesListByManagedClustersSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypeListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json */ /** * Sample code: List node type of the specified managed cluster. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void listNodeTypeOfTheSpecifiedManagedCluster( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes().listByManagedClusters("resRg", "myCluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java new file mode 100644 index 000000000000..ee1980e01859 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRedeploySamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; +import java.util.Arrays; + +/** + * Samples for NodeTypes Redeploy. + */ +public final class NodeTypesRedeploySamples { + /* + * x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json + */ + /** + * Sample code: Redeploy all nodes by upgrade domain. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void redeployAllNodesByUpgradeDomain( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .redeploy("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01-preview/RedeployNodes_example.json + */ + /** + * Sample code: Redeploy nodes. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void redeployNodes( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .redeploy("resRg", "myCluster", "BE", + new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java index ed0df177a37f..e9fbea6036b9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class NodeTypesReimageSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ReimageNodes_example.json + * x-ms-original-file: 2025-03-01-preview/ReimageNodes_example.json */ /** * Sample code: Reimage nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void reimageNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .reimage("resRg", "myCluster", "BE", new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), @@ -31,17 +29,15 @@ public static void reimageNodes( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ReimageNodes_UD_example.json + * x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json */ /** - * Sample code: Reimage all nodes By upgrade domain. + * Sample code: Reimage all nodes by upgrade domain. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void reimageAllNodesByUpgradeDomain( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .reimage("resRg", "myCluster", "BE", new NodeTypeActionParameters().withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java index e410d810538a..f41f6c3bc579 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartSamples.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.servicefabricmanagedclusters.generated; @@ -12,17 +12,15 @@ */ public final class NodeTypesRestartSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * RestartNodes_example.json + * x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json */ /** * Sample code: Restart nodes. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void restartNodes( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.nodeTypes() .restart("resRg", "myCluster", "BE", new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_3")), diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java new file mode 100644 index 000000000000..d25e8fc7d5cf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesStartSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; +import java.util.Arrays; + +/** + * Samples for NodeTypes Start. + */ +public final class NodeTypesStartSamples { + /* + * x-ms-original-file: 2025-03-01-preview/StartNodes_example.json + */ + /** + * Sample code: Start nodes. + * + * @param manager Entry point to ServicefabricmanagedclustersManager. + */ + public static void + startNodes(com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { + manager.nodeTypes() + .start("resRg", "myCluster", "BE", new NodeTypeActionParameters().withNodes(Arrays.asList("BE_0", "BE_1")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java index c667c3dcdc76..48d3119c2230 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -14,17 +14,15 @@ */ public final class NodeTypesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperation_example.json */ /** * Sample code: Patch a node type. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchANodeType( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { NodeType resource = manager.nodeTypes() .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) .getValue(); @@ -32,17 +30,15 @@ public static void patchANodeType( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json */ /** * Sample code: Patch a node type while auto-scaling. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchANodeTypeWhileAutoScaling( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { NodeType resource = manager.nodeTypes() .getWithResponse("resRg", "myCluster", "BE", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetSamples.java index 2f178f4d3a72..c435a476e446 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,18 +9,16 @@ */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_result.json + * x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json */ /** - * Sample code: Get operation result. + * Sample code: Get long running operation result. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getOperationResult( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void getLongRunningOperationResult( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.operationResults() - .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); + .get("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationStatusGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationStatusGetSamples.java index 617ad6c9e43f..e67297900538 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationStatusGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationStatusGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,33 +9,29 @@ */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_status_succeeded.json + * x-ms-original-file: 2025-03-01-preview/OperationStatusSucceeded_example.json */ /** - * Sample code: Get succeeded operation result. + * Sample code: OK. The request has succeeded. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getSucceededOperationResult( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void okTheRequestHasSucceeded( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.operationStatus() .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Long_running_operation_status_failed.json + * x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json */ /** - * Sample code: Get failed operation status. + * Sample code: Error response describing why the operation failed. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void getFailedOperationStatus( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void errorResponseDescribingWhyTheOperationFailed( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.operationStatus() .getWithResponse("eastus", "00000000-0000-0000-0000-000000001234", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java index 1f2f0cafa6f0..402ad3c17651 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * Operations_example.json + * x-ms-original-file: 2025-03-01-preview/OperationsList_example.json */ /** - * Sample code: List available operations. + * Sample code: List the operations for the provider. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ - public static void listAvailableOperations( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + public static void listTheOperationsForTheProvider( + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java index fb9c0eb17243..73dd35a14ccd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -25,17 +25,15 @@ */ public final class ServicesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePutOperation_example_min.json + * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_min.json */ /** * Sample code: Put a service with minimum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAServiceWithMinimumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.services() .define("myService") .withExistingApplication("resRg", "myCluster", "myApp") @@ -47,17 +45,15 @@ public static void putAServiceWithMinimumParameters( } /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePutOperation_example_max.json + * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json */ /** * Sample code: Put a service with maximum parameters. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void putAServiceWithMaximumParameters( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.services() .define("myService") .withExistingApplication("resRg", "myCluster", "myApp") diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java index 2e769946097e..f74c941444cc 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ServicesDeleteSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json */ /** * Sample code: Delete a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void deleteAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.services().delete("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java index e242162f434e..b2a6f9991417 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ServicesGetSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceGetOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json */ /** * Sample code: Get a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.services() .getWithResponse("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java index 7a73f9268d55..cafda29c4a94 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsSamples.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.servicefabricmanagedclusters.generated; @@ -9,17 +9,15 @@ */ public final class ServicesListByApplicationsSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServiceListOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json */ /** * Sample code: Get a list of service resources. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void getAListOfServiceResources( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { manager.services().listByApplications("resRg", "myCluster", "myApp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java index 5ac62c330b0d..4ec9573941d1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/samples/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesUpdateSamples.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,15 @@ */ public final class ServicesUpdateSamples { /* - * x-ms-original-file: - * specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/stable/2024-04-01/examples/ - * ServicePatchOperation_example.json + * x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json */ /** * Sample code: Patch a service. * - * @param manager Entry point to ServiceFabricManagedClustersManager. + * @param manager Entry point to ServicefabricmanagedclustersManager. */ public static void patchAService( - com.azure.resourcemanager.servicefabricmanagedclusters.ServiceFabricManagedClustersManager manager) { + com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager manager) { ServiceResource resource = manager.services() .getWithResponse("resRg", "myCluster", "myApp", "myService", com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanismTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanismTests.java new file mode 100644 index 000000000000..3a5acdf06b48 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AddRemoveIncrementalNamedPartitionScalingMechanismTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.AddRemoveIncrementalNamedPartitionScalingMechanism; +import org.junit.jupiter.api.Assertions; + +public final class AddRemoveIncrementalNamedPartitionScalingMechanismTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AddRemoveIncrementalNamedPartitionScalingMechanism model = BinaryData.fromString( + "{\"kind\":\"AddRemoveIncrementalNamedPartition\",\"minPartitionCount\":519560547,\"maxPartitionCount\":301470768,\"scaleIncrement\":522774709}") + .toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); + Assertions.assertEquals(519560547, model.minPartitionCount()); + Assertions.assertEquals(301470768, model.maxPartitionCount()); + Assertions.assertEquals(522774709, model.scaleIncrement()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AddRemoveIncrementalNamedPartitionScalingMechanism model + = new AddRemoveIncrementalNamedPartitionScalingMechanism().withMinPartitionCount(519560547) + .withMaxPartitionCount(301470768) + .withScaleIncrement(522774709); + model = BinaryData.fromObject(model).toObject(AddRemoveIncrementalNamedPartitionScalingMechanism.class); + Assertions.assertEquals(519560547, model.minPartitionCount()); + Assertions.assertEquals(301470768, model.maxPartitionCount()); + Assertions.assertEquals(522774709, model.scaleIncrement()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java index 4ea42d9aa30b..5e4c702feb96 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AdditionalNetworkInterfaceConfigurationTests.java @@ -1,17 +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.servicefabricmanagedclusters.generated; import com.azure.core.management.SubResource; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.models.AdditionalNetworkInterfaceConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPConfigurationPublicIPAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIPAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIPAddressVersion; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -19,84 +19,87 @@ public final class AdditionalNetworkInterfaceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdditionalNetworkInterfaceConfiguration model = BinaryData.fromString( - "{\"name\":\"fkbw\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"vcdwxlpqekftn\"},\"ipConfigurations\":[{\"name\":\"tjsyin\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"atmtdhtmdvy\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"dgszywkbirryuzh\"},{\"id\":\"kj\"},{\"id\":\"rvqqaatj\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"goupmfiibfg\"}],\"subnet\":{\"id\":\"ool\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"kvtkkg\",\"ipTags\":[{\"ipTagType\":\"wjygvjayvblmhvk\",\"tag\":\"uhbxvvy\"},{\"ipTagType\":\"gsopbyrqufegxu\",\"tag\":\"wz\"}],\"publicIPAddressVersion\":\"IPv6\"}},{\"name\":\"hlmctlpdngitvgb\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"xkw\"},{\"id\":\"ijejvegrhbpn\"},{\"id\":\"xexccbdreaxhcexd\"},{\"id\":\"vqahqkghtpwi\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"jsvfycxzbfvoowv\"},{\"id\":\"mtg\"},{\"id\":\"ppyostronzmyhgf\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"xkmcwaekrrjre\"},{\"id\":\"xt\"},{\"id\":\"umh\"},{\"id\":\"lik\"}],\"subnet\":{\"id\":\"slol\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"uzlm\",\"ipTags\":[{\"ipTagType\":\"lfktgplcrpwjxe\",\"tag\":\"noigbrnjwmwk\"}],\"publicIPAddressVersion\":\"IPv6\"}}]}") + "{\"name\":\"ool\",\"enableAcceleratedNetworking\":true,\"dscpConfiguration\":{\"id\":\"v\"},\"ipConfigurations\":[{\"name\":\"k\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"wjygvjayvblmhvk\"},{\"id\":\"hbxvvyhgsopbyrqu\"},{\"id\":\"g\"},{\"id\":\"vwz\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"lmctlpd\"},{\"id\":\"itvgbmhrixkwm\"},{\"id\":\"jejveg\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"nai\"},{\"id\":\"xccbdreaxhcex\"},{\"id\":\"rvqahqkghtpwi\"},{\"id\":\"hyjsvfycx\"}],\"subnet\":{\"id\":\"voowvr\"},\"privateIPAddressVersion\":\"IPv4\",\"publicIPAddressConfiguration\":{\"name\":\"jqppyostronzmy\",\"ipTags\":[{\"ipTagType\":\"ipn\",\"tag\":\"xkmcwaekrrjre\"},{\"ipTagType\":\"fxtsgum\",\"tag\":\"jglikkxwslolb\"}],\"publicIPAddressVersion\":\"IPv4\"}},{\"name\":\"uzlm\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"fktgplc\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"xeznoi\"},{\"id\":\"rnjwmw\"},{\"id\":\"nbsazejjoqkag\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"ttaugzxnfaazp\"},{\"id\":\"tnkdmkqj\"}],\"subnet\":{\"id\":\"uenvrkp\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"ibreb\",\"ipTags\":[{\"ipTagType\":\"ysjkixqtnqttez\",\"tag\":\"wfff\"},{\"ipTagType\":\"akpjpqqmtedlt\",\"tag\":\"mjihyeozphv\"},{\"ipTagType\":\"auyqncygupkv\",\"tag\":\"p\"},{\"ipTagType\":\"dscwxqupevzhf\",\"tag\":\"totxhojujb\"}],\"publicIPAddressVersion\":\"IPv6\"}}]}") .toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("fkbw", model.name()); + Assertions.assertEquals("ool", model.name()); Assertions.assertEquals(true, model.enableAcceleratedNetworking()); - Assertions.assertEquals("vcdwxlpqekftn", model.dscpConfiguration().id()); - Assertions.assertEquals("tjsyin", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", + Assertions.assertEquals("v", model.dscpConfiguration().id()); + Assertions.assertEquals("k", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("wjygvjayvblmhvk", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("dgszywkbirryuzh", + Assertions.assertEquals("lmctlpd", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("goupmfiibfg", - model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("ool", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV6, - model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kvtkkg", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("wjygvjayvblmhvk", - model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("uhbxvvy", - model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, - model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); + Assertions.assertEquals("nai", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("voowvr", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIPAddressVersion.IPV4, + model.ipConfigurations().get(0).privateIPAddressVersion()); + Assertions.assertEquals("jqppyostronzmy", + model.ipConfigurations().get(0).publicIPAddressConfiguration().name()); + Assertions.assertEquals("ipn", + model.ipConfigurations().get(0).publicIPAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("xkmcwaekrrjre", + model.ipConfigurations().get(0).publicIPAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV4, + model.ipConfigurations().get(0).publicIPAddressConfiguration().publicIPAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AdditionalNetworkInterfaceConfiguration model - = new AdditionalNetworkInterfaceConfiguration().withName("fkbw") - .withEnableAcceleratedNetworking(true) - .withDscpConfiguration(new SubResource().withId("vcdwxlpqekftn")) - .withIpConfigurations(Arrays.asList(new IpConfiguration().withName("tjsyin") - .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("atmtdhtmdvy"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("dgszywkbirryuzh"), - new SubResource().withId("kj"), new SubResource().withId("rvqqaatj"))) - .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("goupmfiibfg"))) - .withSubnet(new SubResource().withId("ool")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration() - .withName("kvtkkg") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("wjygvjayvblmhvk").withTag("uhbxvvy"), - new IpTag().withIpTagType("gsopbyrqufegxu").withTag("wz"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)), - new IpConfiguration().withName("hlmctlpdngitvgb") - .withApplicationGatewayBackendAddressPools( - Arrays.asList(new SubResource().withId("xkw"), new SubResource().withId("ijejvegrhbpn"), - new SubResource().withId("xexccbdreaxhcexd"), new SubResource().withId("vqahqkghtpwi"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("jsvfycxzbfvoowv"), - new SubResource().withId("mtg"), new SubResource().withId("ppyostronzmyhgf"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("xkmcwaekrrjre"), new SubResource().withId("xt"), - new SubResource().withId("umh"), new SubResource().withId("lik"))) - .withSubnet(new SubResource().withId("slol")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV4) - .withPublicIpAddressConfiguration( - new IpConfigurationPublicIpAddressConfiguration().withName("uzlm") - .withIpTags( - Arrays.asList(new IpTag().withIpTagType("lfktgplcrpwjxe").withTag("noigbrnjwmwk"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV6)))); + AdditionalNetworkInterfaceConfiguration model = new AdditionalNetworkInterfaceConfiguration().withName("ool") + .withEnableAcceleratedNetworking(true) + .withDscpConfiguration(new SubResource().withId("v")) + .withIpConfigurations(Arrays.asList( + new IpConfiguration().withName("k") + .withApplicationGatewayBackendAddressPools(Arrays.asList( + new SubResource().withId("wjygvjayvblmhvk"), new SubResource().withId("hbxvvyhgsopbyrqu"), + new SubResource().withId("g"), new SubResource().withId("vwz"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("lmctlpd"), + new SubResource().withId("itvgbmhrixkwm"), new SubResource().withId("jejveg"))) + .withLoadBalancerInboundNatPools( + Arrays.asList(new SubResource().withId("nai"), new SubResource().withId("xccbdreaxhcex"), + new SubResource().withId("rvqahqkghtpwi"), new SubResource().withId("hyjsvfycx"))) + .withSubnet(new SubResource().withId("voowvr")) + .withPrivateIPAddressVersion(PrivateIPAddressVersion.IPV4) + .withPublicIPAddressConfiguration( + new IPConfigurationPublicIPAddressConfiguration().withName("jqppyostronzmy") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("ipn").withTag("xkmcwaekrrjre"), + new IpTag().withIpTagType("fxtsgum").withTag("jglikkxwslolb"))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV4)), + new IpConfiguration().withName("uzlm") + .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("fktgplc"))) + .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("xeznoi"), + new SubResource().withId("rnjwmw"), new SubResource().withId("nbsazejjoqkag"))) + .withLoadBalancerInboundNatPools( + Arrays.asList(new SubResource().withId("ttaugzxnfaazp"), new SubResource().withId("tnkdmkqj"))) + .withSubnet(new SubResource().withId("uenvrkp")) + .withPrivateIPAddressVersion(PrivateIPAddressVersion.IPV6) + .withPublicIPAddressConfiguration( + new IPConfigurationPublicIPAddressConfiguration().withName("ibreb") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("ysjkixqtnqttez").withTag("wfff"), + new IpTag().withIpTagType("akpjpqqmtedlt").withTag("mjihyeozphv"), + new IpTag().withIpTagType("auyqncygupkv").withTag("p"), + new IpTag().withIpTagType("dscwxqupevzhf").withTag("totxhojujb"))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV6)))); model = BinaryData.fromObject(model).toObject(AdditionalNetworkInterfaceConfiguration.class); - Assertions.assertEquals("fkbw", model.name()); + Assertions.assertEquals("ool", model.name()); Assertions.assertEquals(true, model.enableAcceleratedNetworking()); - Assertions.assertEquals("vcdwxlpqekftn", model.dscpConfiguration().id()); - Assertions.assertEquals("tjsyin", model.ipConfigurations().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", + Assertions.assertEquals("v", model.dscpConfiguration().id()); + Assertions.assertEquals("k", model.ipConfigurations().get(0).name()); + Assertions.assertEquals("wjygvjayvblmhvk", model.ipConfigurations().get(0).applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("dgszywkbirryuzh", + Assertions.assertEquals("lmctlpd", model.ipConfigurations().get(0).loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("goupmfiibfg", - model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("ool", model.ipConfigurations().get(0).subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV6, - model.ipConfigurations().get(0).privateIpAddressVersion()); - Assertions.assertEquals("kvtkkg", model.ipConfigurations().get(0).publicIpAddressConfiguration().name()); - Assertions.assertEquals("wjygvjayvblmhvk", - model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("uhbxvvy", - model.ipConfigurations().get(0).publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV6, - model.ipConfigurations().get(0).publicIpAddressConfiguration().publicIpAddressVersion()); + Assertions.assertEquals("nai", model.ipConfigurations().get(0).loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("voowvr", model.ipConfigurations().get(0).subnet().id()); + Assertions.assertEquals(PrivateIPAddressVersion.IPV4, + model.ipConfigurations().get(0).privateIPAddressVersion()); + Assertions.assertEquals("jqppyostronzmy", + model.ipConfigurations().get(0).publicIPAddressConfiguration().name()); + Assertions.assertEquals("ipn", + model.ipConfigurations().get(0).publicIPAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("xkmcwaekrrjre", + model.ipConfigurations().get(0).publicIPAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV4, + model.ipConfigurations().get(0).publicIPAddressConfiguration().publicIPAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationHealthPolicyTests.java index 3f19d63994fc..ed070b3e4be0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationHealthPolicyTests.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.servicefabricmanagedclusters.generated; @@ -15,60 +15,49 @@ public final class ApplicationHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationHealthPolicy model = BinaryData.fromString( - "{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":206399167,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":99630495,\"maxPercentUnhealthyPartitionsPerService\":537336258,\"maxPercentUnhealthyReplicasPerPartition\":1502359819},\"serviceTypeHealthPolicyMap\":{\"rhcffcydd\":{\"maxPercentUnhealthyServices\":1391069168,\"maxPercentUnhealthyPartitionsPerService\":1330155911,\"maxPercentUnhealthyReplicasPerPartition\":2037494020},\"t\":{\"maxPercentUnhealthyServices\":1726993489,\"maxPercentUnhealthyPartitionsPerService\":76474266,\"maxPercentUnhealthyReplicasPerPartition\":661873212},\"wpyeicxmqciwqvh\":{\"maxPercentUnhealthyServices\":439652711,\"maxPercentUnhealthyPartitionsPerService\":1041112743,\"maxPercentUnhealthyReplicasPerPartition\":478155788},\"uigdtopbobjog\":{\"maxPercentUnhealthyServices\":621185104,\"maxPercentUnhealthyPartitionsPerService\":1191010695,\"maxPercentUnhealthyReplicasPerPartition\":1053923929}}}") + "{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":863181749,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1288567604,\"maxPercentUnhealthyPartitionsPerService\":1464742216,\"maxPercentUnhealthyReplicasPerPartition\":1720928556},\"serviceTypeHealthPolicyMap\":{\"bzqqedqytbciq\":{\"maxPercentUnhealthyServices\":1093417192,\"maxPercentUnhealthyPartitionsPerService\":954363887,\"maxPercentUnhealthyReplicasPerPartition\":384573586}}}") .toObject(ApplicationHealthPolicy.class); Assertions.assertEquals(true, model.considerWarningAsError()); - Assertions.assertEquals(206399167, model.maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(99630495, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); - Assertions.assertEquals(537336258, + Assertions.assertEquals(863181749, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(1288567604, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(1464742216, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1502359819, + Assertions.assertEquals(1720928556, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1391069168, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyServices()); - Assertions.assertEquals(1330155911, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(2037494020, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1093417192, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyServices()); + Assertions.assertEquals(954363887, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(384573586, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyReplicasPerPartition()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationHealthPolicy model = new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(206399167) - .withDefaultServiceTypeHealthPolicy(new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(99630495) - .withMaxPercentUnhealthyPartitionsPerService(537336258) - .withMaxPercentUnhealthyReplicasPerPartition(1502359819)) - .withServiceTypeHealthPolicyMap(mapOf("rhcffcydd", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1391069168) - .withMaxPercentUnhealthyPartitionsPerService(1330155911) - .withMaxPercentUnhealthyReplicasPerPartition(2037494020), - "t", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1726993489) - .withMaxPercentUnhealthyPartitionsPerService(76474266) - .withMaxPercentUnhealthyReplicasPerPartition(661873212), - "wpyeicxmqciwqvh", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(439652711) - .withMaxPercentUnhealthyPartitionsPerService(1041112743) - .withMaxPercentUnhealthyReplicasPerPartition(478155788), - "uigdtopbobjog", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(621185104) - .withMaxPercentUnhealthyPartitionsPerService(1191010695) - .withMaxPercentUnhealthyReplicasPerPartition(1053923929))); + .withMaxPercentUnhealthyDeployedApplications(863181749) + .withDefaultServiceTypeHealthPolicy( + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1288567604) + .withMaxPercentUnhealthyPartitionsPerService(1464742216) + .withMaxPercentUnhealthyReplicasPerPartition(1720928556)) + .withServiceTypeHealthPolicyMap(mapOf("bzqqedqytbciq", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1093417192) + .withMaxPercentUnhealthyPartitionsPerService(954363887) + .withMaxPercentUnhealthyReplicasPerPartition(384573586))); model = BinaryData.fromObject(model).toObject(ApplicationHealthPolicy.class); Assertions.assertEquals(true, model.considerWarningAsError()); - Assertions.assertEquals(206399167, model.maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(99630495, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); - Assertions.assertEquals(537336258, + Assertions.assertEquals(863181749, model.maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(1288567604, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); + Assertions.assertEquals(1464742216, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1502359819, + Assertions.assertEquals(1720928556, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1391069168, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyServices()); - Assertions.assertEquals(1330155911, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(2037494020, - model.serviceTypeHealthPolicyMap().get("rhcffcydd").maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(1093417192, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyServices()); + Assertions.assertEquals(954363887, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(384573586, + model.serviceTypeHealthPolicyMap().get("bzqqedqytbciq").maxPercentUnhealthyReplicasPerPartition()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceInnerTests.java index 725b32e29490..19a8743f233c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceInnerTests.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.servicefabricmanagedclusters.generated; @@ -25,173 +25,176 @@ public final class ApplicationResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationResourceInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"wnzlljfmppeeb\",\"tenantId\":\"gxsabkyq\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rwpdappdsbdkvwrw\":{\"principalId\":\"c\",\"clientId\":\"zdzevndh\"},\"hocdgeab\":{\"principalId\":\"eusnhutj\",\"clientId\":\"tmrldhugjzzdatq\"}}},\"properties\":{\"provisioningState\":\"huticndvkao\",\"version\":\"yiftyhxhuro\",\"parameters\":{\"cukjf\":\"yxolniwp\",\"lryplwckbasyy\":\"giawx\",\"jkot\":\"nddhsgcbacph\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":813482060,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":228751316,\"maxPercentUnhealthyPartitionsPerService\":2032457047,\"maxPercentUnhealthyReplicasPerPartition\":1299087346},\"serviceTypeHealthPolicyMap\":{\"yqkgfg\":{\"maxPercentUnhealthyServices\":250588386,\"maxPercentUnhealthyPartitionsPerService\":708367520,\"maxPercentUnhealthyReplicasPerPartition\":485783320},\"dgak\":{\"maxPercentUnhealthyServices\":1800206320,\"maxPercentUnhealthyPartitionsPerService\":1173503063,\"maxPercentUnhealthyReplicasPerPartition\":1193529949},\"xybz\":{\"maxPercentUnhealthyServices\":712813176,\"maxPercentUnhealthyPartitionsPerService\":186641812,\"maxPercentUnhealthyReplicasPerPartition\":1093417192}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"ytb\",\"healthCheckStableDuration\":\"iqfouflmmnkz\",\"healthCheckRetryTimeout\":\"modmglougpb\",\"upgradeTimeout\":\"wtmutduq\",\"upgradeDomainTimeout\":\"ta\"},\"instanceCloseDelayDuration\":52315490134475287,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":8788787487119188648,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"dosvqwhbmdgbbjf\",\"principalId\":\"dgmb\"},{\"name\":\"bexppb\",\"principalId\":\"tq\"}]},\"location\":\"ol\",\"tags\":{\"gjyjgzjaoyfhrtxi\":\"psalgbqux\",\"rkujy\":\"n\",\"rlyxwjkcprbnw\":\"vlejuvfqa\"},\"id\":\"gjvtbv\",\"name\":\"ysszdnrujqguh\",\"type\":\"uouq\"}") + "{\"properties\":{\"provisioningState\":\"abifpikxwczbys\",\"version\":\"pqxu\",\"parameters\":{\"n\":\"y\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":355535904,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":143848779,\"maxPercentUnhealthyPartitionsPerService\":768699380,\"maxPercentUnhealthyReplicasPerPartition\":519347031},\"serviceTypeHealthPolicyMap\":{\"rtfw\":{\"maxPercentUnhealthyServices\":832798449,\"maxPercentUnhealthyPartitionsPerService\":920256064,\"maxPercentUnhealthyReplicasPerPartition\":1629282531},\"gaudcc\":{\"maxPercentUnhealthyServices\":1656802567,\"maxPercentUnhealthyPartitionsPerService\":7252116,\"maxPercentUnhealthyReplicasPerPartition\":2033205532},\"jcny\":{\"maxPercentUnhealthyServices\":157917305,\"maxPercentUnhealthyPartitionsPerService\":70776342,\"maxPercentUnhealthyReplicasPerPartition\":14804050}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"yhtnapczwlokjye\",\"healthCheckStableDuration\":\"kkvnipjox\",\"healthCheckRetryTimeout\":\"jnchgej\",\"upgradeTimeout\":\"podmailzydehojwy\",\"upgradeDomainTimeout\":\"huxinpmqnj\"},\"instanceCloseDelayDuration\":4109191801055295881,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":8676926822483952686,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"putegjvwmfd\",\"principalId\":\"t\"},{\"name\":\"cmdv\",\"principalId\":\"jhulsuuvmkjo\"},{\"name\":\"k\",\"principalId\":\"wfndiodjpsl\"},{\"name\":\"ej\",\"principalId\":\"pvwryoqpsoacc\"}]},\"tags\":{\"lahbcryff\":\"akl\",\"xpaojakhmsbz\":\"fdosyg\",\"hlxaolthqtr\":\"hcrzevd\"},\"identity\":{\"principalId\":\"bpf\",\"tenantId\":\"s\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ofpdvh\":{\"principalId\":\"cjrwzoxxjtfellu\",\"clientId\":\"zitonpeqfpjkjl\"}}},\"location\":\"xxypininmay\",\"id\":\"ybb\",\"name\":\"podepoo\",\"type\":\"inuvamiheogn\"}") .toObject(ApplicationResourceInner.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ol", model.location()); - Assertions.assertEquals("psalgbqux", model.tags().get("gjyjgzjaoyfhrtxi")); - Assertions.assertEquals("yiftyhxhuro", model.version()); - Assertions.assertEquals("yxolniwp", model.parameters().get("cukjf")); + Assertions.assertEquals("akl", model.tags().get("lahbcryff")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("xxypininmay", model.location()); + Assertions.assertEquals("pqxu", model.version()); + Assertions.assertEquals("y", model.parameters().get("n")); Assertions.assertEquals(false, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(813482060, + Assertions.assertEquals(355535904, model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(228751316, + Assertions.assertEquals(143848779, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(2032457047, + Assertions.assertEquals(768699380, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1299087346, + Assertions.assertEquals(519347031, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(250588386, + Assertions.assertEquals(832798449, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyServices()); - Assertions.assertEquals(708367520, + Assertions.assertEquals(920256064, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(485783320, + Assertions.assertEquals(1629282531, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertEquals(false, model.upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.ROLLBACK, + Assertions.assertEquals(FailureAction.MANUAL, model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ytb", + Assertions.assertEquals("yhtnapczwlokjye", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("iqfouflmmnkz", + Assertions.assertEquals("kkvnipjox", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("modmglougpb", + Assertions.assertEquals("jnchgej", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("wtmutduq", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("ta", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(52315490134475287L, model.upgradePolicy().instanceCloseDelayDuration()); - Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.upgradePolicy().upgradeMode()); - Assertions.assertEquals(8788787487119188648L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals("podmailzydehojwy", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("huxinpmqnj", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(4109191801055295881L, model.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode()); + Assertions.assertEquals(8676926822483952686L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(true, model.upgradePolicy().recreateApplication()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.managedIdentities().get(0).name()); - Assertions.assertEquals("dgmb", model.managedIdentities().get(0).principalId()); + Assertions.assertEquals("putegjvwmfd", model.managedIdentities().get(0).name()); + Assertions.assertEquals("t", model.managedIdentities().get(0).principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationResourceInner model - = new ApplicationResourceInner() - .withIdentity( - new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("rwpdappdsbdkvwrw", new UserAssignedIdentity(), "hocdgeab", - new UserAssignedIdentity()))) - .withLocation("ol") - .withTags(mapOf("gjyjgzjaoyfhrtxi", "psalgbqux", "rkujy", "n", "rlyxwjkcprbnw", "vlejuvfqa")) - .withVersion("yiftyhxhuro") - .withParameters(mapOf("cukjf", "yxolniwp", "lryplwckbasyy", "giawx", "jkot", "nddhsgcbacph")) - .withUpgradePolicy(new ApplicationUpgradePolicy() - .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(false) - .withMaxPercentUnhealthyDeployedApplications(813482060) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(228751316) - .withMaxPercentUnhealthyPartitionsPerService(2032457047) - .withMaxPercentUnhealthyReplicasPerPartition(1299087346)) - .withServiceTypeHealthPolicyMap(mapOf("yqkgfg", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(250588386) - .withMaxPercentUnhealthyPartitionsPerService(708367520) - .withMaxPercentUnhealthyReplicasPerPartition(485783320), - "dgak", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1800206320) - .withMaxPercentUnhealthyPartitionsPerService(1173503063) - .withMaxPercentUnhealthyReplicasPerPartition(1193529949), - "xybz", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(712813176) - .withMaxPercentUnhealthyPartitionsPerService(186641812) - .withMaxPercentUnhealthyReplicasPerPartition(1093417192)))) - .withForceRestart(false) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("ytb") - .withHealthCheckStableDuration("iqfouflmmnkz") - .withHealthCheckRetryTimeout("modmglougpb") - .withUpgradeTimeout("wtmutduq") - .withUpgradeDomainTimeout("ta")) - .withInstanceCloseDelayDuration(52315490134475287L) - .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(8788787487119188648L) - .withRecreateApplication(true)) - .withManagedIdentities(Arrays.asList( - new ApplicationUserAssignedIdentity().withName("dosvqwhbmdgbbjf").withPrincipalId("dgmb"), - new ApplicationUserAssignedIdentity().withName("bexppb").withPrincipalId("tq"))); + ApplicationResourceInner model = new ApplicationResourceInner() + .withTags(mapOf("lahbcryff", "akl", "xpaojakhmsbz", "fdosyg", "hlxaolthqtr", "hcrzevd")) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("ofpdvh", new UserAssignedIdentity()))) + .withLocation("xxypininmay") + .withVersion("pqxu") + .withParameters(mapOf("n", "y")) + .withUpgradePolicy(new ApplicationUpgradePolicy() + .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(false) + .withMaxPercentUnhealthyDeployedApplications(355535904) + .withDefaultServiceTypeHealthPolicy( + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(143848779) + .withMaxPercentUnhealthyPartitionsPerService(768699380) + .withMaxPercentUnhealthyReplicasPerPartition(519347031)) + .withServiceTypeHealthPolicyMap(mapOf("rtfw", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(832798449) + .withMaxPercentUnhealthyPartitionsPerService(920256064) + .withMaxPercentUnhealthyReplicasPerPartition(1629282531), + "gaudcc", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1656802567) + .withMaxPercentUnhealthyPartitionsPerService(7252116) + .withMaxPercentUnhealthyReplicasPerPartition(2033205532), + "jcny", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(157917305) + .withMaxPercentUnhealthyPartitionsPerService(70776342) + .withMaxPercentUnhealthyReplicasPerPartition(14804050)))) + .withForceRestart(false) + .withRollingUpgradeMonitoringPolicy( + new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) + .withHealthCheckWaitDuration("yhtnapczwlokjye") + .withHealthCheckStableDuration("kkvnipjox") + .withHealthCheckRetryTimeout("jnchgej") + .withUpgradeTimeout("podmailzydehojwy") + .withUpgradeDomainTimeout("huxinpmqnj")) + .withInstanceCloseDelayDuration(4109191801055295881L) + .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) + .withUpgradeReplicaSetCheckTimeout(8676926822483952686L) + .withRecreateApplication(true)) + .withManagedIdentities( + Arrays.asList(new ApplicationUserAssignedIdentity().withName("putegjvwmfd").withPrincipalId("t"), + new ApplicationUserAssignedIdentity().withName("cmdv").withPrincipalId("jhulsuuvmkjo"), + new ApplicationUserAssignedIdentity().withName("k").withPrincipalId("wfndiodjpsl"), + new ApplicationUserAssignedIdentity().withName("ej").withPrincipalId("pvwryoqpsoacc"))); model = BinaryData.fromObject(model).toObject(ApplicationResourceInner.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ol", model.location()); - Assertions.assertEquals("psalgbqux", model.tags().get("gjyjgzjaoyfhrtxi")); - Assertions.assertEquals("yiftyhxhuro", model.version()); - Assertions.assertEquals("yxolniwp", model.parameters().get("cukjf")); + Assertions.assertEquals("akl", model.tags().get("lahbcryff")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("xxypininmay", model.location()); + Assertions.assertEquals("pqxu", model.version()); + Assertions.assertEquals("y", model.parameters().get("n")); Assertions.assertEquals(false, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(813482060, + Assertions.assertEquals(355535904, model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(228751316, + Assertions.assertEquals(143848779, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(2032457047, + Assertions.assertEquals(768699380, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1299087346, + Assertions.assertEquals(519347031, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(250588386, + Assertions.assertEquals(832798449, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyServices()); - Assertions.assertEquals(708367520, + Assertions.assertEquals(920256064, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(485783320, + Assertions.assertEquals(1629282531, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("yqkgfg") + .get("rtfw") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertEquals(false, model.upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.ROLLBACK, + Assertions.assertEquals(FailureAction.MANUAL, model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ytb", + Assertions.assertEquals("yhtnapczwlokjye", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("iqfouflmmnkz", + Assertions.assertEquals("kkvnipjox", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("modmglougpb", + Assertions.assertEquals("jnchgej", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("wtmutduq", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("ta", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(52315490134475287L, model.upgradePolicy().instanceCloseDelayDuration()); - Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.upgradePolicy().upgradeMode()); - Assertions.assertEquals(8788787487119188648L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals("podmailzydehojwy", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("huxinpmqnj", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(4109191801055295881L, model.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode()); + Assertions.assertEquals(8676926822483952686L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(true, model.upgradePolicy().recreateApplication()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.managedIdentities().get(0).name()); - Assertions.assertEquals("dgmb", model.managedIdentities().get(0).principalId()); + Assertions.assertEquals("putegjvwmfd", model.managedIdentities().get(0).name()); + Assertions.assertEquals("t", model.managedIdentities().get(0).principalId()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java index 360259999001..e9d8804654e2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourceListTests.java @@ -1,406 +1,97 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResourceList; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUserAssignedIdentity; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentity; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType; import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMode; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.RollingUpgradeMonitoringPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceTypeHealthPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ApplicationResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationResourceList model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"iywgqywgndrvynh\",\"tenantId\":\"pphrcgynco\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"sxlzevgbmqj\":{\"principalId\":\"m\",\"clientId\":\"oo\"}}},\"properties\":{\"provisioningState\":\"c\",\"version\":\"mivkwlzuvcc\",\"parameters\":{\"fionl\":\"fnba\",\"bqqwxrj\":\"bxetqgtzxdpn\",\"mpmngnzscxaqwoo\":\"eallnwsubisnj\",\"njeaseipheofloke\":\"hcbonqvpkvlr\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":354708232,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1285754335,\"maxPercentUnhealthyPartitionsPerService\":290307035,\"maxPercentUnhealthyReplicasPerPartition\":147839675},\"serviceTypeHealthPolicyMap\":{\"pdjpjumasxazjp\":{\"maxPercentUnhealthyServices\":203992895,\"maxPercentUnhealthyPartitionsPerService\":798552756,\"maxPercentUnhealthyReplicasPerPartition\":885958486},\"ualhbxxhejj\":{\"maxPercentUnhealthyServices\":1063088657,\"maxPercentUnhealthyPartitionsPerService\":184362773,\"maxPercentUnhealthyReplicasPerPartition\":973371108},\"udgwdslfho\":{\"maxPercentUnhealthyServices\":2029322855,\"maxPercentUnhealthyPartitionsPerService\":57336706,\"maxPercentUnhealthyReplicasPerPartition\":873426494},\"ynpwlbj\":{\"maxPercentUnhealthyServices\":719647330,\"maxPercentUnhealthyPartitionsPerService\":743935236,\"maxPercentUnhealthyReplicasPerPartition\":470013493}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"ftadehxnltyfs\",\"healthCheckStableDuration\":\"ppusuesnzwdejba\",\"healthCheckRetryTimeout\":\"orxzdmohctbqvud\",\"upgradeTimeout\":\"xdn\",\"upgradeDomainTimeout\":\"nvowgujju\"},\"instanceCloseDelayDuration\":8288430656102622571,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":4728072908166109395,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"dyggdtjixhbku\",\"principalId\":\"fqweykhmene\"},{\"name\":\"fyexfwhy\",\"principalId\":\"cibvyvdcsitynn\"},{\"name\":\"amdecte\",\"principalId\":\"f\"}]},\"location\":\"scjeypv\",\"tags\":{\"gm\":\"rkgqhcjrefo\",\"yyvxyqjpkcattpn\":\"qsl\",\"v\":\"jcrcczsqpjhvmda\",\"q\":\"ysou\"},\"id\":\"a\",\"name\":\"oaeupfhyhltrpmo\",\"type\":\"jmcmatuokthfu\"},{\"identity\":{\"principalId\":\"odsfcpkvxodpuozm\",\"tenantId\":\"ydagfuaxbe\",\"type\":\"None\",\"userAssignedIdentities\":{\"ywqsmbsurexim\":{\"principalId\":\"ktwh\",\"clientId\":\"xw\"},\"ys\":{\"principalId\":\"yocf\",\"clientId\":\"ksymd\"},\"oczvy\":{\"principalId\":\"i\",\"clientId\":\"xhqyudxorrqnb\"}}},\"properties\":{\"provisioningState\":\"rvkdvjsllrm\",\"version\":\"d\",\"parameters\":{\"pnpulexxbczwtru\":\"t\",\"vsovmyokac\":\"iqzbq\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1783138805,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":2100121858,\"maxPercentUnhealthyPartitionsPerService\":1196709774,\"maxPercentUnhealthyReplicasPerPartition\":950671055},\"serviceTypeHealthPolicyMap\":{\"flbvvnchrkcciwwz\":{\"maxPercentUnhealthyServices\":2009602222,\"maxPercentUnhealthyPartitionsPerService\":432282678,\"maxPercentUnhealthyReplicasPerPartition\":1280128063},\"hrsajiwkuofo\":{\"maxPercentUnhealthyServices\":970071122,\"maxPercentUnhealthyPartitionsPerService\":982290440,\"maxPercentUnhealthyReplicasPerPartition\":962380204},\"sauuimj\":{\"maxPercentUnhealthyServices\":364064517,\"maxPercentUnhealthyPartitionsPerService\":1637974204,\"maxPercentUnhealthyReplicasPerPartition\":1433992289},\"eduugi\":{\"maxPercentUnhealthyServices\":981074224,\"maxPercentUnhealthyPartitionsPerService\":1194326763,\"maxPercentUnhealthyReplicasPerPartition\":586679230}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"f\",\"healthCheckStableDuration\":\"y\",\"healthCheckRetryTimeout\":\"osvexcsonpclhoc\",\"upgradeTimeout\":\"hslkevleggzf\",\"upgradeDomainTimeout\":\"u\"},\"instanceCloseDelayDuration\":5326513191162029025,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":662353480914174128,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"th\",\"principalId\":\"vmezy\"},{\"name\":\"shxmzsbbzoggigrx\",\"principalId\":\"burvjxxjnspy\"},{\"name\":\"ptkoenkoukn\",\"principalId\":\"udwtiukbl\"},{\"name\":\"ngkpocipazy\",\"principalId\":\"o\"}]},\"location\":\"ukgjnpiucgygevq\",\"tags\":{\"rbpizc\":\"yp\",\"j\":\"r\",\"yhxdeoejzicwi\":\"dpydn\",\"bkh\":\"sjttgzfbish\"},\"id\":\"deyeamdphagalpbu\",\"name\":\"wgipwhono\",\"type\":\"kgshwa\"},{\"identity\":{\"principalId\":\"xzbinjeputt\",\"tenantId\":\"ywnuzoq\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ryavwhheunmmqh\":{\"principalId\":\"rnkcqvyxlw\",\"clientId\":\"lsicohoqqnwv\"},\"szfkbe\":{\"principalId\":\"xzko\",\"clientId\":\"cukoklyaxuconu\"},\"frzpwvlqdqgb\":{\"principalId\":\"ewrmjmwvvjektc\",\"clientId\":\"enhwlrs\"},\"jf\":{\"principalId\":\"ylihkaetckt\",\"clientId\":\"civfsnkymuctq\"}}},\"properties\":{\"provisioningState\":\"rjcxerfuwu\",\"version\":\"txfvjrbirph\",\"parameters\":{\"vahfn\":\"c\",\"xjvuujqgidokg\":\"jky\",\"sncghkjeszz\":\"ljyoxgvcltb\",\"mxnehmp\":\"bijhtxfvgxbf\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1534633799,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1976417253,\"maxPercentUnhealthyPartitionsPerService\":68854326,\"maxPercentUnhealthyReplicasPerPartition\":1592452117},\"serviceTypeHealthPolicyMap\":{\"bmpukgriwflz\":{\"maxPercentUnhealthyServices\":398257944,\"maxPercentUnhealthyPartitionsPerService\":898595537,\"maxPercentUnhealthyReplicasPerPartition\":156663672},\"zpuzycisp\":{\"maxPercentUnhealthyServices\":905507147,\"maxPercentUnhealthyPartitionsPerService\":595725350,\"maxPercentUnhealthyReplicasPerPartition\":294567134}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"mgkbrpyydhibn\",\"healthCheckStableDuration\":\"qqkpikadrg\",\"healthCheckRetryTimeout\":\"tqagnbuynh\",\"upgradeTimeout\":\"jggmebfsiarbu\",\"upgradeDomainTimeout\":\"rcvpnazzmhjrunmp\"},\"instanceCloseDelayDuration\":79694980854382594,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":5309093572451246570,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"xmyskp\",\"principalId\":\"henbtkcxywnytn\"}]},\"location\":\"yn\",\"tags\":{\"dbabp\":\"dybyxczfclhaa\",\"fkts\":\"lwrq\",\"nyyazttbtwwrqpue\":\"hsucoc\"},\"id\":\"kzywbiex\",\"name\":\"fey\",\"type\":\"eaxib\"},{\"identity\":{\"principalId\":\"wbhqwal\",\"tenantId\":\"zyoxaepdkzjan\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"dbpgnxytxhp\":{\"principalId\":\"wbavxbniwdj\",\"clientId\":\"zt\"},\"wtctyqi\":{\"principalId\":\"bzpfzab\",\"clientId\":\"cuh\"},\"kfplgmgsxnk\":{\"principalId\":\"bbovplwzbhvgyugu\",\"clientId\":\"vmkfssxqu\"},\"zb\":{\"principalId\":\"kde\",\"clientId\":\"pvlopwiyighxpkd\"}}},\"properties\":{\"provisioningState\":\"ebb\",\"version\":\"m\",\"parameters\":{\"txp\":\"upedeojnabckhs\",\"tfhvpesapskrdqmh\":\"ie\",\"tkncwsc\":\"jdhtldwkyzxu\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1610345619,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":868520929,\"maxPercentUnhealthyPartitionsPerService\":1413439990,\"maxPercentUnhealthyReplicasPerPartition\":143506612},\"serviceTypeHealthPolicyMap\":{\"qsx\":{\"maxPercentUnhealthyServices\":918188408,\"maxPercentUnhealthyPartitionsPerService\":1309356083,\"maxPercentUnhealthyReplicasPerPartition\":354304408},\"cykvceo\":{\"maxPercentUnhealthyServices\":823053391,\"maxPercentUnhealthyPartitionsPerService\":1364621442,\"maxPercentUnhealthyReplicasPerPartition\":208644200},\"ovnotyfjfcnjbkcn\":{\"maxPercentUnhealthyServices\":579723655,\"maxPercentUnhealthyPartitionsPerService\":1739821364,\"maxPercentUnhealthyReplicasPerPartition\":512901185},\"ttkphywpnvjtoqne\":{\"maxPercentUnhealthyServices\":949474495,\"maxPercentUnhealthyPartitionsPerService\":95653514,\"maxPercentUnhealthyReplicasPerPartition\":898184523}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"plpho\",\"healthCheckStableDuration\":\"uscrpabgyepsb\",\"healthCheckRetryTimeout\":\"tazqugxywpmueefj\",\"upgradeTimeout\":\"wfqkquj\",\"upgradeDomainTimeout\":\"dsuyonobgla\"},\"instanceCloseDelayDuration\":3064589321807470193,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":7428332481829076684,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"ytlmoyrxvwfud\",\"principalId\":\"pz\"}]},\"location\":\"xhdzhlrqjbhckf\",\"tags\":{\"ca\":\"rxsbkyvp\",\"b\":\"uzbpzkafku\"},\"id\":\"nwbmeh\",\"name\":\"seyvj\",\"type\":\"srtslhspkdeem\"}],\"nextLink\":\"fm\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"dkirsoodqxhcr\",\"version\":\"ohjtckw\",\"parameters\":{\"bznorcjxvsnby\":\"oifiyipjxsqwpgr\",\"cyshurzafbljjgp\":\"qabnmoc\",\"bqidtqaj\":\"toqcjmklja\",\"khbzhfepgzg\":\"yulpkudjkr\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1025748151,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":208705149,\"maxPercentUnhealthyPartitionsPerService\":1054800376,\"maxPercentUnhealthyReplicasPerPartition\":1323879070},\"serviceTypeHealthPolicyMap\":{\"rhhbcs\":{\"maxPercentUnhealthyServices\":1841580602,\"maxPercentUnhealthyPartitionsPerService\":1853852705,\"maxPercentUnhealthyReplicasPerPartition\":812550328},\"majtjaod\":{\"maxPercentUnhealthyServices\":45768072,\"maxPercentUnhealthyPartitionsPerService\":526297458,\"maxPercentUnhealthyReplicasPerPartition\":411376072}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"dxkqpx\",\"healthCheckStableDuration\":\"kajionpim\",\"healthCheckRetryTimeout\":\"xg\",\"upgradeTimeout\":\"txgcpodgmaajr\",\"upgradeDomainTimeout\":\"vdjwzrlovm\"},\"instanceCloseDelayDuration\":5238657988148777604,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5708435951542323225,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"zaqsqsycbkbfk\",\"principalId\":\"ukdkexxppofmxa\"},{\"name\":\"c\",\"principalId\":\"jpgd\"},{\"name\":\"toc\",\"principalId\":\"j\"},{\"name\":\"hvpmoue\",\"principalId\":\"hd\"}]},\"tags\":{\"jnxqbzvddntwn\":\"bqe\"},\"identity\":{\"principalId\":\"cbtwnpzaoqvuh\",\"tenantId\":\"cffcyddglmj\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"xuigdtopbobj\":{\"principalId\":\"pyeicxm\",\"clientId\":\"iwqvhkh\"}}},\"location\":\"hm\",\"id\":\"u\",\"name\":\"m\",\"type\":\"uhrzayvvt\"},{\"properties\":{\"provisioningState\":\"dfgiot\",\"version\":\"tutqxlngxlefgug\",\"parameters\":{\"i\":\"rxdq\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":1389822474,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1160468590,\"maxPercentUnhealthyPartitionsPerService\":2050810494,\"maxPercentUnhealthyReplicasPerPartition\":578713052},\"serviceTypeHealthPolicyMap\":{\"yb\":{\"maxPercentUnhealthyServices\":552309473,\"maxPercentUnhealthyPartitionsPerService\":1245336174,\"maxPercentUnhealthyReplicasPerPartition\":1546969178},\"oqfbowskanyk\":{\"maxPercentUnhealthyServices\":1370032032,\"maxPercentUnhealthyPartitionsPerService\":837766841,\"maxPercentUnhealthyReplicasPerPartition\":212297341}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"iywgqywgndrvynh\",\"healthCheckStableDuration\":\"gpphrcgyn\",\"healthCheckRetryTimeout\":\"ocpecfvmmco\",\"upgradeTimeout\":\"fsxlzevgbmqjqa\",\"upgradeDomainTimeout\":\"c\"},\"instanceCloseDelayDuration\":2539087817926802481,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":3004694734231136598,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"fwnfnb\",\"principalId\":\"cfionl\"}]},\"tags\":{\"qqwx\":\"etqgtzxdpnq\"},\"identity\":{\"principalId\":\"eallnwsubisnj\",\"tenantId\":\"pmng\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ea\":{\"principalId\":\"qwoochcbon\",\"clientId\":\"pkvlrxn\"},\"jumasx\":{\"principalId\":\"ipheoflokeyyien\",\"clientId\":\"dlwtgrhpdj\"},\"xhejjzzvdud\":{\"principalId\":\"jpqyegu\",\"clientId\":\"hb\"},\"xnltyfsoppu\":{\"principalId\":\"dslfhotwmcy\",\"clientId\":\"wlbjnpgacftade\"}}},\"location\":\"esnzwde\",\"id\":\"avo\",\"name\":\"xzdmohctb\",\"type\":\"vudwx\"},{\"properties\":{\"provisioningState\":\"nvowgujju\",\"version\":\"dkcglhsl\",\"parameters\":{\"fqweykhmene\":\"dyggdtjixhbku\",\"cibvyvdcsitynn\":\"fyexfwhy\",\"f\":\"amdecte\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":993666965,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":230831104,\"maxPercentUnhealthyPartitionsPerService\":1266013577,\"maxPercentUnhealthyReplicasPerPartition\":796129419},\"serviceTypeHealthPolicyMap\":{\"gqhcjrefovg\":{\"maxPercentUnhealthyServices\":1363658384,\"maxPercentUnhealthyPartitionsPerService\":732207919,\"maxPercentUnhealthyReplicasPerPartition\":902064602},\"leyyvx\":{\"maxPercentUnhealthyServices\":509090660,\"maxPercentUnhealthyPartitionsPerService\":668805249,\"maxPercentUnhealthyReplicasPerPartition\":545322213},\"k\":{\"maxPercentUnhealthyServices\":1769493620,\"maxPercentUnhealthyPartitionsPerService\":440516085,\"maxPercentUnhealthyReplicasPerPartition\":704885083},\"pngjcrcczsqpjhvm\":{\"maxPercentUnhealthyServices\":1493374876,\"maxPercentUnhealthyPartitionsPerService\":203599917,\"maxPercentUnhealthyReplicasPerPartition\":1721979703}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"ysou\",\"healthCheckStableDuration\":\"q\",\"healthCheckRetryTimeout\":\"canoaeupf\",\"upgradeTimeout\":\"yhltrpmopjmcm\",\"upgradeDomainTimeout\":\"tuo\"},\"instanceCloseDelayDuration\":2607649356608262418,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":405552050512626201,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"pk\",\"principalId\":\"xodpuozmyzydagfu\"},{\"name\":\"xbezyiuokktwh\",\"principalId\":\"dxwzywqsmbsurexi\"}]},\"tags\":{\"fksymddystki\":\"yocf\",\"yudxorrqnbp\":\"uxh\",\"vkd\":\"czvyifq\",\"d\":\"jsllrmv\"},\"identity\":{\"principalId\":\"t\",\"tenantId\":\"n\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"j\":{\"principalId\":\"bczw\",\"clientId\":\"uwiqzb\"},\"hzdobpxjmflbvvnc\":{\"principalId\":\"ovm\",\"clientId\":\"kacspkw\"}}},\"location\":\"kcciwwzjuqkhr\",\"id\":\"jiwkuofoskghsau\",\"name\":\"imjm\",\"type\":\"xieduugidyjrr\"}],\"nextLink\":\"y\"}") .toObject(ApplicationResourceList.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("scjeypv", model.value().get(0).location()); - Assertions.assertEquals("rkgqhcjrefo", model.value().get(0).tags().get("gm")); - Assertions.assertEquals("mivkwlzuvcc", model.value().get(0).version()); - Assertions.assertEquals("fnba", model.value().get(0).parameters().get("fionl")); - Assertions.assertEquals(true, + Assertions.assertEquals("bqe", model.value().get(0).tags().get("jnxqbzvddntwn")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("hm", model.value().get(0).location()); + Assertions.assertEquals("ohjtckw", model.value().get(0).version()); + Assertions.assertEquals("oifiyipjxsqwpgr", model.value().get(0).parameters().get("bznorcjxvsnby")); + Assertions.assertEquals(false, model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(354708232, + Assertions.assertEquals(1025748151, model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1285754335, + Assertions.assertEquals(208705149, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(290307035, + Assertions.assertEquals(1054800376, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(147839675, + Assertions.assertEquals(1323879070, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(203992895, + Assertions.assertEquals(1841580602, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") + .get("rhhbcs") .maxPercentUnhealthyServices()); - Assertions.assertEquals(798552756, + Assertions.assertEquals(1853852705, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") + .get("rhhbcs") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(885958486, + Assertions.assertEquals(812550328, model.value() .get(0) .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") + .get("rhhbcs") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertEquals(true, model.value().get(0).upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.ROLLBACK, + Assertions.assertEquals(FailureAction.MANUAL, model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ftadehxnltyfs", + Assertions.assertEquals("dxkqpx", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("ppusuesnzwdejba", + Assertions.assertEquals("kajionpim", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("orxzdmohctbqvud", + Assertions.assertEquals("xg", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xdn", + Assertions.assertEquals("txgcpodgmaajr", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("nvowgujju", + Assertions.assertEquals("vdjwzrlovm", model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(8288430656102622571L, + Assertions.assertEquals(5238657988148777604L, model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.value().get(0).upgradePolicy().upgradeMode()); - Assertions.assertEquals(4728072908166109395L, + Assertions.assertEquals(5708435951542323225L, model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(false, model.value().get(0).upgradePolicy().recreateApplication()); - Assertions.assertEquals("dyggdtjixhbku", model.value().get(0).managedIdentities().get(0).name()); - Assertions.assertEquals("fqweykhmene", model.value().get(0).managedIdentities().get(0).principalId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationResourceList model - = new ApplicationResourceList() - .withValue(Arrays.asList( - new ApplicationResourceInner() - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("sxlzevgbmqj", new UserAssignedIdentity()))) - .withLocation("scjeypv") - .withTags( - mapOf("gm", "rkgqhcjrefo", "yyvxyqjpkcattpn", "qsl", "v", "jcrcczsqpjhvmda", "q", "ysou")) - .withVersion("mivkwlzuvcc") - .withParameters(mapOf("fionl", "fnba", "bqqwxrj", "bxetqgtzxdpn", "mpmngnzscxaqwoo", - "eallnwsubisnj", "njeaseipheofloke", "hcbonqvpkvlr")) - .withUpgradePolicy( - new ApplicationUpgradePolicy() - .withApplicationHealthPolicy( - new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(354708232) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1285754335) - .withMaxPercentUnhealthyPartitionsPerService(290307035) - .withMaxPercentUnhealthyReplicasPerPartition(147839675)) - .withServiceTypeHealthPolicyMap(mapOf("pdjpjumasxazjp", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(203992895) - .withMaxPercentUnhealthyPartitionsPerService(798552756) - .withMaxPercentUnhealthyReplicasPerPartition(885958486), - "ualhbxxhejj", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1063088657) - .withMaxPercentUnhealthyPartitionsPerService(184362773) - .withMaxPercentUnhealthyReplicasPerPartition(973371108), - "udgwdslfho", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2029322855) - .withMaxPercentUnhealthyPartitionsPerService(57336706) - .withMaxPercentUnhealthyReplicasPerPartition(873426494), - "ynpwlbj", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(719647330) - .withMaxPercentUnhealthyPartitionsPerService(743935236) - .withMaxPercentUnhealthyReplicasPerPartition(470013493)))) - .withForceRestart(true) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("ftadehxnltyfs") - .withHealthCheckStableDuration("ppusuesnzwdejba") - .withHealthCheckRetryTimeout("orxzdmohctbqvud") - .withUpgradeTimeout("xdn") - .withUpgradeDomainTimeout("nvowgujju")) - .withInstanceCloseDelayDuration(8288430656102622571L) - .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(4728072908166109395L) - .withRecreateApplication(false)) - .withManagedIdentities(Arrays - .asList( - new ApplicationUserAssignedIdentity().withName("dyggdtjixhbku") - .withPrincipalId("fqweykhmene"), - new ApplicationUserAssignedIdentity().withName("fyexfwhy") - .withPrincipalId("cibvyvdcsitynn"), - new ApplicationUserAssignedIdentity().withName("amdecte").withPrincipalId("f"))), - new ApplicationResourceInner() - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.NONE) - .withUserAssignedIdentities(mapOf("ywqsmbsurexim", new UserAssignedIdentity(), "ys", - new UserAssignedIdentity(), "oczvy", new UserAssignedIdentity()))) - .withLocation("ukgjnpiucgygevq") - .withTags(mapOf("rbpizc", "yp", "j", "r", "yhxdeoejzicwi", "dpydn", "bkh", "sjttgzfbish")) - .withVersion("d") - .withParameters(mapOf("pnpulexxbczwtru", "t", "vsovmyokac", "iqzbq")) - .withUpgradePolicy(new ApplicationUpgradePolicy() - .withApplicationHealthPolicy( - new ApplicationHealthPolicy().withConsiderWarningAsError(false) - .withMaxPercentUnhealthyDeployedApplications(1783138805) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2100121858) - .withMaxPercentUnhealthyPartitionsPerService(1196709774) - .withMaxPercentUnhealthyReplicasPerPartition(950671055)) - .withServiceTypeHealthPolicyMap( - mapOf("flbvvnchrkcciwwz", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2009602222) - .withMaxPercentUnhealthyPartitionsPerService(432282678) - .withMaxPercentUnhealthyReplicasPerPartition(1280128063), - "hrsajiwkuofo", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(970071122) - .withMaxPercentUnhealthyPartitionsPerService(982290440) - .withMaxPercentUnhealthyReplicasPerPartition(962380204), - "sauuimj", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(364064517) - .withMaxPercentUnhealthyPartitionsPerService(1637974204) - .withMaxPercentUnhealthyReplicasPerPartition(1433992289), - "eduugi", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(981074224) - .withMaxPercentUnhealthyPartitionsPerService(1194326763) - .withMaxPercentUnhealthyReplicasPerPartition(586679230)))) - .withForceRestart(true) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy() - .withFailureAction(FailureAction.MANUAL) - .withHealthCheckWaitDuration("f") - .withHealthCheckStableDuration("y") - .withHealthCheckRetryTimeout("osvexcsonpclhoc") - .withUpgradeTimeout("hslkevleggzf") - .withUpgradeDomainTimeout("u")) - .withInstanceCloseDelayDuration(5326513191162029025L) - .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(662353480914174128L) - .withRecreateApplication(true)) - .withManagedIdentities(Arrays.asList(new ApplicationUserAssignedIdentity() - .withName("th") - .withPrincipalId("vmezy"), - new ApplicationUserAssignedIdentity() - .withName("shxmzsbbzoggigrx") - .withPrincipalId("burvjxxjnspy"), - new ApplicationUserAssignedIdentity().withName( - "ptkoenkoukn").withPrincipalId("udwtiukbl"), - new ApplicationUserAssignedIdentity().withName("ngkpocipazy").withPrincipalId("o"))), - new ApplicationResourceInner() - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ryavwhheunmmqh", new UserAssignedIdentity(), "szfkbe", - new UserAssignedIdentity(), "frzpwvlqdqgb", new UserAssignedIdentity(), "jf", - new UserAssignedIdentity()))) - .withLocation("yn") - .withTags(mapOf("dbabp", "dybyxczfclhaa", "fkts", "lwrq", "nyyazttbtwwrqpue", "hsucoc")) - .withVersion("txfvjrbirph") - .withParameters( - mapOf( - "vahfn", "c", "xjvuujqgidokg", "jky", "sncghkjeszz", "ljyoxgvcltb", "mxnehmp", - "bijhtxfvgxbf")) - .withUpgradePolicy( - new ApplicationUpgradePolicy() - .withApplicationHealthPolicy( - new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(1534633799) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1976417253) - .withMaxPercentUnhealthyPartitionsPerService(68854326) - .withMaxPercentUnhealthyReplicasPerPartition(1592452117)) - .withServiceTypeHealthPolicyMap( - mapOf("bmpukgriwflz", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(398257944) - .withMaxPercentUnhealthyPartitionsPerService(898595537) - .withMaxPercentUnhealthyReplicasPerPartition(156663672), - "zpuzycisp", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(905507147) - .withMaxPercentUnhealthyPartitionsPerService(595725350) - .withMaxPercentUnhealthyReplicasPerPartition(294567134)))) - .withForceRestart(true) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) - .withHealthCheckWaitDuration("mgkbrpyydhibn") - .withHealthCheckStableDuration("qqkpikadrg") - .withHealthCheckRetryTimeout("tqagnbuynh") - .withUpgradeTimeout("jggmebfsiarbu") - .withUpgradeDomainTimeout("rcvpnazzmhjrunmp")) - .withInstanceCloseDelayDuration(79694980854382594L) - .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) - .withUpgradeReplicaSetCheckTimeout(5309093572451246570L) - .withRecreateApplication(true)) - .withManagedIdentities( - Arrays - .asList(new ApplicationUserAssignedIdentity().withName("xmyskp") - .withPrincipalId("henbtkcxywnytn"))), - new ApplicationResourceInner() - .withIdentity( - new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("dbpgnxytxhp", new UserAssignedIdentity(), "wtctyqi", - new UserAssignedIdentity(), "kfplgmgsxnk", new UserAssignedIdentity(), "zb", - new UserAssignedIdentity()))) - .withLocation("xhdzhlrqjbhckf") - .withTags(mapOf("ca", "rxsbkyvp", "b", "uzbpzkafku")) - .withVersion("m") - .withParameters( - mapOf("txp", "upedeojnabckhs", "tfhvpesapskrdqmh", "ie", "tkncwsc", "jdhtldwkyzxu")) - .withUpgradePolicy( - new ApplicationUpgradePolicy() - .withApplicationHealthPolicy( - new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(1610345619) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(868520929) - .withMaxPercentUnhealthyPartitionsPerService(1413439990) - .withMaxPercentUnhealthyReplicasPerPartition(143506612)) - .withServiceTypeHealthPolicyMap(mapOf("qsx", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(918188408) - .withMaxPercentUnhealthyPartitionsPerService(1309356083) - .withMaxPercentUnhealthyReplicasPerPartition(354304408), - "cykvceo", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(823053391) - .withMaxPercentUnhealthyPartitionsPerService(1364621442) - .withMaxPercentUnhealthyReplicasPerPartition(208644200), - "ovnotyfjfcnjbkcn", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(579723655) - .withMaxPercentUnhealthyPartitionsPerService(1739821364) - .withMaxPercentUnhealthyReplicasPerPartition(512901185), - "ttkphywpnvjtoqne", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(949474495) - .withMaxPercentUnhealthyPartitionsPerService(95653514) - .withMaxPercentUnhealthyReplicasPerPartition(898184523)))) - .withForceRestart(false) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("plpho") - .withHealthCheckStableDuration("uscrpabgyepsb") - .withHealthCheckRetryTimeout("tazqugxywpmueefj") - .withUpgradeTimeout("wfqkquj") - .withUpgradeDomainTimeout("dsuyonobgla")) - .withInstanceCloseDelayDuration(3064589321807470193L) - .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(7428332481829076684L) - .withRecreateApplication(true)) - .withManagedIdentities(Arrays.asList( - new ApplicationUserAssignedIdentity().withName("ytlmoyrxvwfud").withPrincipalId("pz"))))); - model = BinaryData.fromObject(model).toObject(ApplicationResourceList.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("scjeypv", model.value().get(0).location()); - Assertions.assertEquals("rkgqhcjrefo", model.value().get(0).tags().get("gm")); - Assertions.assertEquals("mivkwlzuvcc", model.value().get(0).version()); - Assertions.assertEquals("fnba", model.value().get(0).parameters().get("fionl")); - Assertions.assertEquals(true, - model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(354708232, - model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1285754335, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .defaultServiceTypeHealthPolicy() - .maxPercentUnhealthyServices()); - Assertions.assertEquals(290307035, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .defaultServiceTypeHealthPolicy() - .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(147839675, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .defaultServiceTypeHealthPolicy() - .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(203992895, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") - .maxPercentUnhealthyServices()); - Assertions.assertEquals(798552756, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") - .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(885958486, - model.value() - .get(0) - .upgradePolicy() - .applicationHealthPolicy() - .serviceTypeHealthPolicyMap() - .get("pdjpjumasxazjp") - .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(true, model.value().get(0).upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.ROLLBACK, - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ftadehxnltyfs", - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("ppusuesnzwdejba", - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("orxzdmohctbqvud", - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xdn", - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("nvowgujju", - model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(8288430656102622571L, - model.value().get(0).upgradePolicy().instanceCloseDelayDuration()); - Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.value().get(0).upgradePolicy().upgradeMode()); - Assertions.assertEquals(4728072908166109395L, - model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertEquals(false, model.value().get(0).upgradePolicy().recreateApplication()); - Assertions.assertEquals("dyggdtjixhbku", model.value().get(0).managedIdentities().get(0).name()); - Assertions.assertEquals("fqweykhmene", model.value().get(0).managedIdentities().get(0).principalId()); - } - - // 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; + Assertions.assertEquals("zaqsqsycbkbfk", model.value().get(0).managedIdentities().get(0).name()); + Assertions.assertEquals("ukdkexxppofmxa", model.value().get(0).managedIdentities().get(0).principalId()); + Assertions.assertEquals("y", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourcePropertiesTests.java index f61c7ae153e3..fe343eb42ce1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationResourcePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -22,161 +22,167 @@ public final class ApplicationResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationResourceProperties model = BinaryData.fromString( - "{\"provisioningState\":\"dwzjeiach\",\"version\":\"osfln\",\"parameters\":{\"hzzvypyq\":\"fqpte\",\"z\":\"i\",\"dqxhcrmnohjtckwh\":\"npvswjdkirso\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1580515344,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":614073164,\"maxPercentUnhealthyPartitionsPerService\":62079989,\"maxPercentUnhealthyReplicasPerPartition\":1667085881},\"serviceTypeHealthPolicyMap\":{\"pgrjbz\":{\"maxPercentUnhealthyServices\":1921161938,\"maxPercentUnhealthyPartitionsPerService\":17169424,\"maxPercentUnhealthyReplicasPerPartition\":66732180},\"jxvsnbyxqabn\":{\"maxPercentUnhealthyServices\":343761655,\"maxPercentUnhealthyPartitionsPerService\":1424270489,\"maxPercentUnhealthyReplicasPerPartition\":969861111},\"cyshurzafbljjgp\":{\"maxPercentUnhealthyServices\":1299140464,\"maxPercentUnhealthyPartitionsPerService\":769076909,\"maxPercentUnhealthyReplicasPerPartition\":1412724720},\"c\":{\"maxPercentUnhealthyServices\":391171694,\"maxPercentUnhealthyPartitionsPerService\":293333183,\"maxPercentUnhealthyReplicasPerPartition\":1002684048}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"a\",\"healthCheckStableDuration\":\"bqidtqaj\",\"healthCheckRetryTimeout\":\"yulpkudjkr\",\"upgradeTimeout\":\"khbzhfepgzg\",\"upgradeDomainTimeout\":\"e\"},\"instanceCloseDelayDuration\":4405554762008371586,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":643106143486636349,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"hhbcsglummajtjao\",\"principalId\":\"xobnbdxkqpxok\"},{\"name\":\"jionpimexgstxgc\",\"principalId\":\"odgmaajrmvdjwz\"}]}") + "{\"provisioningState\":\"xzxtheo\",\"version\":\"si\",\"parameters\":{\"ciqihnhung\":\"v\",\"mvtzfkufub\":\"wjzrnfygxgisp\",\"fjaeq\":\"jofxqe\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":158340850,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":5903092,\"maxPercentUnhealthyPartitionsPerService\":91789189,\"maxPercentUnhealthyReplicasPerPartition\":1154409847},\"serviceTypeHealthPolicyMap\":{\"lngsntnbybkzgcwr\":{\"maxPercentUnhealthyServices\":928331689,\"maxPercentUnhealthyPartitionsPerService\":1952793695,\"maxPercentUnhealthyReplicasPerPartition\":2070892597},\"xwrljdouskcqvkoc\":{\"maxPercentUnhealthyServices\":306155012,\"maxPercentUnhealthyPartitionsPerService\":1161449621,\"maxPercentUnhealthyReplicasPerPartition\":967406306},\"kwt\":{\"maxPercentUnhealthyServices\":1419244382,\"maxPercentUnhealthyPartitionsPerService\":1066142513,\"maxPercentUnhealthyReplicasPerPartition\":1012894603}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"jbiksqrglssai\",\"healthCheckStableDuration\":\"qpjwnzlljfm\",\"healthCheckRetryTimeout\":\"pee\",\"upgradeTimeout\":\"vmgxsab\",\"upgradeDomainTimeout\":\"yqduujit\"},\"instanceCloseDelayDuration\":6217208352538226041,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":4308312091572651603,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"wpdappdsbdkv\",\"principalId\":\"rwjfe\"},{\"name\":\"snhu\",\"principalId\":\"je\"},{\"name\":\"tmrldhugjzzdatq\",\"principalId\":\"hocdgeab\"},{\"name\":\"gphuticndvka\",\"principalId\":\"zwyiftyhxhur\"}]}") .toObject(ApplicationResourceProperties.class); - Assertions.assertEquals("osfln", model.version()); - Assertions.assertEquals("fqpte", model.parameters().get("hzzvypyq")); + Assertions.assertEquals("si", model.version()); + Assertions.assertEquals("v", model.parameters().get("ciqihnhung")); Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1580515344, + Assertions.assertEquals(158340850, model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(614073164, + Assertions.assertEquals(5903092, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(62079989, + Assertions.assertEquals(91789189, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1667085881, + Assertions.assertEquals(1154409847, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1921161938, + Assertions.assertEquals(928331689, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyServices()); - Assertions.assertEquals(17169424, + Assertions.assertEquals(1952793695, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(66732180, + Assertions.assertEquals(2070892597, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(false, model.upgradePolicy().forceRestart()); + Assertions.assertEquals(true, model.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("a", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("bqidtqaj", + Assertions.assertEquals("jbiksqrglssai", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("qpjwnzlljfm", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("yulpkudjkr", + Assertions.assertEquals("pee", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("khbzhfepgzg", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("e", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(4405554762008371586L, model.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals("vmgxsab", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("yqduujit", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(6217208352538226041L, model.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode()); - Assertions.assertEquals(643106143486636349L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertEquals(true, model.upgradePolicy().recreateApplication()); - Assertions.assertEquals("hhbcsglummajtjao", model.managedIdentities().get(0).name()); - Assertions.assertEquals("xobnbdxkqpxok", model.managedIdentities().get(0).principalId()); + Assertions.assertEquals(4308312091572651603L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(false, model.upgradePolicy().recreateApplication()); + Assertions.assertEquals("wpdappdsbdkv", model.managedIdentities().get(0).name()); + Assertions.assertEquals("rwjfe", model.managedIdentities().get(0).principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationResourceProperties model = new ApplicationResourceProperties().withVersion("osfln") - .withParameters(mapOf("hzzvypyq", "fqpte", "z", "i", "dqxhcrmnohjtckwh", "npvswjdkirso")) - .withUpgradePolicy(new ApplicationUpgradePolicy() - .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(1580515344) - .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(614073164) - .withMaxPercentUnhealthyPartitionsPerService(62079989) - .withMaxPercentUnhealthyReplicasPerPartition(1667085881)) - .withServiceTypeHealthPolicyMap(mapOf("pgrjbz", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1921161938) - .withMaxPercentUnhealthyPartitionsPerService(17169424) - .withMaxPercentUnhealthyReplicasPerPartition(66732180), - "jxvsnbyxqabn", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(343761655) - .withMaxPercentUnhealthyPartitionsPerService(1424270489) - .withMaxPercentUnhealthyReplicasPerPartition(969861111), - "cyshurzafbljjgp", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1299140464) - .withMaxPercentUnhealthyPartitionsPerService(769076909) - .withMaxPercentUnhealthyReplicasPerPartition(1412724720), - "c", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(391171694) - .withMaxPercentUnhealthyPartitionsPerService(293333183) - .withMaxPercentUnhealthyReplicasPerPartition(1002684048)))) - .withForceRestart(false) - .withRollingUpgradeMonitoringPolicy( - new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) - .withHealthCheckWaitDuration("a") - .withHealthCheckStableDuration("bqidtqaj") - .withHealthCheckRetryTimeout("yulpkudjkr") - .withUpgradeTimeout("khbzhfepgzg") - .withUpgradeDomainTimeout("e")) - .withInstanceCloseDelayDuration(4405554762008371586L) - .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) - .withUpgradeReplicaSetCheckTimeout(643106143486636349L) - .withRecreateApplication(true)) - .withManagedIdentities(Arrays.asList( - new ApplicationUserAssignedIdentity().withName("hhbcsglummajtjao").withPrincipalId("xobnbdxkqpxok"), - new ApplicationUserAssignedIdentity().withName("jionpimexgstxgc").withPrincipalId("odgmaajrmvdjwz"))); + ApplicationResourceProperties model + = new ApplicationResourceProperties().withVersion("si") + .withParameters(mapOf("ciqihnhung", "v", "mvtzfkufub", "wjzrnfygxgisp", "fjaeq", "jofxqe")) + .withUpgradePolicy( + new ApplicationUpgradePolicy() + .withApplicationHealthPolicy( + new ApplicationHealthPolicy().withConsiderWarningAsError(true) + .withMaxPercentUnhealthyDeployedApplications(158340850) + .withDefaultServiceTypeHealthPolicy( + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(5903092) + .withMaxPercentUnhealthyPartitionsPerService(91789189) + .withMaxPercentUnhealthyReplicasPerPartition(1154409847)) + .withServiceTypeHealthPolicyMap( + mapOf("lngsntnbybkzgcwr", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(928331689) + .withMaxPercentUnhealthyPartitionsPerService(1952793695) + .withMaxPercentUnhealthyReplicasPerPartition(2070892597), + "xwrljdouskcqvkoc", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(306155012) + .withMaxPercentUnhealthyPartitionsPerService(1161449621) + .withMaxPercentUnhealthyReplicasPerPartition(967406306), + "kwt", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1419244382) + .withMaxPercentUnhealthyPartitionsPerService(1066142513) + .withMaxPercentUnhealthyReplicasPerPartition(1012894603)))) + .withForceRestart(true) + .withRollingUpgradeMonitoringPolicy( + new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) + .withHealthCheckWaitDuration("jbiksqrglssai") + .withHealthCheckStableDuration("qpjwnzlljfm") + .withHealthCheckRetryTimeout("pee") + .withUpgradeTimeout("vmgxsab") + .withUpgradeDomainTimeout("yqduujit")) + .withInstanceCloseDelayDuration(6217208352538226041L) + .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) + .withUpgradeReplicaSetCheckTimeout(4308312091572651603L) + .withRecreateApplication(false)) + .withManagedIdentities(Arrays.asList( + new ApplicationUserAssignedIdentity().withName("wpdappdsbdkv").withPrincipalId("rwjfe"), + new ApplicationUserAssignedIdentity().withName("snhu").withPrincipalId("je"), + new ApplicationUserAssignedIdentity().withName("tmrldhugjzzdatq").withPrincipalId("hocdgeab"), + new ApplicationUserAssignedIdentity().withName("gphuticndvka").withPrincipalId("zwyiftyhxhur"))); model = BinaryData.fromObject(model).toObject(ApplicationResourceProperties.class); - Assertions.assertEquals("osfln", model.version()); - Assertions.assertEquals("fqpte", model.parameters().get("hzzvypyq")); + Assertions.assertEquals("si", model.version()); + Assertions.assertEquals("v", model.parameters().get("ciqihnhung")); Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1580515344, + Assertions.assertEquals(158340850, model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(614073164, + Assertions.assertEquals(5903092, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(62079989, + Assertions.assertEquals(91789189, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1667085881, + Assertions.assertEquals(1154409847, model.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1921161938, + Assertions.assertEquals(928331689, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyServices()); - Assertions.assertEquals(17169424, + Assertions.assertEquals(1952793695, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(66732180, + Assertions.assertEquals(2070892597, model.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("pgrjbz") + .get("lngsntnbybkzgcwr") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(false, model.upgradePolicy().forceRestart()); + Assertions.assertEquals(true, model.upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.MANUAL, model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("a", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("bqidtqaj", + Assertions.assertEquals("jbiksqrglssai", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("qpjwnzlljfm", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("yulpkudjkr", + Assertions.assertEquals("pee", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("khbzhfepgzg", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("e", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(4405554762008371586L, model.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals("vmgxsab", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("yqduujit", + model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(6217208352538226041L, model.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode()); - Assertions.assertEquals(643106143486636349L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertEquals(true, model.upgradePolicy().recreateApplication()); - Assertions.assertEquals("hhbcsglummajtjao", model.managedIdentities().get(0).name()); - Assertions.assertEquals("xobnbdxkqpxok", model.managedIdentities().get(0).principalId()); + Assertions.assertEquals(4308312091572651603L, model.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(false, model.upgradePolicy().recreateApplication()); + Assertions.assertEquals("wpdappdsbdkv", model.managedIdentities().get(0).name()); + Assertions.assertEquals("rwjfe", model.managedIdentities().get(0).principalId()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java index 7d8a412acc67..92a2a5828d17 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceInnerTests.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.servicefabricmanagedclusters.generated; @@ -14,19 +14,20 @@ public final class ApplicationTypeResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"hq\"},\"location\":\"gjxpybczmehmt\",\"tags\":{\"hphoycm\":\"bsphrupidgsybbe\",\"htbmuf\":\"xaobhdxbmtqioqjz\",\"rxybqsoq\":\"ownoizhw\"},\"id\":\"gkdmb\",\"name\":\"azlobcufpdznrbt\",\"type\":\"qqjnqgl\"}") + "{\"properties\":{\"provisioningState\":\"kevle\"},\"tags\":{\"ithlvmezyvshxm\":\"fbuhfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"location\":\"burvjxxjnspy\",\"id\":\"tko\",\"name\":\"nkoukn\",\"type\":\"udwtiukbl\"}") .toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("gjxpybczmehmt", model.location()); - Assertions.assertEquals("bsphrupidgsybbe", model.tags().get("hphoycm")); + Assertions.assertEquals("fbuhfmvfaxkffe", model.tags().get("ithlvmezyvshxm")); + Assertions.assertEquals("burvjxxjnspy", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeResourceInner model = new ApplicationTypeResourceInner().withLocation("gjxpybczmehmt") - .withTags(mapOf("hphoycm", "bsphrupidgsybbe", "htbmuf", "xaobhdxbmtqioqjz", "rxybqsoq", "ownoizhw")); + ApplicationTypeResourceInner model + = new ApplicationTypeResourceInner().withTags(mapOf("ithlvmezyvshxm", "fbuhfmvfaxkffe", "gigr", "sbbzo")) + .withLocation("burvjxxjnspy"); model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceInner.class); - Assertions.assertEquals("gjxpybczmehmt", model.location()); - Assertions.assertEquals("bsphrupidgsybbe", model.tags().get("hphoycm")); + Assertions.assertEquals("fbuhfmvfaxkffe", model.tags().get("ithlvmezyvshxm")); + Assertions.assertEquals("burvjxxjnspy", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java index 2798ae396a12..6327bbe6ce3d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourceListTests.java @@ -1,46 +1,21 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeResourceList; import org.junit.jupiter.api.Assertions; public final class ApplicationTypeResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"ofcqhsm\"},\"location\":\"rkdtmlxh\",\"tags\":{\"jtxukcdm\":\"k\",\"yrlhmwhfpmrqobm\":\"arcryuanzwuxzdxt\",\"knryrtihfxtij\":\"u\"},\"id\":\"zvgnwzs\",\"name\":\"mglzufcy\",\"type\":\"kohdbiha\"}],\"nextLink\":\"fhfcb\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"p\"},\"tags\":{\"nfyhx\":\"drqjsdpy\"},\"location\":\"oejzi\",\"id\":\"ifsjttgzfbishcb\",\"name\":\"hajdeyeamdpha\",\"type\":\"alpbuxwgipwhon\"},{\"properties\":{\"provisioningState\":\"gshwankixz\"},\"tags\":{\"zoqftiyqzrnkcqvy\":\"jeputtmrywn\",\"lsicohoqqnwv\":\"lwh\",\"yxzk\":\"ryavwhheunmmqh\"},\"location\":\"ocukoklyax\",\"id\":\"onuq\",\"name\":\"zf\",\"type\":\"beypewrmjmw\"},{\"properties\":{\"provisioningState\":\"ektcxsen\"},\"tags\":{\"ylihkaetckt\":\"rsffrzpwvlqdqgbi\"},\"location\":\"civfsnkymuctq\",\"id\":\"fbebrjcxer\",\"name\":\"uwutttxfvjrbi\",\"type\":\"phxepcyvahf\"}],\"nextLink\":\"jky\"}") .toObject(ApplicationTypeResourceList.class); - Assertions.assertEquals("rkdtmlxh", model.value().get(0).location()); - Assertions.assertEquals("k", model.value().get(0).tags().get("jtxukcdm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationTypeResourceList model = new ApplicationTypeResourceList() - .withValue(Arrays.asList(new ApplicationTypeResourceInner().withLocation("rkdtmlxh") - .withTags(mapOf("jtxukcdm", "k", "yrlhmwhfpmrqobm", "arcryuanzwuxzdxt", "knryrtihfxtij", "u")))); - model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceList.class); - Assertions.assertEquals("rkdtmlxh", model.value().get(0).location()); - Assertions.assertEquals("k", model.value().get(0).tags().get("jtxukcdm")); - } - - // 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; + Assertions.assertEquals("drqjsdpy", model.value().get(0).tags().get("nfyhx")); + Assertions.assertEquals("oejzi", model.value().get(0).location()); + Assertions.assertEquals("jky", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java index 58e12ea32b9f..94fbb69c3b64 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeResourcePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -10,7 +10,7 @@ public final class ApplicationTypeResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"gnufoooj\"}") + ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"gkpocipazyxoe\"}") .toObject(ApplicationTypeResourceProperties.class); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java index 1e499931ce3a..fbf7659862b0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -13,18 +13,17 @@ public final class ApplicationTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"xrifkwmrvkts\":\"fsqesaagdfmglzlh\",\"ucmpoyfd\":\"zntocipaouajps\",\"s\":\"fogknygjofjdde\",\"jzyflu\":\"deupewnwrei\"}}") + ApplicationTypeUpdateParameters model = BinaryData.fromString("{\"tags\":{\"npiucgygevqznty\":\"g\"}}") .toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("fsqesaagdfmglzlh", model.tags().get("xrifkwmrvkts")); + Assertions.assertEquals("g", model.tags().get("npiucgygevqznty")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeUpdateParameters model = new ApplicationTypeUpdateParameters().withTags(mapOf("xrifkwmrvkts", - "fsqesaagdfmglzlh", "ucmpoyfd", "zntocipaouajps", "s", "fogknygjofjdde", "jzyflu", "deupewnwrei")); + ApplicationTypeUpdateParameters model + = new ApplicationTypeUpdateParameters().withTags(mapOf("npiucgygevqznty", "g")); model = BinaryData.fromObject(model).toObject(ApplicationTypeUpdateParameters.class); - Assertions.assertEquals("fsqesaagdfmglzlh", model.tags().get("xrifkwmrvkts")); + Assertions.assertEquals("g", model.tags().get("npiucgygevqznty")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java index 577e87280e21..47ff3ce54518 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceInnerTests.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.servicefabricmanagedclusters.generated; @@ -14,22 +14,23 @@ public final class ApplicationTypeVersionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"a\",\"appPackageUrl\":\"ithxqhabifpi\"},\"location\":\"wczbys\",\"tags\":{\"uhivyqniw\":\"q\"},\"id\":\"br\",\"name\":\"xvd\",\"type\":\"mjgr\"}") + "{\"properties\":{\"provisioningState\":\"vuujq\",\"appPackageUrl\":\"idokgjlj\"},\"tags\":{\"bgsncghkjeszzhb\":\"gvcl\",\"mpvecxgodebfqk\":\"jhtxfvgxbfsmxne\"},\"location\":\"bmpukgriwflz\",\"id\":\"bxzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"}") .toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("wczbys", model.location()); - Assertions.assertEquals("q", model.tags().get("uhivyqniw")); - Assertions.assertEquals("ithxqhabifpi", model.appPackageUrl()); + Assertions.assertEquals("gvcl", model.tags().get("bgsncghkjeszzhb")); + Assertions.assertEquals("bmpukgriwflz", model.location()); + Assertions.assertEquals("idokgjlj", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeVersionResourceInner model = new ApplicationTypeVersionResourceInner().withLocation("wczbys") - .withTags(mapOf("uhivyqniw", "q")) - .withAppPackageUrl("ithxqhabifpi"); + ApplicationTypeVersionResourceInner model = new ApplicationTypeVersionResourceInner() + .withTags(mapOf("bgsncghkjeszzhb", "gvcl", "mpvecxgodebfqk", "jhtxfvgxbfsmxne")) + .withLocation("bmpukgriwflz") + .withAppPackageUrl("idokgjlj"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceInner.class); - Assertions.assertEquals("wczbys", model.location()); - Assertions.assertEquals("q", model.tags().get("uhivyqniw")); - Assertions.assertEquals("ithxqhabifpi", model.appPackageUrl()); + Assertions.assertEquals("gvcl", model.tags().get("bgsncghkjeszzhb")); + Assertions.assertEquals("bmpukgriwflz", model.location()); + Assertions.assertEquals("idokgjlj", model.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java index c7832896ea15..b7e7d1333c2e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourceListTests.java @@ -1,55 +1,22 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ApplicationTypeVersionResourceInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ApplicationTypeVersionResourceList; import org.junit.jupiter.api.Assertions; public final class ApplicationTypeVersionResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"atscmd\",\"appPackageUrl\":\"pjhulsuuvmkj\"},\"location\":\"k\",\"tags\":{\"ryo\":\"ndiodjpslwejdpv\"},\"id\":\"soacctazakl\",\"name\":\"lahbcryff\",\"type\":\"fdosyg\"},{\"properties\":{\"provisioningState\":\"aojakhmsbzjhcrz\",\"appPackageUrl\":\"vdphlxaolthqtr\"},\"location\":\"jbp\",\"tags\":{\"n\":\"s\",\"wzo\":\"gvfcj\",\"np\":\"xjtfelluwfzit\",\"lxofpdvhpfxxypin\":\"qfpjk\"},\"id\":\"mayhuybbkpodepoo\",\"name\":\"inuvamiheogn\",\"type\":\"rxzxtheo\"},{\"properties\":{\"provisioningState\":\"ivyevcciqihnhun\",\"appPackageUrl\":\"bwjzr\"},\"location\":\"ygxgispemvtz\",\"tags\":{\"fxqeof\":\"fublj\",\"jqul\":\"aeqjhqjbasvms\"},\"id\":\"sntnbybkzgcw\",\"name\":\"wclxxwrl\",\"type\":\"douskcqvkocrcjdk\"}],\"nextLink\":\"nh\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"zfcl\",\"appPackageUrl\":\"aaxdbabphlwrq\"},\"tags\":{\"yyazttbt\":\"tsthsucocm\",\"ckzywbiexzfeyue\":\"wrqpue\",\"zyoxaepdkzjan\":\"xibxujwbhqwalm\",\"hdwbavxbniwdjs\":\"ux\"},\"location\":\"tsdbpgn\",\"id\":\"txhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"},{\"properties\":{\"provisioningState\":\"plwzbhvgyugu\",\"appPackageUrl\":\"svmkfssxquk\"},\"tags\":{\"mg\":\"l\",\"vlopwiyighx\":\"xnkjzkdesl\",\"upedeojnabckhs\":\"kdwzbaiuebbaumny\"},\"location\":\"xpsiebtfhvpes\",\"id\":\"skrdqmhjj\",\"name\":\"htldwk\",\"type\":\"zxuutkncwscwsvl\"}],\"nextLink\":\"togt\"}") .toObject(ApplicationTypeVersionResourceList.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("ndiodjpslwejdpv", model.value().get(0).tags().get("ryo")); - Assertions.assertEquals("pjhulsuuvmkj", model.value().get(0).appPackageUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationTypeVersionResourceList model = new ApplicationTypeVersionResourceList().withValue(Arrays.asList( - new ApplicationTypeVersionResourceInner().withLocation("k") - .withTags(mapOf("ryo", "ndiodjpslwejdpv")) - .withAppPackageUrl("pjhulsuuvmkj"), - new ApplicationTypeVersionResourceInner().withLocation("jbp") - .withTags(mapOf("n", "s", "wzo", "gvfcj", "np", "xjtfelluwfzit", "lxofpdvhpfxxypin", "qfpjk")) - .withAppPackageUrl("vdphlxaolthqtr"), - new ApplicationTypeVersionResourceInner().withLocation("ygxgispemvtz") - .withTags(mapOf("fxqeof", "fublj", "jqul", "aeqjhqjbasvms")) - .withAppPackageUrl("bwjzr"))); - model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceList.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("ndiodjpslwejdpv", model.value().get(0).tags().get("ryo")); - Assertions.assertEquals("pjhulsuuvmkj", model.value().get(0).appPackageUrl()); - } - - // 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; + Assertions.assertEquals("tsthsucocm", model.value().get(0).tags().get("yyazttbt")); + Assertions.assertEquals("tsdbpgn", model.value().get(0).location()); + Assertions.assertEquals("aaxdbabphlwrq", model.value().get(0).appPackageUrl()); + Assertions.assertEquals("togt", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java index f955bcf8bed6..41aae6fa4546 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionResourcePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -12,16 +12,16 @@ public final class ApplicationTypeVersionResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionResourceProperties model - = BinaryData.fromString("{\"provisioningState\":\"wvukx\",\"appPackageUrl\":\"audccsnhs\"}") + = BinaryData.fromString("{\"provisioningState\":\"ibnuqqkpik\",\"appPackageUrl\":\"drgvtqagn\"}") .toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("audccsnhs", model.appPackageUrl()); + Assertions.assertEquals("drgvtqagn", model.appPackageUrl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionResourceProperties model - = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("audccsnhs"); + = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("drgvtqagn"); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceProperties.class); - Assertions.assertEquals("audccsnhs", model.appPackageUrl()); + Assertions.assertEquals("drgvtqagn", model.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java index 1fb12e706137..2dc6bafbcf3a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -14,18 +14,17 @@ public final class ApplicationTypeVersionUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationTypeVersionUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"yhtnapczwlokjye\":\"yejhk\",\"jnchgej\":\"kkvnipjox\",\"huxinpmqnj\":\"podmailzydehojwy\",\"vcputegj\":\"qwixjspro\"}}") + "{\"tags\":{\"rbu\":\"nhijggmebfsi\",\"ttdbhrbnl\":\"rcvpnazzmhjrunmp\",\"xywnytnrsynlqidy\":\"nkxmyskpbhenbtk\"}}") .toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("yejhk", model.tags().get("yhtnapczwlokjye")); + Assertions.assertEquals("nhijggmebfsi", model.tags().get("rbu")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationTypeVersionUpdateParameters model - = new ApplicationTypeVersionUpdateParameters().withTags(mapOf("yhtnapczwlokjye", "yejhk", "jnchgej", - "kkvnipjox", "huxinpmqnj", "podmailzydehojwy", "vcputegj", "qwixjspro")); + ApplicationTypeVersionUpdateParameters model = new ApplicationTypeVersionUpdateParameters().withTags( + mapOf("rbu", "nhijggmebfsi", "ttdbhrbnl", "rcvpnazzmhjrunmp", "xywnytnrsynlqidy", "nkxmyskpbhenbtk")); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionUpdateParameters.class); - Assertions.assertEquals("yejhk", model.tags().get("yhtnapczwlokjye")); + Assertions.assertEquals("nhijggmebfsi", model.tags().get("rbu")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java index 5b83ab772ac1..0ae27e0815c4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCleanupPolicyTests.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.servicefabricmanagedclusters.generated; @@ -11,16 +11,16 @@ public final class ApplicationTypeVersionsCleanupPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":553025668}") + ApplicationTypeVersionsCleanupPolicy model = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":1783583685}") .toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(553025668, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationTypeVersionsCleanupPolicy model - = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(553025668); + = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(1783583685); model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionsCleanupPolicy.class); - Assertions.assertEquals(553025668, model.maxUnusedVersionsToKeep()); + Assertions.assertEquals(1783583685, model.maxUnusedVersionsToKeep()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java index 7e8869e86b61..5e8be3560749 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsCreateOrUpdateMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,26 +23,26 @@ public final class ApplicationTypeVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"nwy\"},\"location\":\"zdmovzv\",\"tags\":{\"z\":\"awzqadfl\",\"ndtic\":\"riglaec\",\"mldgxobfirc\":\"kpvzmlq\"},\"id\":\"pkc\",\"name\":\"ayzri\",\"type\":\"khyawfvjlboxqv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"appPackageUrl\":\"dosfjbjsvgjrw\"},\"tags\":{\"t\":\"vyc\",\"xgccknfnw\":\"c\",\"fedxihchrphkm\":\"btmvpdvjdhttza\",\"gtgkylkdghr\":\"rjdqnsdfzp\"},\"location\":\"uutlwxezwzhok\",\"id\":\"wnhhtqlgehgppip\",\"name\":\"fhpfeoajvgcxtx\",\"type\":\"csheafidltugsr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .define("mbtrnegvmnvu") - .withExistingApplicationType("xfzwi", "vwzjbhyz", "xjrk") - .withRegion("dmflv") - .withTags(mapOf("pxlktwkuziycsl", "mjlxrrilozapeewc", "uztcktyhjtqed", "vu")) - .withAppPackageUrl("tjb") + .define("pypqtgsfj") + .withExistingApplicationType("itvtzeexavo", "tfgle", "dmdqb") + .withRegion("nhxk") + .withTags(mapOf("gzrcxfailcfxwmdb", "sirudhzmmesckdlp", "lnacgcc", "xdfgsftufqobr")) + .withAppPackageUrl("d") .create(); - Assertions.assertEquals("zdmovzv", response.location()); - Assertions.assertEquals("awzqadfl", response.tags().get("z")); - Assertions.assertEquals("nwy", response.appPackageUrl()); + Assertions.assertEquals("vyc", response.tags().get("t")); + Assertions.assertEquals("uutlwxezwzhok", response.location()); + Assertions.assertEquals("dosfjbjsvgjrw", response.appPackageUrl()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteMockTests.java deleted file mode 100644 index 1185fb6661bc..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsDeleteMockTests.java +++ /dev/null @@ -1,34 +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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ApplicationTypeVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applicationTypeVersions() - .delete("dwvvba", "xlllchp", "db", "evwrdnhfuk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java index 2ab9a1194bdb..ee5ce5c394ab 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsGetWithResponseMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,21 +21,21 @@ public final class ApplicationTypeVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"ccybvp\",\"appPackageUrl\":\"yakk\"},\"location\":\"zp\",\"tags\":{\"hpfkyrkdbdgi\":\"jplmagstcy\",\"mnwqj\":\"gsj\"},\"id\":\"baiyhddviaceg\",\"name\":\"n\",\"type\":\"ntfpmvmemfnc\"}"; + = "{\"properties\":{\"provisioningState\":\"gims\",\"appPackageUrl\":\"dxasicddyvv\"},\"tags\":{\"wa\":\"gfmo\",\"tjeaahhvjhh\":\"pqg\",\"bbjjidjksyxk\":\"akz\"},\"location\":\"vxevblb\",\"id\":\"dnlj\",\"name\":\"age\",\"type\":\"aulx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationTypeVersionResource response = manager.applicationTypeVersions() - .getWithResponse("jgslordilmyww", "kgkxn", "edabgyvudtjue", "bcihxuuwhc", com.azure.core.util.Context.NONE) + .getWithResponse("yqhlwigdivbkbx", "omfaj", "wasqvdaeyyg", "xakjsqzhzb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zp", response.location()); - Assertions.assertEquals("jplmagstcy", response.tags().get("hpfkyrkdbdgi")); - Assertions.assertEquals("yakk", response.appPackageUrl()); + Assertions.assertEquals("gfmo", response.tags().get("wa")); + Assertions.assertEquals("vxevblb", response.location()); + Assertions.assertEquals("dxasicddyvv", response.appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationMockTests.java index 5996b2d9aa70..560337a2b4fa 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypeVersionsListByApplicationMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeVersionResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,20 +22,20 @@ public final class ApplicationTypeVersionsListByApplicationMockTests { @Test public void testListByApplicationTypes() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"spuunnoxyhkxgq\",\"appPackageUrl\":\"drihpfhoqcaaewda\"},\"location\":\"djvlpj\",\"tags\":{\"msgeivsiykzk\":\"zb\",\"xonbzoggculapz\":\"ncj\",\"pgogtqxepny\":\"y\",\"uajlyj\":\"b\"},\"id\":\"vofqzhvfc\",\"name\":\"byfmowuxr\",\"type\":\"jpvd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"piymerteea\",\"appPackageUrl\":\"mx\"},\"tags\":{\"zddrt\":\"kk\",\"ojbmxv\":\"g\"},\"location\":\"refdee\",\"id\":\"ecuijpxtxs\",\"name\":\"wprtu\",\"type\":\"wsawddjibabxvi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.applicationTypeVersions() - .listByApplicationTypes("vsjcswsmystuluqy", "fcvlerch", "qbmfpjbabwidf", com.azure.core.util.Context.NONE); + .listByApplicationTypes("nsmjbnkppxynen", "svxeizzgwklnsr", "ffeycx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("djvlpj", response.iterator().next().location()); - Assertions.assertEquals("zb", response.iterator().next().tags().get("msgeivsiykzk")); - Assertions.assertEquals("drihpfhoqcaaewda", response.iterator().next().appPackageUrl()); + Assertions.assertEquals("kk", response.iterator().next().tags().get("zddrt")); + Assertions.assertEquals("refdee", response.iterator().next().location()); + Assertions.assertEquals("mx", response.iterator().next().appPackageUrl()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponMockTests.java index c716162d0a56..cdaedc57dd93 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesCreateOrUpdateWithResponMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,24 +23,24 @@ public final class ApplicationTypesCreateOrUpdateWithResponMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"uisavokq\"},\"location\":\"fvazivjlfrqttba\",\"tags\":{\"kqqfk\":\"atnwxyiopi\",\"dmligovibrxk\":\"vscx\"},\"id\":\"loazuruocbgoo\",\"name\":\"bteoybf\",\"type\":\"jxakv\"}"; + = "{\"properties\":{\"provisioningState\":\"dnqqskawaoqvmmb\"},\"tags\":{\"qlkzme\":\"fr\"},\"location\":\"itgvkx\",\"id\":\"yqdrf\",\"name\":\"gcealzxwh\",\"type\":\"ansym\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationTypeResource response = manager.applicationTypes() - .define("dvoqyt") - .withExistingManagedcluster("ccwr", "fscjfnynszquji") - .withRegion("yavutpthjoxois") - .withTags(mapOf("ljxkcgxxlx", "sbpimlq", "wlvwlyoupf", "ffgcvizqz", "sgow", "fbkjubdyhgkfmi")) + .define("uzjyihsasbhudypo") + .withExistingManagedCluster("muvgp", "uneqsxvmhf") + .withRegion("un") + .withTags(mapOf("nfwqzdzgtilaxhn", "brlttymsjnygq", "wivkxo", "hqlyvijo")) .create(); - Assertions.assertEquals("fvazivjlfrqttba", response.location()); - Assertions.assertEquals("atnwxyiopi", response.tags().get("kqqfk")); + Assertions.assertEquals("fr", response.tags().get("qlkzme")); + Assertions.assertEquals("itgvkx", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteMockTests.java deleted file mode 100644 index d3ce54a19e9a..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesDeleteMockTests.java +++ /dev/null @@ -1,34 +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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ApplicationTypesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applicationTypes() - .delete("hiszepnnbjcrxgib", "daxconfozauorsuk", "kwbqplhlvnuu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java index 5bbbe15d9763..0ca13a26b6c1 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesGetWithResponseMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,20 +21,20 @@ public final class ApplicationTypesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"jvewzcjznmwcp\"},\"location\":\"uaadraufactkahzo\",\"tags\":{\"iuxxpshneekulfg\":\"j\",\"d\":\"lqubkwdlen\",\"pjuohminyfl\":\"utujba\"},\"id\":\"rwm\",\"name\":\"uvwpklvxwmyg\",\"type\":\"xpgpq\"}"; + = "{\"properties\":{\"provisioningState\":\"snfepgfewetwlyx\"},\"tags\":{\"limmbcxf\":\"xykxhdj\"},\"location\":\"cporxvxcjz\",\"id\":\"izxfpxt\",\"name\":\"qscjavftjuh\",\"type\":\"qaz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationTypeResource response = manager.applicationTypes() - .getWithResponse("mrqemvvhmx", "drjf", "tac", com.azure.core.util.Context.NONE) + .getWithResponse("eazulcs", "thwwn", "jhlfzswpchwahf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uaadraufactkahzo", response.location()); - Assertions.assertEquals("j", response.tags().get("iuxxpshneekulfg")); + Assertions.assertEquals("xykxhdj", response.tags().get("limmbcxf")); + Assertions.assertEquals("cporxvxcjz", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java index 2cc548de412a..0597c4719bbb 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationTypesListMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationTypeResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,19 +22,19 @@ public final class ApplicationTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"rwrbi\"},\"location\":\"ktalywjhhgdnhxms\",\"tags\":{\"ox\":\"omi\",\"euzaof\":\"gdufiqnd\",\"cubiipuipw\":\"chvcyyysfgdo\"},\"id\":\"onmacjekniz\",\"name\":\"hqvcimpevfgmblr\",\"type\":\"ilbywdxsm\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"wrxgkneuvy\"},\"tags\":{\"shoxgsgb\":\"qodfvp\",\"lbqvgaqvlgafcqu\":\"fgzdjtxvz\",\"nwsdtutnwlduyc\":\"rdve\"},\"location\":\"zhyrmewipmve\",\"id\":\"xukuqgsj\",\"name\":\"xundxgk\",\"type\":\"twzhhzjhfjmhv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.applicationTypes().list("pzlrphw", "soldweyuqdunv", com.azure.core.util.Context.NONE); + = manager.applicationTypes().list("mtggu", "pijrajcivmmghf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ktalywjhhgdnhxms", response.iterator().next().location()); - Assertions.assertEquals("omi", response.iterator().next().tags().get("ox")); + Assertions.assertEquals("qodfvp", response.iterator().next().tags().get("shoxgsgb")); + Assertions.assertEquals("zhyrmewipmve", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java index b2f140d8e65e..726217a4322c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -13,17 +13,18 @@ public final class ApplicationUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationUpdateParameters model = BinaryData.fromString("{\"tags\":{\"skanyk\":\"hjybigehoqfbo\"}}") + ApplicationUpdateParameters model = BinaryData.fromString( + "{\"tags\":{\"rpymzidnsez\":\"uf\",\"mdwzjeiachboo\":\"xtbzsgfyccsne\",\"ypyqrimzinp\":\"flnrosfqpteehzz\"}}") .toObject(ApplicationUpdateParameters.class); - Assertions.assertEquals("hjybigehoqfbo", model.tags().get("skanyk")); + Assertions.assertEquals("uf", model.tags().get("rpymzidnsez")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationUpdateParameters model - = new ApplicationUpdateParameters().withTags(mapOf("skanyk", "hjybigehoqfbo")); + ApplicationUpdateParameters model = new ApplicationUpdateParameters() + .withTags(mapOf("rpymzidnsez", "uf", "mdwzjeiachboo", "xtbzsgfyccsne", "ypyqrimzinp", "flnrosfqpteehzz")); model = BinaryData.fromObject(model).toObject(ApplicationUpdateParameters.class); - Assertions.assertEquals("hjybigehoqfbo", model.tags().get("skanyk")); + Assertions.assertEquals("uf", model.tags().get("rpymzidnsez")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpgradePolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpgradePolicyTests.java index f1215cd97d58..a260d84e054c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpgradePolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUpgradePolicyTests.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.servicefabricmanagedclusters.generated; @@ -19,41 +19,38 @@ public final class ApplicationUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationUpgradePolicy model = BinaryData.fromString( - "{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1274470316,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1409516732,\"maxPercentUnhealthyPartitionsPerService\":1769717852,\"maxPercentUnhealthyReplicasPerPartition\":1219720111},\"serviceTypeHealthPolicyMap\":{\"ejctbzaqsqsycb\":{\"maxPercentUnhealthyServices\":137439916,\"maxPercentUnhealthyPartitionsPerService\":657712894,\"maxPercentUnhealthyReplicasPerPartition\":1329098817},\"gukdkexxppo\":{\"maxPercentUnhealthyServices\":475549149,\"maxPercentUnhealthyPartitionsPerService\":1508721218,\"maxPercentUnhealthyReplicasPerPartition\":214775611},\"x\":{\"maxPercentUnhealthyServices\":1211894174,\"maxPercentUnhealthyPartitionsPerService\":2119531336,\"maxPercentUnhealthyReplicasPerPartition\":1878270858}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"ddtocjjxhvp\",\"healthCheckStableDuration\":\"o\",\"healthCheckRetryTimeout\":\"exhd\",\"upgradeTimeout\":\"xibqeojnx\",\"upgradeDomainTimeout\":\"bzv\"},\"instanceCloseDelayDuration\":8376089334456563087,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":2543360050548789201,\"recreateApplication\":true}") + "{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":559319579,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1369496360,\"maxPercentUnhealthyPartitionsPerService\":900623903,\"maxPercentUnhealthyReplicasPerPartition\":1946901948},\"serviceTypeHealthPolicyMap\":{\"cukjf\":{\"maxPercentUnhealthyServices\":1932583113,\"maxPercentUnhealthyPartitionsPerService\":1438714337,\"maxPercentUnhealthyReplicasPerPartition\":1204354379},\"w\":{\"maxPercentUnhealthyServices\":1260528380,\"maxPercentUnhealthyPartitionsPerService\":1945467900,\"maxPercentUnhealthyReplicasPerPartition\":1549614368}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"plwckbas\",\"healthCheckStableDuration\":\"ypnddhsgcb\",\"healthCheckRetryTimeout\":\"cph\",\"upgradeTimeout\":\"jkot\",\"upgradeDomainTimeout\":\"nqgoulzndli\"},\"instanceCloseDelayDuration\":6280199240757284109,\"upgradeMode\":\"Monitored\",\"upgradeReplicaSetCheckTimeout\":5618896848529183780,\"recreateApplication\":true}") .toObject(ApplicationUpgradePolicy.class); Assertions.assertEquals(true, model.applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1274470316, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1409516732, + Assertions.assertEquals(559319579, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(1369496360, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); - Assertions.assertEquals(1769717852, + Assertions.assertEquals(900623903, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1219720111, + Assertions.assertEquals(1946901948, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(137439916, + Assertions.assertEquals(1932583113, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("cukjf").maxPercentUnhealthyServices()); + Assertions.assertEquals(1438714337, model.applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") - .maxPercentUnhealthyServices()); - Assertions.assertEquals(657712894, - model.applicationHealthPolicy() - .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") + .get("cukjf") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1329098817, + Assertions.assertEquals(1204354379, model.applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") + .get("cukjf") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(false, model.forceRestart()); + Assertions.assertEquals(true, model.forceRestart()); Assertions.assertEquals(FailureAction.ROLLBACK, model.rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ddtocjjxhvp", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("o", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("exhd", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xibqeojnx", model.rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("bzv", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(8376089334456563087L, model.instanceCloseDelayDuration()); + Assertions.assertEquals("plwckbas", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("ypnddhsgcb", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("cph", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("jkot", model.rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("nqgoulzndli", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(6280199240757284109L, model.instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.upgradeMode()); - Assertions.assertEquals(2543360050548789201L, model.upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(5618896848529183780L, model.upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(true, model.recreateApplication()); } @@ -61,69 +58,62 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ApplicationUpgradePolicy model = new ApplicationUpgradePolicy() .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(true) - .withMaxPercentUnhealthyDeployedApplications(1274470316) + .withMaxPercentUnhealthyDeployedApplications(559319579) .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1409516732) - .withMaxPercentUnhealthyPartitionsPerService(1769717852) - .withMaxPercentUnhealthyReplicasPerPartition(1219720111)) - .withServiceTypeHealthPolicyMap(mapOf("ejctbzaqsqsycb", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(137439916) - .withMaxPercentUnhealthyPartitionsPerService(657712894) - .withMaxPercentUnhealthyReplicasPerPartition(1329098817), - "gukdkexxppo", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(475549149) - .withMaxPercentUnhealthyPartitionsPerService(1508721218) - .withMaxPercentUnhealthyReplicasPerPartition(214775611), - "x", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1211894174) - .withMaxPercentUnhealthyPartitionsPerService(2119531336) - .withMaxPercentUnhealthyReplicasPerPartition(1878270858)))) - .withForceRestart(false) + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1369496360) + .withMaxPercentUnhealthyPartitionsPerService(900623903) + .withMaxPercentUnhealthyReplicasPerPartition(1946901948)) + .withServiceTypeHealthPolicyMap(mapOf("cukjf", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1932583113) + .withMaxPercentUnhealthyPartitionsPerService(1438714337) + .withMaxPercentUnhealthyReplicasPerPartition(1204354379), + "w", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1260528380) + .withMaxPercentUnhealthyPartitionsPerService(1945467900) + .withMaxPercentUnhealthyReplicasPerPartition(1549614368)))) + .withForceRestart(true) .withRollingUpgradeMonitoringPolicy( new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("ddtocjjxhvp") - .withHealthCheckStableDuration("o") - .withHealthCheckRetryTimeout("exhd") - .withUpgradeTimeout("xibqeojnx") - .withUpgradeDomainTimeout("bzv")) - .withInstanceCloseDelayDuration(8376089334456563087L) + .withHealthCheckWaitDuration("plwckbas") + .withHealthCheckStableDuration("ypnddhsgcb") + .withHealthCheckRetryTimeout("cph") + .withUpgradeTimeout("jkot") + .withUpgradeDomainTimeout("nqgoulzndli")) + .withInstanceCloseDelayDuration(6280199240757284109L) .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(2543360050548789201L) + .withUpgradeReplicaSetCheckTimeout(5618896848529183780L) .withRecreateApplication(true); model = BinaryData.fromObject(model).toObject(ApplicationUpgradePolicy.class); Assertions.assertEquals(true, model.applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1274470316, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(1409516732, + Assertions.assertEquals(559319579, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); + Assertions.assertEquals(1369496360, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices()); - Assertions.assertEquals(1769717852, + Assertions.assertEquals(900623903, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1219720111, + Assertions.assertEquals(1946901948, model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(137439916, - model.applicationHealthPolicy() - .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") - .maxPercentUnhealthyServices()); - Assertions.assertEquals(657712894, + Assertions.assertEquals(1932583113, + model.applicationHealthPolicy().serviceTypeHealthPolicyMap().get("cukjf").maxPercentUnhealthyServices()); + Assertions.assertEquals(1438714337, model.applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") + .get("cukjf") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1329098817, + Assertions.assertEquals(1204354379, model.applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("ejctbzaqsqsycb") + .get("cukjf") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(false, model.forceRestart()); + Assertions.assertEquals(true, model.forceRestart()); Assertions.assertEquals(FailureAction.ROLLBACK, model.rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("ddtocjjxhvp", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("o", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("exhd", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("xibqeojnx", model.rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("bzv", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(8376089334456563087L, model.instanceCloseDelayDuration()); + Assertions.assertEquals("plwckbas", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("ypnddhsgcb", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("cph", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("jkot", model.rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("nqgoulzndli", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals(6280199240757284109L, model.instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.MONITORED, model.upgradeMode()); - Assertions.assertEquals(2543360050548789201L, model.upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(5618896848529183780L, model.upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(true, model.recreateApplication()); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUserAssignedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUserAssignedIdentityTests.java index 21c4373609a9..e910d48c90d4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUserAssignedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationUserAssignedIdentityTests.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.servicefabricmanagedclusters.generated; @@ -11,18 +11,19 @@ public final class ApplicationUserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationUserAssignedIdentity model = BinaryData.fromString("{\"name\":\"mi\",\"principalId\":\"tthzrvqd\"}") - .toObject(ApplicationUserAssignedIdentity.class); - Assertions.assertEquals("mi", model.name()); - Assertions.assertEquals("tthzrvqd", model.principalId()); + ApplicationUserAssignedIdentity model + = BinaryData.fromString("{\"name\":\"hbmdgbbjfdd\",\"principalId\":\"mbmbexppbh\"}") + .toObject(ApplicationUserAssignedIdentity.class); + Assertions.assertEquals("hbmdgbbjfdd", model.name()); + Assertions.assertEquals("mbmbexppbh", model.principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationUserAssignedIdentity model - = new ApplicationUserAssignedIdentity().withName("mi").withPrincipalId("tthzrvqd"); + = new ApplicationUserAssignedIdentity().withName("hbmdgbbjfdd").withPrincipalId("mbmbexppbh"); model = BinaryData.fromObject(model).toObject(ApplicationUserAssignedIdentity.class); - Assertions.assertEquals("mi", model.name()); - Assertions.assertEquals("tthzrvqd", model.principalId()); + Assertions.assertEquals("hbmdgbbjfdd", model.name()); + Assertions.assertEquals("mbmbexppbh", model.principalId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java index 1bf8ace78eba..81730f767bd6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsCreateOrUpdateMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationHealthPolicy; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationUpgradePolicy; @@ -34,120 +34,121 @@ public final class ApplicationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"eycxcktpiymertee\",\"tenantId\":\"mx\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mxvavrefdee\":{\"principalId\":\"zddrt\",\"clientId\":\"doj\"},\"ibabxvititvtzeex\":{\"principalId\":\"ecuijpxtxs\",\"clientId\":\"prtujwsawdd\"},\"gsfjac\":{\"principalId\":\"oxtfglecdmdqbwp\",\"clientId\":\"q\"},\"gzrcxfailcfxwmdb\":{\"principalId\":\"lhhxudbxvodhtnsi\",\"clientId\":\"dhzmmesckdlp\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":\"lnacgcc\",\"parameters\":{\"lj\":\"hxkizvytnrzv\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1023796809,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":538617301,\"maxPercentUnhealthyPartitionsPerService\":244729787,\"maxPercentUnhealthyReplicasPerPartition\":644888013},\"serviceTypeHealthPolicyMap\":{\"jqnv\":{\"maxPercentUnhealthyServices\":1236565917,\"maxPercentUnhealthyPartitionsPerService\":1809453689,\"maxPercentUnhealthyReplicasPerPartition\":578630229},\"laxxulc\":{\"maxPercentUnhealthyServices\":2004582271,\"maxPercentUnhealthyPartitionsPerService\":2081479279,\"maxPercentUnhealthyReplicasPerPartition\":387687877},\"osfjbjsv\":{\"maxPercentUnhealthyServices\":1187739755,\"maxPercentUnhealthyPartitionsPerService\":1094688808,\"maxPercentUnhealthyReplicasPerPartition\":1171006213}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"r\",\"healthCheckStableDuration\":\"vyc\",\"healthCheckRetryTimeout\":\"t\",\"upgradeTimeout\":\"c\",\"upgradeDomainTimeout\":\"xgccknfnw\"},\"instanceCloseDelayDuration\":3132711740281855287,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":7985677682216812459,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"zaefedxihc\",\"principalId\":\"rphkmcrjdqnsdfz\"},{\"name\":\"bg\",\"principalId\":\"gkylkdghr\"}]},\"location\":\"uutlwxezwzhok\",\"tags\":{\"ehgpp\":\"nhhtql\",\"csheafidltugsr\":\"pifhpfeoajvgcxtx\",\"h\":\"smkss\",\"egprhptil\":\"iftxfkf\"},\"id\":\"cbiqtgdqoh\",\"name\":\"cwsldri\",\"type\":\"etpwbralll\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"version\":\"nbzydvfvfcj\",\"parameters\":{\"is\":\"oisrvhmgorffu\",\"btgn\":\"vwmzhwplefaxvxil\",\"zqlqhyc\":\"nzeyqxtjj\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1258622098,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":817001941,\"maxPercentUnhealthyPartitionsPerService\":1896221438,\"maxPercentUnhealthyReplicasPerPartition\":996464751},\"serviceTypeHealthPolicyMap\":{\"eknlra\":{\"maxPercentUnhealthyServices\":45499984,\"maxPercentUnhealthyPartitionsPerService\":685965708,\"maxPercentUnhealthyReplicasPerPartition\":1327302833}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"iuagydwqfbylyrfg\",\"healthCheckStableDuration\":\"agt\",\"healthCheckRetryTimeout\":\"ojocqwogf\",\"upgradeTimeout\":\"zjvusfzldmo\",\"upgradeDomainTimeout\":\"uxylfsbtkadpy\"},\"instanceCloseDelayDuration\":1856181923182418144,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":1415996361573968952,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"qctojcmisof\",\"principalId\":\"eypefojyqd\"},{\"name\":\"cuplcplcwkhih\",\"principalId\":\"hlhzdsqtzbsrgno\"},{\"name\":\"cjhfgmvecactxmw\",\"principalId\":\"teyowclu\"},{\"name\":\"ovekqvgqouwi\",\"principalId\":\"zmpjwyiv\"}]},\"tags\":{\"cvhrfsp\":\"f\",\"kvyklxubyjaffmm\":\"uagrttikteusqc\",\"qcuubgqibrta\":\"bl\"},\"identity\":{\"principalId\":\"tttwgdslqxih\",\"tenantId\":\"moo\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"etoge\":{\"principalId\":\"pxiutc\",\"clientId\":\"pzhyr\"},\"kkzjcjbtrga\":{\"principalId\":\"oxslh\",\"clientId\":\"hlabrq\"},\"toqbeitpkxztmoob\":{\"principalId\":\"vvib\",\"clientId\":\"jj\"},\"yhohujswtwkozzwc\":{\"principalId\":\"ft\",\"clientId\":\"gfcwqmpimaqxzhem\"}}},\"location\":\"kb\",\"id\":\"pfajnjwltlwtjj\",\"name\":\"uktalhsnvkcdmxz\",\"type\":\"poaimlnwiaaomyl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationResource response = manager.applications() - .define("zhyrmewipmve") - .withExistingManagedcluster("vetnwsdtutn", "lduycv") - .withRegion("zybbj") - .withTags(mapOf("xkyxvxevblbj", "jks")) - .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) + .define("eqvldspast") + .withExistingManagedCluster("xjrk", "mbtrnegvmnvu") + .withRegion("oudaspavehhrvk") + .withTags(mapOf("uyav", "vfonkphhqyikvyl")) + .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) .withUserAssignedIdentities( - mapOf("qsxvmhf", new UserAssignedIdentity(), "hudypohyuemsl", new UserAssignedIdentity(), "nygq", - new UserAssignedIdentity(), "hqlyvijo", new UserAssignedIdentity()))) - .withVersion("yzunbixxrtikv") - .withParameters(mapOf("soxfrken", "pgclrciv", "ka", "pmyyefrpmpdnqq", "vmm", "ao")) + mapOf("mtk", new UserAssignedIdentity(), "frbbc", new UserAssignedIdentity(), "dcnifmz", + new UserAssignedIdentity(), "khocxvdfffwaf", new UserAssignedIdentity()))) + .withVersion("ilozapeewchpxlk") + .withParameters(mapOf("vu", "uziycsl", "gzulwmmrqzzr", "uztcktyhjtqed", "vqeevtoep", "jvpglydzgk")) .withUpgradePolicy(new ApplicationUpgradePolicy() .withApplicationHealthPolicy(new ApplicationHealthPolicy().withConsiderWarningAsError(false) - .withMaxPercentUnhealthyDeployedApplications(483847293) + .withMaxPercentUnhealthyDeployedApplications(726969242) .withDefaultServiceTypeHealthPolicy( - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1189799815) - .withMaxPercentUnhealthyPartitionsPerService(1464484826) - .withMaxPercentUnhealthyReplicasPerPartition(1516123032)) - .withServiceTypeHealthPolicyMap(mapOf("nitgvkxlz", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1084640594) - .withMaxPercentUnhealthyPartitionsPerService(1572923585) - .withMaxPercentUnhealthyReplicasPerPartition(910896257), - "fegcea", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1806013013) - .withMaxPercentUnhealthyPartitionsPerService(758932441) - .withMaxPercentUnhealthyReplicasPerPartition(739587374), - "hcans", - new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2015220530) - .withMaxPercentUnhealthyPartitionsPerService(608530050) - .withMaxPercentUnhealthyReplicasPerPartition(1594639015)))) - .withForceRestart(false) + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(584463560) + .withMaxPercentUnhealthyPartitionsPerService(2045022432) + .withMaxPercentUnhealthyReplicasPerPartition(989782858)) + .withServiceTypeHealthPolicyMap(mapOf("zvfvaawz", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(559055127) + .withMaxPercentUnhealthyPartitionsPerService(111539193) + .withMaxPercentUnhealthyReplicasPerPartition(1383258036), + "lgzurig", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1654754432) + .withMaxPercentUnhealthyPartitionsPerService(1921390640) + .withMaxPercentUnhealthyReplicasPerPartition(230826239), + "xndticokpvzmlqtm", + new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(60723986) + .withMaxPercentUnhealthyPartitionsPerService(1058037553) + .withMaxPercentUnhealthyReplicasPerPartition(335381913)))) + .withForceRestart(true) .withRollingUpgradeMonitoringPolicy( new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) - .withHealthCheckWaitDuration("hlwigdivbkbxg") - .withHealthCheckStableDuration("mf") - .withHealthCheckRetryTimeout("juwasqvdaeyyguxa") - .withUpgradeTimeout("jsqzhzbezk") - .withUpgradeDomainTimeout("imsidxasicddyvvj")) - .withInstanceCloseDelayDuration(3644953268271163513L) - .withUpgradeMode(RollingUpgradeMode.MONITORED) - .withUpgradeReplicaSetCheckTimeout(1822149977556506496L) - .withRecreateApplication(false)) + .withHealthCheckWaitDuration("bf") + .withHealthCheckStableDuration("rclnpkc") + .withHealthCheckRetryTimeout("ayzri") + .withUpgradeTimeout("khyawfvjlboxqv") + .withUpgradeDomainTimeout("jlmxhomdynhd")) + .withInstanceCloseDelayDuration(2742511706808371729L) + .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO) + .withUpgradeReplicaSetCheckTimeout(7859433782987628678L) + .withRecreateApplication(true)) .withManagedIdentities( - Arrays.asList(new ApplicationUserAssignedIdentity().withName("atjeaahh").withPrincipalId("jhhn"))) + Arrays.asList(new ApplicationUserAssignedIdentity().withName("zptjazysd").withPrincipalId("hezwwvaiq"))) .create(); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("uutlwxezwzhok", response.location()); - Assertions.assertEquals("nhhtql", response.tags().get("ehgpp")); - Assertions.assertEquals("lnacgcc", response.version()); - Assertions.assertEquals("hxkizvytnrzv", response.parameters().get("lj")); + Assertions.assertEquals("f", response.tags().get("cvhrfsp")); + Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("kb", response.location()); + Assertions.assertEquals("nbzydvfvfcj", response.version()); + Assertions.assertEquals("oisrvhmgorffu", response.parameters().get("is")); Assertions.assertEquals(true, response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(1023796809, + Assertions.assertEquals(1258622098, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(538617301, + Assertions.assertEquals(817001941, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(244729787, + Assertions.assertEquals(1896221438, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(644888013, + Assertions.assertEquals(996464751, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1236565917, + Assertions.assertEquals(45499984, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("jqnv") + .get("eknlra") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1809453689, + Assertions.assertEquals(685965708, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("jqnv") + .get("eknlra") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(578630229, + Assertions.assertEquals(1327302833, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("jqnv") + .get("eknlra") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertEquals(true, response.upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.ROLLBACK, + Assertions.assertEquals(FailureAction.MANUAL, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("r", + Assertions.assertEquals("iuagydwqfbylyrfg", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("vyc", + Assertions.assertEquals("agt", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("t", + Assertions.assertEquals("ojocqwogf", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("c", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("xgccknfnw", + Assertions.assertEquals("zjvusfzldmo", + response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("uxylfsbtkadpy", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(3132711740281855287L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(1856181923182418144L, response.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(7985677682216812459L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertEquals(false, response.upgradePolicy().recreateApplication()); - Assertions.assertEquals("zaefedxihc", response.managedIdentities().get(0).name()); - Assertions.assertEquals("rphkmcrjdqnsdfz", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals(1415996361573968952L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(true, response.upgradePolicy().recreateApplication()); + Assertions.assertEquals("qctojcmisof", response.managedIdentities().get(0).name()); + Assertions.assertEquals("eypefojyqd", response.managedIdentities().get(0).principalId()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteMockTests.java deleted file mode 100644 index c99a4565da73..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ApplicationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applications().delete("wotey", "wcluqovekqvgq", "uwifzmpjwyiv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java index f7021d3e5815..508b7c77cbef 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsGetWithResponseMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType; @@ -24,78 +24,78 @@ public final class ApplicationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"zwwva\",\"tenantId\":\"yuvvfonkp\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"jfybvpoekrsgsgb\":{\"principalId\":\"vyl\",\"clientId\":\"yavluwmncstt\"},\"u\":{\"principalId\":\"uzqgnjdgkynsc\",\"clientId\":\"qhzvhxnkomt\"},\"hihfrbbcevqagtlt\":{\"principalId\":\"tppn\",\"clientId\":\"xz\"}}},\"properties\":{\"provisioningState\":\"fkqojpy\",\"version\":\"gtrd\",\"parameters\":{\"u\":\"fmzzsdymbrny\",\"rafwgckhocxvdf\":\"m\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":2125328140,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":817502277,\"maxPercentUnhealthyPartitionsPerService\":1487295222,\"maxPercentUnhealthyReplicasPerPartition\":478345716},\"serviceTypeHealthPolicyMap\":{\"vehhrvkbunzozu\":{\"maxPercentUnhealthyServices\":1181286444,\"maxPercentUnhealthyPartitionsPerService\":1715905241,\"maxPercentUnhealthyReplicasPerPartition\":1222177326},\"gkmoyxcdyuibhmfd\":{\"maxPercentUnhealthyServices\":83009194,\"maxPercentUnhealthyPartitionsPerService\":1288828831,\"maxPercentUnhealthyReplicasPerPartition\":529725461},\"dvfvfcjnaeoi\":{\"maxPercentUnhealthyServices\":485824562,\"maxPercentUnhealthyPartitionsPerService\":1709399278,\"maxPercentUnhealthyReplicasPerPartition\":566054970}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"gorf\",\"healthCheckStableDuration\":\"ukiscvwmzhw\",\"healthCheckRetryTimeout\":\"lefaxvxilcbtgn\",\"upgradeTimeout\":\"nzeyqxtjj\",\"upgradeDomainTimeout\":\"zqlqhyc\"},\"instanceCloseDelayDuration\":5723107305457726776,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":8144209061033072751,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"ieknl\",\"principalId\":\"ariaawi\"},{\"name\":\"agy\",\"principalId\":\"wqfbylyrfgiagt\"},{\"name\":\"ojocqwogf\",\"principalId\":\"zjvusfzldmo\"}]},\"location\":\"xylfsb\",\"tags\":{\"s\":\"dp\",\"tgkbugrjqctojc\":\"wn\",\"cuplcplcwkhih\":\"isofieypefojyqd\"},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"}"; + = "{\"properties\":{\"provisioningState\":\"kkqfqjbvle\",\"version\":\"fmluiqtqzfavyvn\",\"parameters\":{\"euayjkqabqgzsles\":\"bar\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":2098917747,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":211422779,\"maxPercentUnhealthyPartitionsPerService\":1126547162,\"maxPercentUnhealthyReplicasPerPartition\":1426151715},\"serviceTypeHealthPolicyMap\":{\"cv\":{\"maxPercentUnhealthyServices\":167991676,\"maxPercentUnhealthyPartitionsPerService\":537781185,\"maxPercentUnhealthyReplicasPerPartition\":1014646419},\"rbe\":{\"maxPercentUnhealthyServices\":284273475,\"maxPercentUnhealthyPartitionsPerService\":730948461,\"maxPercentUnhealthyReplicasPerPartition\":440184617},\"o\":{\"maxPercentUnhealthyServices\":372770519,\"maxPercentUnhealthyPartitionsPerService\":2007657488,\"maxPercentUnhealthyReplicasPerPartition\":635360833}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"kmr\",\"healthCheckStableDuration\":\"emvvhm\",\"healthCheckRetryTimeout\":\"tdrjfutacoebj\",\"upgradeTimeout\":\"ewzcjznmwcp\",\"upgradeDomainTimeout\":\"guaadraufactkahz\"},\"instanceCloseDelayDuration\":5238754995577002157,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":8252978484385521877,\"recreateApplication\":true},\"managedIdentities\":[{\"name\":\"neekulfg\",\"principalId\":\"lqubkwdlen\"},{\"name\":\"d\",\"principalId\":\"utujba\"}]},\"tags\":{\"minyflnorwm\":\"uo\",\"xpgpq\":\"uvwpklvxwmyg\",\"daxconfozauorsuk\":\"hiszepnnbjcrxgib\",\"pzlrphw\":\"kwbqplhlvnuu\"},\"identity\":{\"principalId\":\"l\",\"tenantId\":\"eyuqdunvmnnrwr\",\"type\":\"None\",\"userAssignedIdentities\":{\"fomiloxgg\":{\"principalId\":\"alywjhhgdn\",\"clientId\":\"msi\"},\"hvcyyysfg\":{\"principalId\":\"fi\",\"clientId\":\"dieuzaofj\"},\"cimpevfg\":{\"principalId\":\"tcubiipuipwoqonm\",\"clientId\":\"jeknizshq\"},\"wrwfscjfnyns\":{\"principalId\":\"lrri\",\"clientId\":\"ywdxsmic\"}}},\"location\":\"ujiz\",\"id\":\"oqytibyowbblgy\",\"name\":\"vutpthjoxo\",\"type\":\"smsks\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ApplicationResource response = manager.applications() - .getWithResponse("jlmxhomdynhd", "digumbnr", "auzzptjazysd", com.azure.core.util.Context.NONE) + .getWithResponse("a", "coezbrhubskh", "dyg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("xylfsb", response.location()); - Assertions.assertEquals("dp", response.tags().get("s")); - Assertions.assertEquals("gtrd", response.version()); - Assertions.assertEquals("fmzzsdymbrny", response.parameters().get("u")); - Assertions.assertEquals(false, response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(2125328140, + Assertions.assertEquals("uo", response.tags().get("minyflnorwm")); + Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("ujiz", response.location()); + Assertions.assertEquals("fmluiqtqzfavyvn", response.version()); + Assertions.assertEquals("bar", response.parameters().get("euayjkqabqgzsles")); + Assertions.assertEquals(true, response.upgradePolicy().applicationHealthPolicy().considerWarningAsError()); + Assertions.assertEquals(2098917747, response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(817502277, + Assertions.assertEquals(211422779, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1487295222, + Assertions.assertEquals(1126547162, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(478345716, + Assertions.assertEquals(1426151715, response.upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(1181286444, + Assertions.assertEquals(167991676, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("vehhrvkbunzozu") + .get("cv") .maxPercentUnhealthyServices()); - Assertions.assertEquals(1715905241, + Assertions.assertEquals(537781185, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("vehhrvkbunzozu") + .get("cv") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(1222177326, + Assertions.assertEquals(1014646419, response.upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("vehhrvkbunzozu") + .get("cv") .maxPercentUnhealthyReplicasPerPartition()); Assertions.assertEquals(true, response.upgradePolicy().forceRestart()); - Assertions.assertEquals(FailureAction.MANUAL, + Assertions.assertEquals(FailureAction.ROLLBACK, response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("gorf", + Assertions.assertEquals("kmr", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("ukiscvwmzhw", + Assertions.assertEquals("emvvhm", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("lefaxvxilcbtgn", + Assertions.assertEquals("tdrjfutacoebj", response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("nzeyqxtjj", + Assertions.assertEquals("ewzcjznmwcp", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("zqlqhyc", + Assertions.assertEquals("guaadraufactkahz", response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(5723107305457726776L, response.upgradePolicy().instanceCloseDelayDuration()); + Assertions.assertEquals(5238754995577002157L, response.upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode()); - Assertions.assertEquals(8144209061033072751L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); - Assertions.assertEquals(false, response.upgradePolicy().recreateApplication()); - Assertions.assertEquals("ieknl", response.managedIdentities().get(0).name()); - Assertions.assertEquals("ariaawi", response.managedIdentities().get(0).principalId()); + Assertions.assertEquals(8252978484385521877L, response.upgradePolicy().upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(true, response.upgradePolicy().recreateApplication()); + Assertions.assertEquals("neekulfg", response.managedIdentities().get(0).name()); + Assertions.assertEquals("lqubkwdlen", response.managedIdentities().get(0).principalId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java index a2b9c0c9d76a..6287f2f182a5 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ApplicationsListMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ApplicationResource; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FailureAction; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedIdentityType; @@ -25,98 +25,97 @@ public final class ApplicationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"grttikteusqczk\",\"tenantId\":\"klxubyja\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"lqxihhrmooiz\":{\"principalId\":\"lcqcuubgqibrt\",\"clientId\":\"metttwgd\"},\"vnh\":{\"principalId\":\"eypxiutcxapzhyr\",\"clientId\":\"togebjoxsl\"}}},\"properties\":{\"provisioningState\":\"rqnkkzjcjbtr\",\"version\":\"ehvvib\",\"parameters\":{\"beitpkx\":\"jsto\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":343104973,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":591032834,\"maxPercentUnhealthyPartitionsPerService\":1574210400,\"maxPercentUnhealthyReplicasPerPartition\":358908286},\"serviceTypeHealthPolicyMap\":{\"cwq\":{\"maxPercentUnhealthyServices\":2138880865,\"maxPercentUnhealthyPartitionsPerService\":2018577894,\"maxPercentUnhealthyReplicasPerPartition\":300774928},\"aqxzhemjyho\":{\"maxPercentUnhealthyServices\":1328800252,\"maxPercentUnhealthyPartitionsPerService\":817120127,\"maxPercentUnhealthyReplicasPerPartition\":658740777}}},\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"t\",\"healthCheckStableDuration\":\"kozzwculkb\",\"healthCheckRetryTimeout\":\"wpfaj\",\"upgradeTimeout\":\"jwltlwtjjgu\",\"upgradeDomainTimeout\":\"talhsnvkcdmxzr\"},\"instanceCloseDelayDuration\":2563620399740315229,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":3743017470080783529,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"ylweazulc\",\"principalId\":\"ethwwnpjhlfz\"},{\"name\":\"wpchwahf\",\"principalId\":\"ousnfepgfewe\"},{\"name\":\"wlyxgncxyk\",\"principalId\":\"hdjhlimmbcx\"}]},\"location\":\"bcporxvxcjzhqizx\",\"tags\":{\"qaz\":\"tgqscjavftjuh\",\"pijrajcivmmghf\":\"mtggu\",\"uvyinzqodfvpgs\":\"fiwrxgkn\",\"zflbqvg\":\"oxgsgbpfgzdjtx\"},\"id\":\"vl\",\"name\":\"a\",\"type\":\"cqusr\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"cgxxlxs\",\"version\":\"gcvizqzdwlvwlyou\",\"parameters\":{\"sgow\":\"fbkjubdyhgkfmi\",\"lahb\":\"fttsttk\",\"qtgqqqxhrnxr\":\"actxtgzukxitm\"},\"upgradePolicy\":{\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":2074998294,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":58328549,\"maxPercentUnhealthyPartitionsPerService\":449055657,\"maxPercentUnhealthyReplicasPerPartition\":1960010520},\"serviceTypeHealthPolicyMap\":{\"fvazivjlfrqttba\":{\"maxPercentUnhealthyServices\":2065255812,\"maxPercentUnhealthyPartitionsPerService\":744996388,\"maxPercentUnhealthyReplicasPerPartition\":1487761087}}},\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"nwxyiop\",\"healthCheckStableDuration\":\"dkqqfkuvscxkd\",\"healthCheckRetryTimeout\":\"ligovibrxkpm\",\"upgradeTimeout\":\"oaz\",\"upgradeDomainTimeout\":\"ruocbgo\"},\"instanceCloseDelayDuration\":7064966884365247591,\"upgradeMode\":\"UnmonitoredAuto\",\"upgradeReplicaSetCheckTimeout\":5142686726452135703,\"recreateApplication\":false},\"managedIdentities\":[{\"name\":\"kvvjgslordilmyww\",\"principalId\":\"kgkxn\"},{\"name\":\"edabgyvudtjue\",\"principalId\":\"bcihxuuwhc\"},{\"name\":\"yxccyb\",\"principalId\":\"payakkud\"}]},\"tags\":{\"tcyohpfkyrk\":\"gwjplmag\",\"nwqjnoba\":\"bdgiogsjk\",\"egfnmntfpmvmemfn\":\"yhddvia\",\"lchpodbzevwrdn\":\"zdwvvbalxl\"},\"identity\":{\"principalId\":\"kuvsjcswsm\",\"tenantId\":\"tuluq\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"idfcxsspuunnoxyh\":{\"principalId\":\"er\",\"clientId\":\"pqbmfpjbab\"},\"mdjvlpj\":{\"principalId\":\"g\",\"clientId\":\"drihpfhoqcaaewda\"},\"xonbzoggculapz\":{\"principalId\":\"kzbrmsgeivsiy\",\"clientId\":\"kdncj\"},\"jlyjtlvofq\":{\"principalId\":\"rpgogtqxep\",\"clientId\":\"lbfu\"}}},\"location\":\"vfcibyfmowux\",\"id\":\"jpvd\",\"name\":\"xfzwi\",\"type\":\"vwzjbhyz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.applications().list("ikf", "cvhrfsp", com.azure.core.util.Context.NONE); + = manager.applications().list("pi", "lqol", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("bcporxvxcjzhqizx", response.iterator().next().location()); - Assertions.assertEquals("tgqscjavftjuh", response.iterator().next().tags().get("qaz")); - Assertions.assertEquals("ehvvib", response.iterator().next().version()); - Assertions.assertEquals("jsto", response.iterator().next().parameters().get("beitpkx")); + Assertions.assertEquals("gwjplmag", response.iterator().next().tags().get("tcyohpfkyrk")); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("vfcibyfmowux", response.iterator().next().location()); + Assertions.assertEquals("gcvizqzdwlvwlyou", response.iterator().next().version()); + Assertions.assertEquals("fbkjubdyhgkfmi", response.iterator().next().parameters().get("sgow")); Assertions.assertEquals(true, response.iterator().next().upgradePolicy().applicationHealthPolicy().considerWarningAsError()); - Assertions.assertEquals(343104973, + Assertions.assertEquals(2074998294, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .maxPercentUnhealthyDeployedApplications()); - Assertions.assertEquals(591032834, + Assertions.assertEquals(58328549, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyServices()); - Assertions.assertEquals(1574210400, + Assertions.assertEquals(449055657, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(358908286, + Assertions.assertEquals(1960010520, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .defaultServiceTypeHealthPolicy() .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(2138880865, + Assertions.assertEquals(2065255812, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cwq") + .get("fvazivjlfrqttba") .maxPercentUnhealthyServices()); - Assertions.assertEquals(2018577894, + Assertions.assertEquals(744996388, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cwq") + .get("fvazivjlfrqttba") .maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(300774928, + Assertions.assertEquals(1487761087, response.iterator() .next() .upgradePolicy() .applicationHealthPolicy() .serviceTypeHealthPolicyMap() - .get("cwq") + .get("fvazivjlfrqttba") .maxPercentUnhealthyReplicasPerPartition()); - Assertions.assertEquals(true, response.iterator().next().upgradePolicy().forceRestart()); + Assertions.assertEquals(false, response.iterator().next().upgradePolicy().forceRestart()); Assertions.assertEquals(FailureAction.ROLLBACK, response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction()); - Assertions.assertEquals("t", + Assertions.assertEquals("nwxyiop", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("kozzwculkb", + Assertions.assertEquals("dkqqfkuvscxkd", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("wpfaj", + Assertions.assertEquals("ligovibrxkpm", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("jwltlwtjjgu", + Assertions.assertEquals("oaz", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("talhsnvkcdmxzr", + Assertions.assertEquals("ruocbgo", response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals(2563620399740315229L, + Assertions.assertEquals(7064966884365247591L, response.iterator().next().upgradePolicy().instanceCloseDelayDuration()); Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.iterator().next().upgradePolicy().upgradeMode()); - Assertions.assertEquals(3743017470080783529L, + Assertions.assertEquals(5142686726452135703L, response.iterator().next().upgradePolicy().upgradeReplicaSetCheckTimeout()); Assertions.assertEquals(false, response.iterator().next().upgradePolicy().recreateApplication()); - Assertions.assertEquals("ylweazulc", response.iterator().next().managedIdentities().get(0).name()); - Assertions.assertEquals("ethwwnpjhlfz", response.iterator().next().managedIdentities().get(0).principalId()); + Assertions.assertEquals("kvvjgslordilmyww", response.iterator().next().managedIdentities().get(0).name()); + Assertions.assertEquals("kgkxn", response.iterator().next().managedIdentities().get(0).principalId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AvailableOperationDisplayTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AvailableOperationDisplayTests.java index 1012f3bc45c8..2d1c67d07f46 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AvailableOperationDisplayTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AvailableOperationDisplayTests.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.servicefabricmanagedclusters.generated; @@ -11,25 +11,13 @@ public final class AvailableOperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AvailableOperationDisplay model = BinaryData.fromString( - "{\"provider\":\"nfwjlfltkacjvefk\",\"resource\":\"foakgg\",\"operation\":\"pagao\",\"description\":\"ulpqblylsyxkqjn\"}") + AvailableOperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"fcyzkohdbihanufh\",\"resource\":\"bj\",\"operation\":\"a\",\"description\":\"th\"}") .toObject(AvailableOperationDisplay.class); - Assertions.assertEquals("nfwjlfltkacjvefk", model.provider()); - Assertions.assertEquals("foakgg", model.resource()); - Assertions.assertEquals("pagao", model.operation()); - Assertions.assertEquals("ulpqblylsyxkqjn", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperationDisplay model = new AvailableOperationDisplay().withProvider("nfwjlfltkacjvefk") - .withResource("foakgg") - .withOperation("pagao") - .withDescription("ulpqblylsyxkqjn"); - model = BinaryData.fromObject(model).toObject(AvailableOperationDisplay.class); - Assertions.assertEquals("nfwjlfltkacjvefk", model.provider()); - Assertions.assertEquals("foakgg", model.resource()); - Assertions.assertEquals("pagao", model.operation()); - Assertions.assertEquals("ulpqblylsyxkqjn", model.description()); + Assertions.assertEquals("fcyzkohdbihanufh", model.provider()); + Assertions.assertEquals("bj", model.resource()); + Assertions.assertEquals("a", model.operation()); + Assertions.assertEquals("th", model.description()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java index 865da0a0a5f2..6b5412b6612d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AveragePartitionLoadScalingTriggerTests.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.servicefabricmanagedclusters.generated; @@ -12,24 +12,25 @@ public final class AveragePartitionLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AveragePartitionLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"uutpwoqhih\",\"lowerLoadThreshold\":33.277762117005274,\"upperLoadThreshold\":2.0849586395403574,\"scaleInterval\":\"zpnfqntcypsxj\"}") + "{\"kind\":\"AveragePartitionLoadTrigger\",\"metricName\":\"ouwaboekqvkeln\",\"lowerLoadThreshold\":14.079251337033272,\"upperLoadThreshold\":78.11639841389814,\"scaleInterval\":\"wyjsflhhcaalnjix\"}") .toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("uutpwoqhih", model.metricName()); - Assertions.assertEquals(33.277762117005274, model.lowerLoadThreshold()); - Assertions.assertEquals(2.0849586395403574, model.upperLoadThreshold()); - Assertions.assertEquals("zpnfqntcypsxj", model.scaleInterval()); + Assertions.assertEquals("ouwaboekqvkeln", model.metricName()); + Assertions.assertEquals(14.079251337033272, model.lowerLoadThreshold()); + Assertions.assertEquals(78.11639841389814, model.upperLoadThreshold()); + Assertions.assertEquals("wyjsflhhcaalnjix", model.scaleInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AveragePartitionLoadScalingTrigger model = new AveragePartitionLoadScalingTrigger().withMetricName("uutpwoqhih") - .withLowerLoadThreshold(33.277762117005274) - .withUpperLoadThreshold(2.0849586395403574) - .withScaleInterval("zpnfqntcypsxj"); + AveragePartitionLoadScalingTrigger model + = new AveragePartitionLoadScalingTrigger().withMetricName("ouwaboekqvkeln") + .withLowerLoadThreshold(14.079251337033272) + .withUpperLoadThreshold(78.11639841389814) + .withScaleInterval("wyjsflhhcaalnjix"); model = BinaryData.fromObject(model).toObject(AveragePartitionLoadScalingTrigger.class); - Assertions.assertEquals("uutpwoqhih", model.metricName()); - Assertions.assertEquals(33.277762117005274, model.lowerLoadThreshold()); - Assertions.assertEquals(2.0849586395403574, model.upperLoadThreshold()); - Assertions.assertEquals("zpnfqntcypsxj", model.scaleInterval()); + Assertions.assertEquals("ouwaboekqvkeln", model.metricName()); + Assertions.assertEquals(14.079251337033272, model.lowerLoadThreshold()); + Assertions.assertEquals(78.11639841389814, model.upperLoadThreshold()); + Assertions.assertEquals("wyjsflhhcaalnjix", model.scaleInterval()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java index 48e6bd66dba5..29c11d3d2170 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AverageServiceLoadScalingTriggerTests.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.servicefabricmanagedclusters.generated; @@ -12,28 +12,27 @@ public final class AverageServiceLoadScalingTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AverageServiceLoadScalingTrigger model = BinaryData.fromString( - "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"foimwkslircizjxv\",\"lowerLoadThreshold\":28.724017352929177,\"upperLoadThreshold\":69.63280181639969,\"scaleInterval\":\"acvlhv\",\"useOnlyPrimaryLoad\":true}") + "{\"kind\":\"AverageServiceLoadTrigger\",\"metricName\":\"sxyawjoyaqcs\",\"lowerLoadThreshold\":69.56505476233119,\"upperLoadThreshold\":24.450997223606173,\"scaleInterval\":\"iidzyexzne\",\"useOnlyPrimaryLoad\":false}") .toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("foimwkslircizjxv", model.metricName()); - Assertions.assertEquals(28.724017352929177, model.lowerLoadThreshold()); - Assertions.assertEquals(69.63280181639969, model.upperLoadThreshold()); - Assertions.assertEquals("acvlhv", model.scaleInterval()); - Assertions.assertEquals(true, model.useOnlyPrimaryLoad()); + Assertions.assertEquals("sxyawjoyaqcs", model.metricName()); + Assertions.assertEquals(69.56505476233119, model.lowerLoadThreshold()); + Assertions.assertEquals(24.450997223606173, model.upperLoadThreshold()); + Assertions.assertEquals("iidzyexzne", model.scaleInterval()); + Assertions.assertEquals(false, model.useOnlyPrimaryLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AverageServiceLoadScalingTrigger model - = new AverageServiceLoadScalingTrigger().withMetricName("foimwkslircizjxv") - .withLowerLoadThreshold(28.724017352929177) - .withUpperLoadThreshold(69.63280181639969) - .withScaleInterval("acvlhv") - .withUseOnlyPrimaryLoad(true); + AverageServiceLoadScalingTrigger model = new AverageServiceLoadScalingTrigger().withMetricName("sxyawjoyaqcs") + .withLowerLoadThreshold(69.56505476233119) + .withUpperLoadThreshold(24.450997223606173) + .withScaleInterval("iidzyexzne") + .withUseOnlyPrimaryLoad(false); model = BinaryData.fromObject(model).toObject(AverageServiceLoadScalingTrigger.class); - Assertions.assertEquals("foimwkslircizjxv", model.metricName()); - Assertions.assertEquals(28.724017352929177, model.lowerLoadThreshold()); - Assertions.assertEquals(69.63280181639969, model.upperLoadThreshold()); - Assertions.assertEquals("acvlhv", model.scaleInterval()); - Assertions.assertEquals(true, model.useOnlyPrimaryLoad()); + Assertions.assertEquals("sxyawjoyaqcs", model.metricName()); + Assertions.assertEquals(69.56505476233119, model.lowerLoadThreshold()); + Assertions.assertEquals(24.450997223606173, model.upperLoadThreshold()); + Assertions.assertEquals("iidzyexzne", model.scaleInterval()); + Assertions.assertEquals(false, model.useOnlyPrimaryLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java index 90e6a5f7e5f7..919990524542 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/AzureActiveDirectoryTests.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.servicefabricmanagedclusters.generated; @@ -11,22 +11,23 @@ public final class AzureActiveDirectoryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureActiveDirectory model = BinaryData.fromString( - "{\"tenantId\":\"nhdldwmgxcx\",\"clusterApplication\":\"lpmutwuoegrpkhj\",\"clientApplication\":\"iyq\"}") + AzureActiveDirectory model = BinaryData + .fromString( + "{\"tenantId\":\"nmabik\",\"clusterApplication\":\"orgjhxbldt\",\"clientApplication\":\"wrlkdmtn\"}") .toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nhdldwmgxcx", model.tenantId()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.clusterApplication()); - Assertions.assertEquals("iyq", model.clientApplication()); + Assertions.assertEquals("nmabik", model.tenantId()); + Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); + Assertions.assertEquals("wrlkdmtn", model.clientApplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("nhdldwmgxcx") - .withClusterApplication("lpmutwuoegrpkhj") - .withClientApplication("iyq"); + AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("nmabik") + .withClusterApplication("orgjhxbldt") + .withClientApplication("wrlkdmtn"); model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals("nhdldwmgxcx", model.tenantId()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.clusterApplication()); - Assertions.assertEquals("iyq", model.clientApplication()); + Assertions.assertEquals("nmabik", model.tenantId()); + Assertions.assertEquals("orgjhxbldt", model.clusterApplication()); + Assertions.assertEquals("wrlkdmtn", model.clientApplication()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java index a61d618600d7..6f5478436558 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClientCertificateTests.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.servicefabricmanagedclusters.generated; @@ -12,24 +12,24 @@ public final class ClientCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientCertificate model = BinaryData.fromString( - "{\"isAdmin\":false,\"thumbprint\":\"bcvkcvqvpkeq\",\"commonName\":\"vdrhvoo\",\"issuerThumbprint\":\"otbobzdopcj\"}") + "{\"isAdmin\":true,\"thumbprint\":\"iizynkedyatrwyh\",\"commonName\":\"ibzyhwitsmyp\",\"issuerThumbprint\":\"npcdpumnzgm\"}") .toObject(ClientCertificate.class); - Assertions.assertEquals(false, model.isAdmin()); - Assertions.assertEquals("bcvkcvqvpkeq", model.thumbprint()); - Assertions.assertEquals("vdrhvoo", model.commonName()); - Assertions.assertEquals("otbobzdopcj", model.issuerThumbprint()); + Assertions.assertEquals(true, model.isAdmin()); + Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); + Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); + Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClientCertificate model = new ClientCertificate().withIsAdmin(false) - .withThumbprint("bcvkcvqvpkeq") - .withCommonName("vdrhvoo") - .withIssuerThumbprint("otbobzdopcj"); + ClientCertificate model = new ClientCertificate().withIsAdmin(true) + .withThumbprint("iizynkedyatrwyh") + .withCommonName("ibzyhwitsmyp") + .withIssuerThumbprint("npcdpumnzgm"); model = BinaryData.fromObject(model).toObject(ClientCertificate.class); - Assertions.assertEquals(false, model.isAdmin()); - Assertions.assertEquals("bcvkcvqvpkeq", model.thumbprint()); - Assertions.assertEquals("vdrhvoo", model.commonName()); - Assertions.assertEquals("otbobzdopcj", model.issuerThumbprint()); + Assertions.assertEquals(true, model.isAdmin()); + Assertions.assertEquals("iizynkedyatrwyh", model.thumbprint()); + Assertions.assertEquals("ibzyhwitsmyp", model.commonName()); + Assertions.assertEquals("npcdpumnzgm", model.issuerThumbprint()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java index b44a128ae970..dcdc20ba6cc9 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterHealthPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,18 +12,18 @@ public final class ClusterHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterHealthPolicy model = BinaryData - .fromString("{\"maxPercentUnhealthyNodes\":675446410,\"maxPercentUnhealthyApplications\":588625153}") + .fromString("{\"maxPercentUnhealthyNodes\":322973840,\"maxPercentUnhealthyApplications\":552523145}") .toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(675446410, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(588625153, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(322973840, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(552523145, model.maxPercentUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(675446410) - .withMaxPercentUnhealthyApplications(588625153); + ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(322973840) + .withMaxPercentUnhealthyApplications(552523145); model = BinaryData.fromObject(model).toObject(ClusterHealthPolicy.class); - Assertions.assertEquals(675446410, model.maxPercentUnhealthyNodes()); - Assertions.assertEquals(588625153, model.maxPercentUnhealthyApplications()); + Assertions.assertEquals(322973840, model.maxPercentUnhealthyNodes()); + Assertions.assertEquals(552523145, model.maxPercentUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java index 426800f8646b..e9f96a5509c4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterMonitoringPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,27 +12,27 @@ public final class ClusterMonitoringPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterMonitoringPolicy model = BinaryData.fromString( - "{\"healthCheckWaitDuration\":\"lp\",\"healthCheckStableDuration\":\"wcciuqgbdbu\",\"healthCheckRetryTimeout\":\"auvfbtkuwhhmhyk\",\"upgradeTimeout\":\"joxafnndlpi\",\"upgradeDomainTimeout\":\"hkoymkcdyhbp\"}") + "{\"healthCheckWaitDuration\":\"r\",\"healthCheckStableDuration\":\"lsfeaenwabfatkld\",\"healthCheckRetryTimeout\":\"xbjhwuaanozjosph\",\"upgradeTimeout\":\"oulpjrv\",\"upgradeDomainTimeout\":\"ag\"}") .toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("lp", model.healthCheckWaitDuration()); - Assertions.assertEquals("wcciuqgbdbu", model.healthCheckStableDuration()); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.healthCheckRetryTimeout()); - Assertions.assertEquals("joxafnndlpi", model.upgradeTimeout()); - Assertions.assertEquals("hkoymkcdyhbp", model.upgradeDomainTimeout()); + Assertions.assertEquals("r", model.healthCheckWaitDuration()); + Assertions.assertEquals("lsfeaenwabfatkld", model.healthCheckStableDuration()); + Assertions.assertEquals("xbjhwuaanozjosph", model.healthCheckRetryTimeout()); + Assertions.assertEquals("oulpjrv", model.upgradeTimeout()); + Assertions.assertEquals("ag", model.upgradeDomainTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("lp") - .withHealthCheckStableDuration("wcciuqgbdbu") - .withHealthCheckRetryTimeout("auvfbtkuwhhmhyk") - .withUpgradeTimeout("joxafnndlpi") - .withUpgradeDomainTimeout("hkoymkcdyhbp"); + ClusterMonitoringPolicy model = new ClusterMonitoringPolicy().withHealthCheckWaitDuration("r") + .withHealthCheckStableDuration("lsfeaenwabfatkld") + .withHealthCheckRetryTimeout("xbjhwuaanozjosph") + .withUpgradeTimeout("oulpjrv") + .withUpgradeDomainTimeout("ag"); model = BinaryData.fromObject(model).toObject(ClusterMonitoringPolicy.class); - Assertions.assertEquals("lp", model.healthCheckWaitDuration()); - Assertions.assertEquals("wcciuqgbdbu", model.healthCheckStableDuration()); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.healthCheckRetryTimeout()); - Assertions.assertEquals("joxafnndlpi", model.upgradeTimeout()); - Assertions.assertEquals("hkoymkcdyhbp", model.upgradeDomainTimeout()); + Assertions.assertEquals("r", model.healthCheckWaitDuration()); + Assertions.assertEquals("lsfeaenwabfatkld", model.healthCheckStableDuration()); + Assertions.assertEquals("xbjhwuaanozjosph", model.healthCheckRetryTimeout()); + Assertions.assertEquals("oulpjrv", model.upgradeTimeout()); + Assertions.assertEquals("ag", model.upgradeDomainTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java index 0208750cb23c..1c78a97b9ec0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradeDeltaHealthPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,22 +12,22 @@ public final class ClusterUpgradeDeltaHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model = BinaryData.fromString( - "{\"maxPercentDeltaUnhealthyNodes\":549865384,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1223650177,\"maxPercentDeltaUnhealthyApplications\":413629222}") + "{\"maxPercentDeltaUnhealthyNodes\":1950360907,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1038031643,\"maxPercentDeltaUnhealthyApplications\":1240770029}") .toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(549865384, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1223650177, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(413629222, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1950360907, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(1038031643, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1240770029, model.maxPercentDeltaUnhealthyApplications()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterUpgradeDeltaHealthPolicy model - = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(549865384) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1223650177) - .withMaxPercentDeltaUnhealthyApplications(413629222); + = new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(1950360907) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1038031643) + .withMaxPercentDeltaUnhealthyApplications(1240770029); model = BinaryData.fromObject(model).toObject(ClusterUpgradeDeltaHealthPolicy.class); - Assertions.assertEquals(549865384, model.maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1223650177, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(413629222, model.maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals(1950360907, model.maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(1038031643, model.maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1240770029, model.maxPercentDeltaUnhealthyApplications()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java index f37db9e5640a..1fe3b73f3b45 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ClusterUpgradePolicyTests.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.servicefabricmanagedclusters.generated; @@ -15,48 +15,48 @@ public final class ClusterUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpgradePolicy model = BinaryData.fromString( - "{\"forceRestart\":true,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1655642589,\"maxPercentUnhealthyApplications\":1338367817},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":354911524,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1486476697,\"maxPercentDeltaUnhealthyApplications\":837458643},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"tg\",\"healthCheckStableDuration\":\"wbwo\",\"healthCheckRetryTimeout\":\"nwashrtd\",\"upgradeTimeout\":\"kcnqxwbpo\",\"upgradeDomainTimeout\":\"ulpiuj\"},\"upgradeReplicaSetCheckTimeout\":\"asipqiio\"}") + "{\"forceRestart\":false,\"healthPolicy\":{\"maxPercentUnhealthyNodes\":682770513,\"maxPercentUnhealthyApplications\":581712977},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":1910249555,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":1729587671,\"maxPercentDeltaUnhealthyApplications\":1714837723},\"monitoringPolicy\":{\"healthCheckWaitDuration\":\"ukghimdblxgw\",\"healthCheckStableDuration\":\"mfnjh\",\"healthCheckRetryTimeout\":\"j\",\"upgradeTimeout\":\"wmszkk\",\"upgradeDomainTimeout\":\"oqreyfkzikfjawn\"},\"upgradeReplicaSetCheckTimeout\":\"ivx\"}") .toObject(ClusterUpgradePolicy.class); - Assertions.assertEquals(true, model.forceRestart()); - Assertions.assertEquals(1655642589, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(1338367817, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(354911524, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1486476697, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(837458643, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("tg", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("wbwo", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("nwashrtd", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("kcnqxwbpo", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("ulpiuj", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("asipqiio", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(false, model.forceRestart()); + Assertions.assertEquals(682770513, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(581712977, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(1910249555, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(1729587671, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1714837723, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("ukghimdblxgw", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("mfnjh", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("j", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("wmszkk", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oqreyfkzikfjawn", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ivx", model.upgradeReplicaSetCheckTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(true) - .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1655642589) - .withMaxPercentUnhealthyApplications(1338367817)) - .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(354911524) - .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1486476697) - .withMaxPercentDeltaUnhealthyApplications(837458643)) - .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("tg") - .withHealthCheckStableDuration("wbwo") - .withHealthCheckRetryTimeout("nwashrtd") - .withUpgradeTimeout("kcnqxwbpo") - .withUpgradeDomainTimeout("ulpiuj")) - .withUpgradeReplicaSetCheckTimeout("asipqiio"); + ClusterUpgradePolicy model = new ClusterUpgradePolicy().withForceRestart(false) + .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(682770513) + .withMaxPercentUnhealthyApplications(581712977)) + .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyNodes(1910249555) + .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(1729587671) + .withMaxPercentDeltaUnhealthyApplications(1714837723)) + .withMonitoringPolicy(new ClusterMonitoringPolicy().withHealthCheckWaitDuration("ukghimdblxgw") + .withHealthCheckStableDuration("mfnjh") + .withHealthCheckRetryTimeout("j") + .withUpgradeTimeout("wmszkk") + .withUpgradeDomainTimeout("oqreyfkzikfjawn")) + .withUpgradeReplicaSetCheckTimeout("ivx"); model = BinaryData.fromObject(model).toObject(ClusterUpgradePolicy.class); - Assertions.assertEquals(true, model.forceRestart()); - Assertions.assertEquals(1655642589, model.healthPolicy().maxPercentUnhealthyNodes()); - Assertions.assertEquals(1338367817, model.healthPolicy().maxPercentUnhealthyApplications()); - Assertions.assertEquals(354911524, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); - Assertions.assertEquals(1486476697, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); - Assertions.assertEquals(837458643, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); - Assertions.assertEquals("tg", model.monitoringPolicy().healthCheckWaitDuration()); - Assertions.assertEquals("wbwo", model.monitoringPolicy().healthCheckStableDuration()); - Assertions.assertEquals("nwashrtd", model.monitoringPolicy().healthCheckRetryTimeout()); - Assertions.assertEquals("kcnqxwbpo", model.monitoringPolicy().upgradeTimeout()); - Assertions.assertEquals("ulpiuj", model.monitoringPolicy().upgradeDomainTimeout()); - Assertions.assertEquals("asipqiio", model.upgradeReplicaSetCheckTimeout()); + Assertions.assertEquals(false, model.forceRestart()); + Assertions.assertEquals(682770513, model.healthPolicy().maxPercentUnhealthyNodes()); + Assertions.assertEquals(581712977, model.healthPolicy().maxPercentUnhealthyApplications()); + Assertions.assertEquals(1910249555, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes()); + Assertions.assertEquals(1729587671, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes()); + Assertions.assertEquals(1714837723, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications()); + Assertions.assertEquals("ukghimdblxgw", model.monitoringPolicy().healthCheckWaitDuration()); + Assertions.assertEquals("mfnjh", model.monitoringPolicy().healthCheckStableDuration()); + Assertions.assertEquals("j", model.monitoringPolicy().healthCheckRetryTimeout()); + Assertions.assertEquals("wmszkk", model.monitoringPolicy().upgradeTimeout()); + Assertions.assertEquals("oqreyfkzikfjawn", model.monitoringPolicy().upgradeDomainTimeout()); + Assertions.assertEquals("ivx", model.upgradeReplicaSetCheckTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java index 30d4ef63d60b..1d65e5c647c6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/EndpointRangeDescriptionTests.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.servicefabricmanagedclusters.generated; @@ -11,18 +11,17 @@ public final class EndpointRangeDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":948234782,\"endPort\":1583288095}") + EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":988966310,\"endPort\":485732763}") .toObject(EndpointRangeDescription.class); - Assertions.assertEquals(948234782, model.startPort()); - Assertions.assertEquals(1583288095, model.endPort()); + Assertions.assertEquals(988966310, model.startPort()); + Assertions.assertEquals(485732763, model.endPort()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EndpointRangeDescription model - = new EndpointRangeDescription().withStartPort(948234782).withEndPort(1583288095); + EndpointRangeDescription model = new EndpointRangeDescription().withStartPort(988966310).withEndPort(485732763); model = BinaryData.fromObject(model).toObject(EndpointRangeDescription.class); - Assertions.assertEquals(948234782, model.startPort()); - Assertions.assertEquals(1583288095, model.endPort()); + Assertions.assertEquals(988966310, model.startPort()); + Assertions.assertEquals(485732763, model.endPort()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java new file mode 100644 index 000000000000..8b7dcbcdf198 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationConstraintsTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationConstraintsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationConstraints model = BinaryData.fromString("{\"expirationTime\":\"2021-11-21T09:22:46Z\"}") + .toObject(FaultSimulationConstraints.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FaultSimulationConstraints model + = new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-11-21T09:22:46Z")); + model = BinaryData.fromObject(model).toObject(FaultSimulationConstraints.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T09:22:46Z"), model.expirationTime()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java new file mode 100644 index 000000000000..9202cd0cf001 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationContent model = BinaryData.fromString( + "{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-06-09T08:03:32Z\"}}") + .toObject(FaultSimulationContent.class); + Assertions.assertEquals(true, model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FaultSimulationContent model = new FaultSimulationContent().withForce(true) + .withConstraints( + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-06-09T08:03:32Z"))); + model = BinaryData.fromObject(model).toObject(FaultSimulationContent.class); + Assertions.assertEquals(true, model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T08:03:32Z"), model.constraints().expirationTime()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java new file mode 100644 index 000000000000..009da632c50f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationContentWrapperTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContent; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationContentWrapper; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationContentWrapperTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationContentWrapper model = BinaryData.fromString( + "{\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-03-04T19:19:07Z\"}}}") + .toObject(FaultSimulationContentWrapper.class); + Assertions.assertEquals(false, model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + model.parameters().constraints().expirationTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FaultSimulationContentWrapper model + = new FaultSimulationContentWrapper().withParameters(new FaultSimulationContent().withForce(false) + .withConstraints( + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-03-04T19:19:07Z")))); + model = BinaryData.fromObject(model).toObject(FaultSimulationContentWrapper.class); + Assertions.assertEquals(false, model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:19:07Z"), + model.parameters().constraints().expirationTime()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java new file mode 100644 index 000000000000..9c08603941bc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationDetailsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationDetails; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationDetails model = BinaryData.fromString( + "{\"clusterId\":\"wkqbrqu\",\"operationId\":\"axhexiilivp\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"r\",\"status\":\"Done\",\"operationId\":\"oaxoruzfgsqu\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"xxle\",\"status\":\"Done\",\"operationId\":\"mxjezwlw\",\"operationStatus\":\"Succeeded\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-10-02T16:07:13Z\"}}}") + .toObject(FaultSimulationDetails.class); + Assertions.assertEquals("wkqbrqu", model.clusterId()); + Assertions.assertEquals("axhexiilivp", model.operationId()); + Assertions.assertEquals("r", model.nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.DONE, model.nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("oaxoruzfgsqu", model.nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.STARTED, model.nodeTypeFaultSimulation().get(0).operationStatus()); + Assertions.assertEquals(false, model.parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T16:07:13Z"), + model.parameters().constraints().expirationTime()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java new file mode 100644 index 000000000000..28c818cebc39 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationIdContentTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationIdContent; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationIdContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationIdContent model + = BinaryData.fromString("{\"simulationId\":\"mareqnajxqugj\"}").toObject(FaultSimulationIdContent.class); + Assertions.assertEquals("mareqnajxqugj", model.simulationId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FaultSimulationIdContent model = new FaultSimulationIdContent().withSimulationId("mareqnajxqugj"); + model = BinaryData.fromObject(model).toObject(FaultSimulationIdContent.class); + Assertions.assertEquals("mareqnajxqugj", model.simulationId()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java new file mode 100644 index 000000000000..0f8a5508baa3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationInnerTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.FaultSimulationInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationInner model = BinaryData.fromString( + "{\"simulationId\":\"ycubeddgs\",\"status\":\"Starting\",\"startTime\":\"2021-01-03T15:36:46Z\",\"endTime\":\"2021-08-12T00:48:32Z\",\"details\":{\"clusterId\":\"lkrm\",\"operationId\":\"i\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"cqqudf\",\"status\":\"Active\",\"operationId\":\"baaa\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"ayffim\",\"status\":\"Active\",\"operationId\":\"uzqogsexnevf\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"wmewzsyy\",\"status\":\"Starting\",\"operationId\":\"soibjudpfrx\",\"operationStatus\":\"Failed\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":true,\"constraints\":{\"expirationTime\":\"2021-08-03T17:35Z\"}}}}") + .toObject(FaultSimulationInner.class); + Assertions.assertEquals("ycubeddgs", model.simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STARTING, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T15:36:46Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T00:48:32Z"), model.endTime()); + Assertions.assertEquals("lkrm", model.details().clusterId()); + Assertions.assertEquals("i", model.details().operationId()); + Assertions.assertEquals("cqqudf", model.details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.ACTIVE, + model.details().nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("baaa", model.details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, + model.details().nodeTypeFaultSimulation().get(0).operationStatus()); + Assertions.assertEquals(true, model.details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T17:35Z"), + model.details().parameters().constraints().expirationTime()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java new file mode 100644 index 000000000000..24f0314cc003 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FaultSimulationListResultTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.FaultSimulationListResult; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class FaultSimulationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FaultSimulationListResult model = BinaryData.fromString( + "{\"value\":[{\"simulationId\":\"pulpqblylsyxk\",\"status\":\"StopFailed\",\"startTime\":\"2021-09-15T07:03:18Z\",\"endTime\":\"2021-04-06T04:34:54Z\",\"details\":{\"clusterId\":\"iagxsdszuempsbz\",\"operationId\":\"z\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"pnqi\",\"status\":\"Active\",\"operationId\":\"v\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"dxrbuukzcle\",\"status\":\"StartFailed\",\"operationId\":\"lw\",\"operationStatus\":\"Succeeded\"},{\"nodeTypeName\":\"zpof\",\"status\":\"Stopping\",\"operationId\":\"wyfzqwhxxbuyqa\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"qztpp\",\"status\":\"Stopping\",\"operationId\":\"xorjaltolmncwsob\",\"operationStatus\":\"Created\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2021-09-05T19:42:48Z\"}}}},{\"simulationId\":\"fhucqdpfuv\",\"status\":\"Done\",\"startTime\":\"2021-09-06T08:21:41Z\",\"endTime\":\"2021-05-13T14:00:03Z\",\"details\":{\"clusterId\":\"vxb\",\"operationId\":\"vudutncor\",\"nodeTypeFaultSimulation\":[{\"nodeTypeName\":\"qtvcofudflvkgj\",\"status\":\"Done\",\"operationId\":\"knnqvsaznq\",\"operationStatus\":\"Failed\"},{\"nodeTypeName\":\"udsgs\",\"status\":\"Done\",\"operationId\":\"yc\",\"operationStatus\":\"Started\"},{\"nodeTypeName\":\"wjue\",\"status\":\"StartFailed\",\"operationId\":\"uruv\",\"operationStatus\":\"Aborted\"}],\"parameters\":{\"faultKind\":\"FaultSimulationContent\",\"force\":false,\"constraints\":{\"expirationTime\":\"2020-12-25T04:12:31Z\"}}}}],\"nextLink\":\"ab\"}") + .toObject(FaultSimulationListResult.class); + Assertions.assertEquals("pulpqblylsyxk", model.value().get(0).simulationId()); + Assertions.assertEquals(FaultSimulationStatus.STOP_FAILED, model.value().get(0).status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T07:03:18Z"), model.value().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T04:34:54Z"), model.value().get(0).endTime()); + Assertions.assertEquals("iagxsdszuempsbz", model.value().get(0).details().clusterId()); + Assertions.assertEquals("z", model.value().get(0).details().operationId()); + Assertions.assertEquals("pnqi", model.value().get(0).details().nodeTypeFaultSimulation().get(0).nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.ACTIVE, + model.value().get(0).details().nodeTypeFaultSimulation().get(0).status()); + Assertions.assertEquals("v", model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationId()); + Assertions.assertEquals(SfmcOperationStatus.FAILED, + model.value().get(0).details().nodeTypeFaultSimulation().get(0).operationStatus()); + Assertions.assertEquals(false, model.value().get(0).details().parameters().force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T19:42:48Z"), + model.value().get(0).details().parameters().constraints().expirationTime()); + Assertions.assertEquals("ab", model.nextLink()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java index 4cdf93f8cbe1..eeabf7b66b80 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/FrontendConfigurationTests.java @@ -1,36 +1,36 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.models.FrontendConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpAddressType; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPAddressType; import org.junit.jupiter.api.Assertions; public final class FrontendConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FrontendConfiguration model = BinaryData.fromString( - "{\"ipAddressType\":\"IPv6\",\"loadBalancerBackendAddressPoolId\":\"wzrmuh\",\"loadBalancerInboundNatPoolId\":\"fcqdpsq\",\"applicationGatewayBackendAddressPoolId\":\"vpsvuoymgcce\"}") + "{\"ipAddressType\":\"IPv6\",\"loadBalancerBackendAddressPoolId\":\"cdwxlpq\",\"loadBalancerInboundNatPoolId\":\"ftnkhtj\",\"applicationGatewayBackendAddressPoolId\":\"i\"}") .toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); - Assertions.assertEquals("wzrmuh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("fcqdpsq", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("vpsvuoymgcce", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("cdwxlpq", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("ftnkhtj", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("i", model.applicationGatewayBackendAddressPoolId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IpAddressType.IPV6) - .withLoadBalancerBackendAddressPoolId("wzrmuh") - .withLoadBalancerInboundNatPoolId("fcqdpsq") - .withApplicationGatewayBackendAddressPoolId("vpsvuoymgcce"); + FrontendConfiguration model = new FrontendConfiguration().withIpAddressType(IPAddressType.IPV6) + .withLoadBalancerBackendAddressPoolId("cdwxlpq") + .withLoadBalancerInboundNatPoolId("ftnkhtj") + .withApplicationGatewayBackendAddressPoolId("i"); model = BinaryData.fromObject(model).toObject(FrontendConfiguration.class); - Assertions.assertEquals(IpAddressType.IPV6, model.ipAddressType()); - Assertions.assertEquals("wzrmuh", model.loadBalancerBackendAddressPoolId()); - Assertions.assertEquals("fcqdpsq", model.loadBalancerInboundNatPoolId()); - Assertions.assertEquals("vpsvuoymgcce", model.applicationGatewayBackendAddressPoolId()); + Assertions.assertEquals(IPAddressType.IPV6, model.ipAddressType()); + Assertions.assertEquals("cdwxlpq", model.loadBalancerBackendAddressPoolId()); + Assertions.assertEquals("ftnkhtj", model.loadBalancerInboundNatPoolId()); + Assertions.assertEquals("i", model.applicationGatewayBackendAddressPoolId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IPConfigurationPublicIPAddressConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IPConfigurationPublicIPAddressConfigurationTests.java new file mode 100644 index 000000000000..4dcc50ebfa57 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IPConfigurationPublicIPAddressConfigurationTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPConfigurationPublicIPAddressConfiguration; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIPAddressVersion; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class IPConfigurationPublicIPAddressConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IPConfigurationPublicIPAddressConfiguration model = BinaryData.fromString( + "{\"name\":\"vvt\",\"ipTags\":[{\"ipTagType\":\"inqfiufxqknpirgn\",\"tag\":\"pttwqmsn\"},{\"ipTagType\":\"ffcdmqnrojl\",\"tag\":\"ijnkrxfrdd\"}],\"publicIPAddressVersion\":\"IPv4\"}") + .toObject(IPConfigurationPublicIPAddressConfiguration.class); + Assertions.assertEquals("vvt", model.name()); + Assertions.assertEquals("inqfiufxqknpirgn", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("pttwqmsn", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV4, model.publicIPAddressVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IPConfigurationPublicIPAddressConfiguration model + = new IPConfigurationPublicIPAddressConfiguration().withName("vvt") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("inqfiufxqknpirgn").withTag("pttwqmsn"), + new IpTag().withIpTagType("ffcdmqnrojl").withTag("ijnkrxfrdd"))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV4); + model = BinaryData.fromObject(model).toObject(IPConfigurationPublicIPAddressConfiguration.class); + Assertions.assertEquals("vvt", model.name()); + Assertions.assertEquals("inqfiufxqknpirgn", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("pttwqmsn", model.ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV4, model.publicIPAddressVersion()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java deleted file mode 100644 index 471c12c7482c..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationPublicIpAddressConfigurationTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationPublicIpAddressConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigurationPublicIpAddressConfiguration model = BinaryData.fromString( - "{\"name\":\"ithtywu\",\"ipTags\":[{\"ipTagType\":\"bihwqknfdnt\",\"tag\":\"jchrdgoihxumw\"},{\"ipTagType\":\"ton\",\"tag\":\"zj\"}],\"publicIPAddressVersion\":\"IPv4\"}") - .toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("ithtywu", model.name()); - Assertions.assertEquals("bihwqknfdnt", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("jchrdgoihxumw", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigurationPublicIpAddressConfiguration model - = new IpConfigurationPublicIpAddressConfiguration().withName("ithtywu") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("bihwqknfdnt").withTag("jchrdgoihxumw"), - new IpTag().withIpTagType("ton").withTag("zj"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4); - model = BinaryData.fromObject(model).toObject(IpConfigurationPublicIpAddressConfiguration.class); - Assertions.assertEquals("ithtywu", model.name()); - Assertions.assertEquals("bihwqknfdnt", model.ipTags().get(0).ipTagType()); - Assertions.assertEquals("jchrdgoihxumw", model.ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, model.publicIpAddressVersion()); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java index 88038b594dc2..4c304484264c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpConfigurationTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.management.SubResource; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.IPConfigurationPublicIPAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfiguration; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpConfigurationPublicIpAddressConfiguration; import com.azure.resourcemanager.servicefabricmanagedclusters.models.IpTag; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIpAddressVersion; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIpAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PrivateIPAddressVersion; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.PublicIPAddressVersion; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,49 +18,45 @@ public final class IpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IpConfiguration model = BinaryData.fromString( - "{\"name\":\"saz\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"qkagfhsxt\"},{\"id\":\"ugzxnf\"},{\"id\":\"zpxdt\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"kqjjlwuenvrkp\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"ibreb\"},{\"id\":\"aysjkixqtnqttez\"},{\"id\":\"fffiak\"},{\"id\":\"pqqmted\"}],\"subnet\":{\"id\":\"mjihyeozphv\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"qncygupkvi\",\"ipTags\":[{\"ipTagType\":\"scw\",\"tag\":\"qupevzh\"},{\"ipTagType\":\"stotxh\",\"tag\":\"jujbypelmcuvhixb\"},{\"ipTagType\":\"xyfwnylrcool\",\"tag\":\"ttpkiwkkbnujrywv\"},{\"ipTagType\":\"y\",\"tag\":\"bfpncurdo\"}],\"publicIPAddressVersion\":\"IPv4\"}}") + "{\"name\":\"lmcuvhixb\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"w\"},{\"id\":\"lrcoolsttpki\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"nujrywvtyl\"},{\"id\":\"pncur\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"iithtywu\"}],\"subnet\":{\"id\":\"bihwqknfdnt\"},\"privateIPAddressVersion\":\"IPv6\",\"publicIPAddressConfiguration\":{\"name\":\"rdgoihxumw\",\"ipTags\":[{\"ipTagType\":\"ndz\",\"tag\":\"luudfdlwggytsb\"}],\"publicIPAddressVersion\":\"IPv6\"}}") .toObject(IpConfiguration.class); - Assertions.assertEquals("saz", model.name()); - Assertions.assertEquals("qkagfhsxt", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("kqjjlwuenvrkp", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("ibreb", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("mjihyeozphv", model.subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("qncygupkvi", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("scw", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("qupevzh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, - model.publicIpAddressConfiguration().publicIpAddressVersion()); + Assertions.assertEquals("lmcuvhixb", model.name()); + Assertions.assertEquals("w", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("nujrywvtyl", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("iithtywu", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("bihwqknfdnt", model.subnet().id()); + Assertions.assertEquals(PrivateIPAddressVersion.IPV6, model.privateIPAddressVersion()); + Assertions.assertEquals("rdgoihxumw", model.publicIPAddressConfiguration().name()); + Assertions.assertEquals("ndz", model.publicIPAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("luudfdlwggytsb", model.publicIPAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV6, + model.publicIPAddressConfiguration().publicIPAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpConfiguration model = new IpConfiguration().withName("saz") - .withApplicationGatewayBackendAddressPools(Arrays.asList(new SubResource().withId("qkagfhsxt"), - new SubResource().withId("ugzxnf"), new SubResource().withId("zpxdt"))) - .withLoadBalancerBackendAddressPools(Arrays.asList(new SubResource().withId("kqjjlwuenvrkp"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId("ibreb"), new SubResource().withId("aysjkixqtnqttez"), - new SubResource().withId("fffiak"), new SubResource().withId("pqqmted"))) - .withSubnet(new SubResource().withId("mjihyeozphv")) - .withPrivateIpAddressVersion(PrivateIpAddressVersion.IPV6) - .withPublicIpAddressConfiguration(new IpConfigurationPublicIpAddressConfiguration().withName("qncygupkvi") - .withIpTags(Arrays.asList(new IpTag().withIpTagType("scw").withTag("qupevzh"), - new IpTag().withIpTagType("stotxh").withTag("jujbypelmcuvhixb"), - new IpTag().withIpTagType("xyfwnylrcool").withTag("ttpkiwkkbnujrywv"), - new IpTag().withIpTagType("y").withTag("bfpncurdo"))) - .withPublicIpAddressVersion(PublicIpAddressVersion.IPV4)); + IpConfiguration model = new IpConfiguration().withName("lmcuvhixb") + .withApplicationGatewayBackendAddressPools( + Arrays.asList(new SubResource().withId("w"), new SubResource().withId("lrcoolsttpki"))) + .withLoadBalancerBackendAddressPools( + Arrays.asList(new SubResource().withId("nujrywvtyl"), new SubResource().withId("pncur"))) + .withLoadBalancerInboundNatPools(Arrays.asList(new SubResource().withId("iithtywu"))) + .withSubnet(new SubResource().withId("bihwqknfdnt")) + .withPrivateIPAddressVersion(PrivateIPAddressVersion.IPV6) + .withPublicIPAddressConfiguration(new IPConfigurationPublicIPAddressConfiguration().withName("rdgoihxumw") + .withIpTags(Arrays.asList(new IpTag().withIpTagType("ndz").withTag("luudfdlwggytsb"))) + .withPublicIPAddressVersion(PublicIPAddressVersion.IPV6)); model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("saz", model.name()); - Assertions.assertEquals("qkagfhsxt", model.applicationGatewayBackendAddressPools().get(0).id()); - Assertions.assertEquals("kqjjlwuenvrkp", model.loadBalancerBackendAddressPools().get(0).id()); - Assertions.assertEquals("ibreb", model.loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals("mjihyeozphv", model.subnet().id()); - Assertions.assertEquals(PrivateIpAddressVersion.IPV6, model.privateIpAddressVersion()); - Assertions.assertEquals("qncygupkvi", model.publicIpAddressConfiguration().name()); - Assertions.assertEquals("scw", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); - Assertions.assertEquals("qupevzh", model.publicIpAddressConfiguration().ipTags().get(0).tag()); - Assertions.assertEquals(PublicIpAddressVersion.IPV4, - model.publicIpAddressConfiguration().publicIpAddressVersion()); + Assertions.assertEquals("lmcuvhixb", model.name()); + Assertions.assertEquals("w", model.applicationGatewayBackendAddressPools().get(0).id()); + Assertions.assertEquals("nujrywvtyl", model.loadBalancerBackendAddressPools().get(0).id()); + Assertions.assertEquals("iithtywu", model.loadBalancerInboundNatPools().get(0).id()); + Assertions.assertEquals("bihwqknfdnt", model.subnet().id()); + Assertions.assertEquals(PrivateIPAddressVersion.IPV6, model.privateIPAddressVersion()); + Assertions.assertEquals("rdgoihxumw", model.publicIPAddressConfiguration().name()); + Assertions.assertEquals("ndz", model.publicIPAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("luudfdlwggytsb", model.publicIPAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertEquals(PublicIPAddressVersion.IPV6, + model.publicIPAddressConfiguration().publicIPAddressVersion()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java index 69e4d2ad900d..aa45f125be32 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/IpTagTests.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.servicefabricmanagedclusters.generated; @@ -11,16 +11,16 @@ public final class IpTagTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpTag model = BinaryData.fromString("{\"ipTagType\":\"qgxy\",\"tag\":\"mocmbqfqvmk\"}").toObject(IpTag.class); - Assertions.assertEquals("qgxy", model.ipTagType()); - Assertions.assertEquals("mocmbqfqvmk", model.tag()); + IpTag model = BinaryData.fromString("{\"ipTagType\":\"vc\",\"tag\":\"ayrhyrnx\"}").toObject(IpTag.class); + Assertions.assertEquals("vc", model.ipTagType()); + Assertions.assertEquals("ayrhyrnx", model.tag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpTag model = new IpTag().withIpTagType("qgxy").withTag("mocmbqfqvmk"); + IpTag model = new IpTag().withIpTagType("vc").withTag("ayrhyrnx"); model = BinaryData.fromObject(model).toObject(IpTag.class); - Assertions.assertEquals("qgxy", model.ipTagType()); - Assertions.assertEquals("mocmbqfqvmk", model.tag()); + Assertions.assertEquals("vc", model.ipTagType()); + Assertions.assertEquals("ayrhyrnx", model.tag()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java index 0034e6208452..4688c4a77e2b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/LoadBalancingRuleTests.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.servicefabricmanagedclusters.generated; @@ -14,33 +14,33 @@ public final class LoadBalancingRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LoadBalancingRule model = BinaryData.fromString( - "{\"frontendPort\":431399757,\"backendPort\":836308274,\"protocol\":\"udp\",\"probePort\":90744470,\"probeProtocol\":\"http\",\"probeRequestPath\":\"xhuri\",\"loadDistribution\":\"bpodxunkbebxm\"}") + "{\"frontendPort\":929911976,\"backendPort\":1475911208,\"protocol\":\"tcp\",\"probePort\":161159064,\"probeProtocol\":\"https\",\"probeRequestPath\":\"utauv\",\"loadDistribution\":\"tkuwhhmhykojo\"}") .toObject(LoadBalancingRule.class); - Assertions.assertEquals(431399757, model.frontendPort()); - Assertions.assertEquals(836308274, model.backendPort()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals(90744470, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); - Assertions.assertEquals("xhuri", model.probeRequestPath()); - Assertions.assertEquals("bpodxunkbebxm", model.loadDistribution()); + Assertions.assertEquals(929911976, model.frontendPort()); + Assertions.assertEquals(1475911208, model.backendPort()); + Assertions.assertEquals(Protocol.TCP, model.protocol()); + Assertions.assertEquals(161159064, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); + Assertions.assertEquals("utauv", model.probeRequestPath()); + Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(431399757) - .withBackendPort(836308274) - .withProtocol(Protocol.UDP) - .withProbePort(90744470) - .withProbeProtocol(ProbeProtocol.HTTP) - .withProbeRequestPath("xhuri") - .withLoadDistribution("bpodxunkbebxm"); + LoadBalancingRule model = new LoadBalancingRule().withFrontendPort(929911976) + .withBackendPort(1475911208) + .withProtocol(Protocol.TCP) + .withProbePort(161159064) + .withProbeProtocol(ProbeProtocol.HTTPS) + .withProbeRequestPath("utauv") + .withLoadDistribution("tkuwhhmhykojo"); model = BinaryData.fromObject(model).toObject(LoadBalancingRule.class); - Assertions.assertEquals(431399757, model.frontendPort()); - Assertions.assertEquals(836308274, model.backendPort()); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals(90744470, model.probePort()); - Assertions.assertEquals(ProbeProtocol.HTTP, model.probeProtocol()); - Assertions.assertEquals("xhuri", model.probeRequestPath()); - Assertions.assertEquals("bpodxunkbebxm", model.loadDistribution()); + Assertions.assertEquals(929911976, model.frontendPort()); + Assertions.assertEquals(1475911208, model.backendPort()); + Assertions.assertEquals(Protocol.TCP, model.protocol()); + Assertions.assertEquals(161159064, model.probePort()); + Assertions.assertEquals(ProbeProtocol.HTTPS, model.probeProtocol()); + Assertions.assertEquals("utauv", model.probeRequestPath()); + Assertions.assertEquals("tkuwhhmhykojo", model.loadDistribution()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithReMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithReMockTests.java index 3cbd14043e9f..64a7a28d52d2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithReMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedApplyMaintenanceWindowsPostWithReMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -22,13 +22,13 @@ public void testPostWithResponse() throws Exception { HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.managedApplyMaintenanceWindows() - .postWithResponse("blmljh", "nymzotqyr", com.azure.core.util.Context.NONE); + .postWithResponse("bqigkx", "bsazgakg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java index b511ff34f657..1d55cb239b26 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusInnerTests.java @@ -1,26 +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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedAzResiliencyStatusInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ResourceAzStatus; -import java.util.Arrays; public final class ManagedAzResiliencyStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedAzResiliencyStatusInner model = BinaryData.fromString( - "{\"baseResourceStatus\":[{\"resourceName\":\"iftohqkvpu\",\"resourceType\":\"sgplsakn\",\"isZoneResilient\":true,\"details\":\"ynl\"},{\"resourceName\":\"huopxodlqiynto\",\"resourceType\":\"ihleos\",\"isZoneResilient\":false,\"details\":\"rmslyzrpzbchckqq\"},{\"resourceName\":\"ioxiysuiizyn\",\"resourceType\":\"dy\",\"isZoneResilient\":true,\"details\":\"yhqmibzyhwi\"},{\"resourceName\":\"mypyynpcdpu\",\"resourceType\":\"zgmwznmabikns\",\"isZoneResilient\":false,\"details\":\"hxbld\"}],\"isClusterZoneResilient\":true}") + "{\"baseResourceStatus\":[{\"resourceName\":\"vtpuqujmqlgk\",\"resourceType\":\"tndoaongbjc\",\"isZoneResilient\":true,\"details\":\"i\"},{\"resourceName\":\"jed\",\"resourceType\":\"wwa\",\"isZoneResilient\":false,\"details\":\"jvdcpzfoqouic\"}],\"isClusterZoneResilient\":true}") .toObject(ManagedAzResiliencyStatusInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedAzResiliencyStatusInner model = new ManagedAzResiliencyStatusInner().withBaseResourceStatus(Arrays - .asList(new ResourceAzStatus(), new ResourceAzStatus(), new ResourceAzStatus(), new ResourceAzStatus())); - model = BinaryData.fromObject(model).toObject(ManagedAzResiliencyStatusInner.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponMockTests.java index a33b58a8a288..12d8fbc2524d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedAzResiliencyStatusesGetWithResponMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedAzResiliencyStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -20,17 +20,17 @@ public final class ManagedAzResiliencyStatusesGetWithResponMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"baseResourceStatus\":[{\"resourceName\":\"slnelx\",\"resourceType\":\"ixynllxecwcrojp\",\"isZoneResilient\":false,\"details\":\"cawjutifdwfmvi\"},{\"resourceName\":\"rqjb\",\"resourceType\":\"zhraglkafh\",\"isZoneResilient\":true,\"details\":\"ujeickp\"},{\"resourceName\":\"cpopmxel\",\"resourceType\":\"clt\",\"isZoneResilient\":true,\"details\":\"ex\"},{\"resourceName\":\"lfmk\",\"resourceType\":\"cazuaw\",\"isZoneResilient\":false,\"details\":\"puamwabzxr\"}],\"isClusterZoneResilient\":false}"; + = "{\"baseResourceStatus\":[{\"resourceName\":\"o\",\"resourceType\":\"bxiqxeiiqbimht\",\"isZoneResilient\":true,\"details\":\"nhe\"},{\"resourceName\":\"qpofvwbc\",\"resourceType\":\"embnkbw\",\"isZoneResilient\":true,\"details\":\"kdi\"},{\"resourceName\":\"ihebwtsw\",\"resourceType\":\"uwfmduragegizvc\",\"isZoneResilient\":false,\"details\":\"isdju\"}],\"isClusterZoneResilient\":false}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ManagedAzResiliencyStatus response = manager.managedAzResiliencyStatuses() - .getWithResponse("frygznmmax", "izkzobgo", com.azure.core.util.Context.NONE) + .getWithResponse("sqltnzo", "bgsxgnxfyqonmpq", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java index a2605d1ba371..64c96155dc00 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClusterUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -13,18 +13,18 @@ public final class ManagedClusterUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedClusterUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"vljxywsu\":\"dreqnovvqf\",\"aeneqnzarrwl\":\"syrsndsytgadgvra\",\"jfqka\":\"uu\",\"iipfpubj\":\"e\"}}") - .toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("dreqnovvqf", model.tags().get("vljxywsu")); + ManagedClusterUpdateParameters model + = BinaryData.fromString("{\"tags\":{\"tcs\":\"mjwosytx\",\"zikhl\":\"fcktqumiekke\"}}") + .toObject(ManagedClusterUpdateParameters.class); + Assertions.assertEquals("mjwosytx", model.tags().get("tcs")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedClusterUpdateParameters model = new ManagedClusterUpdateParameters().withTags( - mapOf("vljxywsu", "dreqnovvqf", "aeneqnzarrwl", "syrsndsytgadgvra", "jfqka", "uu", "iipfpubj", "e")); + ManagedClusterUpdateParameters model + = new ManagedClusterUpdateParameters().withTags(mapOf("tcs", "mjwosytx", "zikhl", "fcktqumiekke")); model = BinaryData.fromObject(model).toObject(ManagedClusterUpdateParameters.class); - Assertions.assertEquals("dreqnovvqf", model.tags().get("vljxywsu")); + Assertions.assertEquals("mjwosytx", model.tags().get("tcs")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteMockTests.java deleted file mode 100644 index da35ca7b7853..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedClustersDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedClusters().delete("nqnm", "jng", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedIdentityTests.java index 77f3aab231d3..f59096514c4f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedIdentityTests.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.servicefabricmanagedclusters.generated; @@ -16,18 +16,18 @@ public final class ManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedIdentity model = BinaryData.fromString( - "{\"principalId\":\"rwzwbng\",\"tenantId\":\"tnwu\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"htymw\":{\"principalId\":\"ufizuckyf\",\"clientId\":\"rfidfvzwdz\"},\"ufufsrp\":{\"principalId\":\"dkfthwxmnt\",\"clientId\":\"waopvkmijcmmxd\"}}}") + "{\"principalId\":\"qrolfpf\",\"tenantId\":\"algbquxigjyjg\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"qawrlyxwj\":{\"principalId\":\"hr\",\"clientId\":\"ilnerkujysvlejuv\"},\"qguhmuo\":{\"principalId\":\"prbnwbxgjvtbv\",\"clientId\":\"sszdnru\"},\"uizga\":{\"principalId\":\"f\",\"clientId\":\"wzwbnguitn\"},\"htymw\":{\"principalId\":\"ufizuckyf\",\"clientId\":\"rfidfvzwdz\"}}}") .toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedIdentity model = new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("htymw", new UserAssignedIdentity(), "ufufsrp", new UserAssignedIdentity())); + ManagedIdentity model = new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("qawrlyxwj", new UserAssignedIdentity(), "qguhmuo", + new UserAssignedIdentity(), "uizga", new UserAssignedIdentity(), "htymw", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java index 650c45fd2496..cda80be9ff64 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusInnerTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,7 @@ public final class ManagedMaintenanceWindowStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedMaintenanceWindowStatusInner model = BinaryData.fromString( - "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":true,\"canApplyUpdates\":false,\"lastWindowStatusUpdateAtUTC\":\"2021-06-27T13:19:51Z\",\"lastWindowStartTimeUTC\":\"2021-11-27T19:41:33Z\",\"lastWindowEndTimeUTC\":\"2021-07-14T11:57:20Z\"}") + "{\"isWindowEnabled\":true,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-10-15T06:55:02Z\",\"lastWindowStartTimeUTC\":\"2021-03-04T17:22:18Z\",\"lastWindowEndTimeUTC\":\"2021-10-02T18:29:47Z\"}") .toObject(ManagedMaintenanceWindowStatusInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedMaintenanceWindowStatusInner model = new ManagedMaintenanceWindowStatusInner(); - model = BinaryData.fromObject(model).toObject(ManagedMaintenanceWindowStatusInner.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithRMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithRMockTests.java index 7f0f88743ae6..058aadd2d4de 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithRMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedMaintenanceWindowStatusesGetWithRMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedMaintenanceWindowStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -20,17 +20,17 @@ public final class ManagedMaintenanceWindowStatusesGetWithRMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"isWindowEnabled\":false,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":true,\"lastWindowStatusUpdateAtUTC\":\"2021-01-02T09:30:03Z\",\"lastWindowStartTimeUTC\":\"2021-01-04T00:33:47Z\",\"lastWindowEndTimeUTC\":\"2021-02-04T00:10:52Z\"}"; + = "{\"isWindowEnabled\":false,\"isRegionReady\":false,\"isWindowActive\":false,\"canApplyUpdates\":false,\"lastWindowStatusUpdateAtUTC\":\"2021-08-17T17:08:13Z\",\"lastWindowStartTimeUTC\":\"2021-07-13T23:58:09Z\",\"lastWindowEndTimeUTC\":\"2021-10-05T19:55:57Z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ManagedMaintenanceWindowStatus response = manager.managedMaintenanceWindowStatuses() - .getWithResponse("ushsp", "aivmxyasflvgs", com.azure.core.util.Context.NONE) + .getWithResponse("cyrcmjdmspo", "apvu", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedProxyResourceTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedProxyResourceTests.java deleted file mode 100644 index 46967c039c7b..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedProxyResourceTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedProxyResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedProxyResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedProxyResource model = BinaryData.fromString( - "{\"tags\":{\"nepttwqmsni\":\"iufxqknpir\",\"rxfrddhc\":\"fcdmqnrojlpijn\"},\"id\":\"tizzronasxif\",\"name\":\"ozqyzh\",\"type\":\"tw\"}") - .toObject(ManagedProxyResource.class); - Assertions.assertEquals("iufxqknpir", model.tags().get("nepttwqmsni")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedProxyResource model - = new ManagedProxyResource().withTags(mapOf("nepttwqmsni", "iufxqknpir", "rxfrddhc", "fcdmqnrojlpijn")); - model = BinaryData.fromObject(model).toObject(ManagedProxyResource.class); - Assertions.assertEquals("iufxqknpir", model.tags().get("nepttwqmsni")); - } - - // 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/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java index 42ff51c0bcaa..588dc1d4dc27 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesGetWithResponseMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedVMSize; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -20,17 +20,17 @@ public final class ManagedUnsupportedVMSizesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"size\":\"waxfewzjkj\"},\"id\":\"fdeqvhpsyl\",\"name\":\"shk\",\"type\":\"f\"}"; + = "{\"properties\":{\"size\":\"nh\"},\"id\":\"kpbz\",\"name\":\"piljhahzvech\",\"type\":\"bnwieholew\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ManagedVMSize response = manager.managedUnsupportedVMSizes() - .getWithResponse("ylptrsqqwztcm", "qkc", com.azure.core.util.Context.NONE) + .getWithResponse("wwyyurmoch", "prprsnmokay", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java index 8915a610b3c0..3e5fe6276150 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedUnsupportedVMSizesListMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedVMSize; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,17 +21,17 @@ public final class ManagedUnsupportedVMSizesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"size\":\"crpfbcunez\"},\"id\":\"e\",\"name\":\"lfwyfwlwxjwetn\",\"type\":\"ihclafzv\"}]}"; + = "{\"value\":[{\"properties\":{\"size\":\"qsfapaqt\"},\"id\":\"rrqwexjk\",\"name\":\"xap\",\"type\":\"og\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.managedUnsupportedVMSizes().list("fy", com.azure.core.util.Context.NONE); + = manager.managedUnsupportedVMSizes().list("wiuub", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java index 1b3fb732902e..25fba7a61871 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizeInnerTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,7 @@ public final class ManagedVMSizeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedVMSizeInner model = BinaryData.fromString( - "{\"properties\":{\"size\":\"eae\"},\"id\":\"abfatkl\",\"name\":\"xbjhwuaanozjosph\",\"type\":\"ulpjr\"}") + "{\"properties\":{\"size\":\"j\"},\"id\":\"nhdldwmgxcx\",\"name\":\"lpmutwuoegrpkhj\",\"type\":\"iyq\"}") .toObject(ManagedVMSizeInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedVMSizeInner model = new ManagedVMSizeInner(); - model = BinaryData.fromObject(model).toObject(ManagedVMSizeInner.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java index 7e7aec27da72..14f686f284c0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ManagedVMSizesResultTests.java @@ -1,26 +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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ManagedVMSizeInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ManagedVMSizesResult; -import java.util.Arrays; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ManagedVMSizesResult; +import org.junit.jupiter.api.Assertions; public final class ManagedVMSizesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedVMSizesResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"size\":\"v\"},\"id\":\"vc\",\"name\":\"y\",\"type\":\"yrnxxmueedn\"},{\"properties\":{\"size\":\"v\"},\"id\":\"kwqqtchealmf\",\"name\":\"d\",\"type\":\"ygdvwv\"},{\"properties\":{\"size\":\"ohgwxrtfudxepxg\"},\"id\":\"agvrvmnpkuk\",\"name\":\"i\",\"type\":\"blxgwimf\"},{\"properties\":{\"size\":\"fjxwmsz\"},\"id\":\"foqreyfkzik\",\"name\":\"aw\",\"type\":\"a\"}],\"nextLink\":\"xwczelpcire\"}") + "{\"value\":[{\"properties\":{\"size\":\"zl\"},\"id\":\"bmpaxmodfvu\",\"name\":\"yw\",\"type\":\"pfvmwyhrfou\"}],\"nextLink\":\"taakc\"}") .toObject(ManagedVMSizesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedVMSizesResult model = new ManagedVMSizesResult().withValue(Arrays.asList(new ManagedVMSizeInner(), - new ManagedVMSizeInner(), new ManagedVMSizeInner(), new ManagedVMSizeInner())); - model = BinaryData.fromObject(model).toObject(ManagedVMSizesResult.class); + Assertions.assertEquals("taakc", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java index 6e267719f206..62fd1d9e4d86 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NamedPartitionSchemeTests.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.servicefabricmanagedclusters.generated; @@ -12,17 +12,15 @@ public final class NamedPartitionSchemeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NamedPartitionScheme model = BinaryData - .fromString("{\"partitionScheme\":\"Named\",\"names\":[\"yftumrtwna\",\"jslb\",\"wkojgcyztsfmzn\"]}") + NamedPartitionScheme model = BinaryData.fromString("{\"partitionScheme\":\"Named\",\"names\":[\"ztfolhbnxk\"]}") .toObject(NamedPartitionScheme.class); - Assertions.assertEquals("yftumrtwna", model.names().get(0)); + Assertions.assertEquals("ztfolhbnxk", model.names().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NamedPartitionScheme model - = new NamedPartitionScheme().withNames(Arrays.asList("yftumrtwna", "jslb", "wkojgcyztsfmzn")); + NamedPartitionScheme model = new NamedPartitionScheme().withNames(Arrays.asList("ztfolhbnxk")); model = BinaryData.fromObject(model).toObject(NamedPartitionScheme.class); - Assertions.assertEquals("yftumrtwna", model.names().get(0)); + Assertions.assertEquals("ztfolhbnxk", model.names().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java index 1194362f0c56..b84cdd5beb71 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NetworkSecurityRuleTests.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.servicefabricmanagedclusters.generated; @@ -16,54 +16,54 @@ public final class NetworkSecurityRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityRule model = BinaryData.fromString( - "{\"name\":\"byyntwlrbqt\",\"description\":\"ievseotgqrllt\",\"protocol\":\"tcp\",\"sourceAddressPrefixes\":[\"auwzizxbmpgc\",\"efuzmuvpbttd\",\"morppxebmnzbtbh\",\"pglkf\"],\"destinationAddressPrefixes\":[\"dneu\",\"lfphsdyhtozfikd\",\"wwquuvxzxclvithh\"],\"sourcePortRanges\":[\"nosggbhcoh\"],\"destinationPortRanges\":[\"sjnkal\",\"utiiswacf\"],\"sourceAddressPrefix\":\"dkzzewkfvhqcrail\",\"destinationAddressPrefix\":\"n\",\"sourcePortRange\":\"fuflrwdmhdlx\",\"destinationPortRange\":\"rxsagafcnihgwqa\",\"access\":\"allow\",\"priority\":633865702,\"direction\":\"outbound\"}") + "{\"name\":\"afnn\",\"description\":\"pichkoymkcdy\",\"protocol\":\"http\",\"sourceAddressPrefixes\":[\"kpw\",\"reqnovvqfov\",\"jxywsuws\",\"rsndsytgadgvra\"],\"destinationAddressPrefixes\":[\"neqn\"],\"sourcePortRanges\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"],\"destinationPortRanges\":[\"saknynfsyn\"],\"sourceAddressPrefix\":\"ph\",\"destinationAddressPrefix\":\"pxodlqiyntorzih\",\"sourcePortRange\":\"osjswsr\",\"destinationPortRange\":\"lyzrpzbchckqqzqi\",\"access\":\"allow\",\"priority\":1257157038,\"direction\":\"outbound\"}") .toObject(NetworkSecurityRule.class); - Assertions.assertEquals("byyntwlrbqt", model.name()); - Assertions.assertEquals("ievseotgqrllt", model.description()); - Assertions.assertEquals(NsgProtocol.TCP, model.protocol()); - Assertions.assertEquals("auwzizxbmpgc", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("dneu", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("nosggbhcoh", model.sourcePortRanges().get(0)); - Assertions.assertEquals("sjnkal", model.destinationPortRanges().get(0)); - Assertions.assertEquals("dkzzewkfvhqcrail", model.sourceAddressPrefix()); - Assertions.assertEquals("n", model.destinationAddressPrefix()); - Assertions.assertEquals("fuflrwdmhdlx", model.sourcePortRange()); - Assertions.assertEquals("rxsagafcnihgwqa", model.destinationPortRange()); + Assertions.assertEquals("afnn", model.name()); + Assertions.assertEquals("pichkoymkcdy", model.description()); + Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); + Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); + Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ph", model.sourceAddressPrefix()); + Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); + Assertions.assertEquals("osjswsr", model.sourcePortRange()); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(633865702, model.priority()); + Assertions.assertEquals(1257157038, model.priority()); Assertions.assertEquals(Direction.OUTBOUND, model.direction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityRule model = new NetworkSecurityRule().withName("byyntwlrbqt") - .withDescription("ievseotgqrllt") - .withProtocol(NsgProtocol.TCP) - .withSourceAddressPrefixes(Arrays.asList("auwzizxbmpgc", "efuzmuvpbttd", "morppxebmnzbtbh", "pglkf")) - .withDestinationAddressPrefixes(Arrays.asList("dneu", "lfphsdyhtozfikd", "wwquuvxzxclvithh")) - .withSourcePortRanges(Arrays.asList("nosggbhcoh")) - .withDestinationPortRanges(Arrays.asList("sjnkal", "utiiswacf")) - .withSourceAddressPrefix("dkzzewkfvhqcrail") - .withDestinationAddressPrefix("n") - .withSourcePortRange("fuflrwdmhdlx") - .withDestinationPortRange("rxsagafcnihgwqa") + NetworkSecurityRule model = new NetworkSecurityRule().withName("afnn") + .withDescription("pichkoymkcdy") + .withProtocol(NsgProtocol.HTTP) + .withSourceAddressPrefixes(Arrays.asList("kpw", "reqnovvqfov", "jxywsuws", "rsndsytgadgvra")) + .withDestinationAddressPrefixes(Arrays.asList("neqn")) + .withSourcePortRanges(Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks")) + .withDestinationPortRanges(Arrays.asList("saknynfsyn")) + .withSourceAddressPrefix("ph") + .withDestinationAddressPrefix("pxodlqiyntorzih") + .withSourcePortRange("osjswsr") + .withDestinationPortRange("lyzrpzbchckqqzqi") .withAccess(Access.ALLOW) - .withPriority(633865702) + .withPriority(1257157038) .withDirection(Direction.OUTBOUND); model = BinaryData.fromObject(model).toObject(NetworkSecurityRule.class); - Assertions.assertEquals("byyntwlrbqt", model.name()); - Assertions.assertEquals("ievseotgqrllt", model.description()); - Assertions.assertEquals(NsgProtocol.TCP, model.protocol()); - Assertions.assertEquals("auwzizxbmpgc", model.sourceAddressPrefixes().get(0)); - Assertions.assertEquals("dneu", model.destinationAddressPrefixes().get(0)); - Assertions.assertEquals("nosggbhcoh", model.sourcePortRanges().get(0)); - Assertions.assertEquals("sjnkal", model.destinationPortRanges().get(0)); - Assertions.assertEquals("dkzzewkfvhqcrail", model.sourceAddressPrefix()); - Assertions.assertEquals("n", model.destinationAddressPrefix()); - Assertions.assertEquals("fuflrwdmhdlx", model.sourcePortRange()); - Assertions.assertEquals("rxsagafcnihgwqa", model.destinationPortRange()); + Assertions.assertEquals("afnn", model.name()); + Assertions.assertEquals("pichkoymkcdy", model.description()); + Assertions.assertEquals(NsgProtocol.HTTP, model.protocol()); + Assertions.assertEquals("kpw", model.sourceAddressPrefixes().get(0)); + Assertions.assertEquals("neqn", model.destinationAddressPrefixes().get(0)); + Assertions.assertEquals("rwlqu", model.sourcePortRanges().get(0)); + Assertions.assertEquals("saknynfsyn", model.destinationPortRanges().get(0)); + Assertions.assertEquals("ph", model.sourceAddressPrefix()); + Assertions.assertEquals("pxodlqiyntorzih", model.destinationAddressPrefix()); + Assertions.assertEquals("osjswsr", model.sourcePortRange()); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.destinationPortRange()); Assertions.assertEquals(Access.ALLOW, model.access()); - Assertions.assertEquals(633865702, model.priority()); + Assertions.assertEquals(1257157038, model.priority()); Assertions.assertEquals(Direction.OUTBOUND, model.direction()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java index f46b3d982604..5c1e200d3550 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeActionParametersTests.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.servicefabricmanagedclusters.generated; @@ -13,23 +13,23 @@ public final class NodeTypeActionParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeActionParameters model = BinaryData.fromString( - "{\"nodes\":[\"ogczhonnxkrlg\",\"yhmossxkkg\",\"h\",\"rghxjb\"],\"force\":true,\"updateType\":\"ByUpgradeDomain\"}") + NodeTypeActionParameters model = BinaryData + .fromString("{\"nodes\":[\"acvlhv\",\"gdyftumrtwna\"],\"force\":false,\"updateType\":\"ByUpgradeDomain\"}") .toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ogczhonnxkrlg", model.nodes().get(0)); - Assertions.assertEquals(true, model.force()); + Assertions.assertEquals("acvlhv", model.nodes().get(0)); + Assertions.assertEquals(false, model.force()); Assertions.assertEquals(UpdateType.BY_UPGRADE_DOMAIN, model.updateType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NodeTypeActionParameters model - = new NodeTypeActionParameters().withNodes(Arrays.asList("ogczhonnxkrlg", "yhmossxkkg", "h", "rghxjb")) - .withForce(true) + = new NodeTypeActionParameters().withNodes(Arrays.asList("acvlhv", "gdyftumrtwna")) + .withForce(false) .withUpdateType(UpdateType.BY_UPGRADE_DOMAIN); model = BinaryData.fromObject(model).toObject(NodeTypeActionParameters.class); - Assertions.assertEquals("ogczhonnxkrlg", model.nodes().get(0)); - Assertions.assertEquals(true, model.force()); + Assertions.assertEquals("acvlhv", model.nodes().get(0)); + Assertions.assertEquals(false, model.force()); Assertions.assertEquals(UpdateType.BY_UPGRADE_DOMAIN, model.updateType()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java index 2f5f65a66d5c..0022dd7d2c91 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeAvailableSkuInnerTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,7 @@ public final class NodeTypeAvailableSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeAvailableSkuInner model = BinaryData.fromString( - "{\"resourceType\":\"gaojf\",\"sku\":{\"name\":\"cotmr\",\"tier\":\"irctymoxoftpipiw\"},\"capacity\":{\"minimum\":422952763,\"maximum\":1967043899,\"default\":481120097,\"scaleType\":\"None\"}}") + "{\"resourceType\":\"vkhbejdznx\",\"sku\":{\"name\":\"srhnjivo\",\"tier\":\"tnovqfzgemjdftul\"},\"capacity\":{\"minimum\":184092911,\"maximum\":1434429660,\"default\":1386231661,\"scaleType\":\"None\"}}") .toObject(NodeTypeAvailableSkuInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeTypeAvailableSkuInner model = new NodeTypeAvailableSkuInner(); - model = BinaryData.fromObject(model).toObject(NodeTypeAvailableSkuInner.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java new file mode 100644 index 000000000000..3465dd29a917 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeFaultSimulationTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationStatus; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeFaultSimulation; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.SfmcOperationStatus; +import org.junit.jupiter.api.Assertions; + +public final class NodeTypeFaultSimulationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NodeTypeFaultSimulation model = BinaryData.fromString( + "{\"nodeTypeName\":\"ypatdooaojkniod\",\"status\":\"Stopping\",\"operationId\":\"bw\",\"operationStatus\":\"Aborted\"}") + .toObject(NodeTypeFaultSimulation.class); + Assertions.assertEquals("ypatdooaojkniod", model.nodeTypeName()); + Assertions.assertEquals(FaultSimulationStatus.STOPPING, model.status()); + Assertions.assertEquals("bw", model.operationId()); + Assertions.assertEquals(SfmcOperationStatus.ABORTED, model.operationStatus()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java index d2d629f8bc9d..b76a6f506282 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeListSkuResultTests.java @@ -1,31 +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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.NodeTypeAvailableSkuInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeListSkuResult; -import java.util.Arrays; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.NodeTypeListSkuResult; import org.junit.jupiter.api.Assertions; public final class NodeTypeListSkuResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeListSkuResult model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"frpdsofbshrns\",\"sku\":{\"name\":\"swdvzyybycnun\",\"tier\":\"srtkfa\"},\"capacity\":{\"minimum\":1280835844,\"maximum\":204322777,\"default\":610729333,\"scaleType\":\"Manual\"}},{\"resourceType\":\"rtxdyuxzejnt\",\"sku\":{\"name\":\"wgioilqukry\",\"tier\":\"tqmieox\"},\"capacity\":{\"minimum\":563118752,\"maximum\":108943004,\"default\":1347150858,\"scaleType\":\"Manual\"}},{\"resourceType\":\"tbghhavgrvkf\",\"sku\":{\"name\":\"jzhpjbibgjmfx\",\"tier\":\"vfcluyovwxnbkfe\"},\"capacity\":{\"minimum\":1537243599,\"maximum\":405575644,\"default\":1049573139,\"scaleType\":\"None\"}},{\"resourceType\":\"irujbz\",\"sku\":{\"name\":\"vzzbtdcq\",\"tier\":\"niyujv\"},\"capacity\":{\"minimum\":1061424491,\"maximum\":905798226,\"default\":2085086631,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"rbgyefry\"}") + "{\"value\":[{\"resourceType\":\"kojgcyzts\",\"sku\":{\"name\":\"nbaeqphchqn\",\"tier\":\"rpxeh\"},\"capacity\":{\"minimum\":550390162,\"maximum\":1484203808,\"default\":1886683617,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"viklb\"}") .toObject(NodeTypeListSkuResult.class); - Assertions.assertEquals("rbgyefry", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeTypeListSkuResult model = new NodeTypeListSkuResult() - .withValue(Arrays.asList(new NodeTypeAvailableSkuInner(), new NodeTypeAvailableSkuInner(), - new NodeTypeAvailableSkuInner(), new NodeTypeAvailableSkuInner())) - .withNextLink("rbgyefry"); - model = BinaryData.fromObject(model).toObject(NodeTypeListSkuResult.class); - Assertions.assertEquals("rbgyefry", model.nextLink()); + Assertions.assertEquals("viklb", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java index f0808dc477cc..908b0843d54c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeNatConfigTests.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.servicefabricmanagedclusters.generated; @@ -13,21 +13,21 @@ public final class NodeTypeNatConfigTests { public void testDeserialize() throws Exception { NodeTypeNatConfig model = BinaryData .fromString( - "{\"backendPort\":1208971148,\"frontendPortRangeStart\":1007513685,\"frontendPortRangeEnd\":835251373}") + "{\"backendPort\":932898449,\"frontendPortRangeStart\":1851759881,\"frontendPortRangeEnd\":624157964}") .toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(1208971148, model.backendPort()); - Assertions.assertEquals(1007513685, model.frontendPortRangeStart()); - Assertions.assertEquals(835251373, model.frontendPortRangeEnd()); + Assertions.assertEquals(932898449, model.backendPort()); + Assertions.assertEquals(1851759881, model.frontendPortRangeStart()); + Assertions.assertEquals(624157964, model.frontendPortRangeEnd()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(1208971148) - .withFrontendPortRangeStart(1007513685) - .withFrontendPortRangeEnd(835251373); + NodeTypeNatConfig model = new NodeTypeNatConfig().withBackendPort(932898449) + .withFrontendPortRangeStart(1851759881) + .withFrontendPortRangeEnd(624157964); model = BinaryData.fromObject(model).toObject(NodeTypeNatConfig.class); - Assertions.assertEquals(1208971148, model.backendPort()); - Assertions.assertEquals(1007513685, model.frontendPortRangeStart()); - Assertions.assertEquals(835251373, model.frontendPortRangeEnd()); + Assertions.assertEquals(932898449, model.backendPort()); + Assertions.assertEquals(1851759881, model.frontendPortRangeStart()); + Assertions.assertEquals(624157964, model.frontendPortRangeEnd()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java index f510e42ce1be..f812ff2fdff2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuCapacityTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,8 @@ public final class NodeTypeSkuCapacityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeSkuCapacity model = BinaryData - .fromString("{\"minimum\":866301348,\"maximum\":572300163,\"default\":1872766965,\"scaleType\":\"None\"}") + .fromString( + "{\"minimum\":373495652,\"maximum\":1563475651,\"default\":2133935833,\"scaleType\":\"Manual\"}") .toObject(NodeTypeSkuCapacity.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeTypeSkuCapacity model = new NodeTypeSkuCapacity(); - model = BinaryData.fromObject(model).toObject(NodeTypeSkuCapacity.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java index 000f7b1382c5..247ec1381148 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkuTests.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.servicefabricmanagedclusters.generated; @@ -11,20 +11,19 @@ public final class NodeTypeSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NodeTypeSku model - = BinaryData.fromString("{\"name\":\"fdlwg\",\"tier\":\"tsbwtovvtgse\",\"capacity\":969713828}") - .toObject(NodeTypeSku.class); - Assertions.assertEquals("fdlwg", model.name()); - Assertions.assertEquals("tsbwtovvtgse", model.tier()); - Assertions.assertEquals(969713828, model.capacity()); + NodeTypeSku model = BinaryData.fromString("{\"name\":\"krlgnyhm\",\"tier\":\"sxkkg\",\"capacity\":177432619}") + .toObject(NodeTypeSku.class); + Assertions.assertEquals("krlgnyhm", model.name()); + Assertions.assertEquals("sxkkg", model.tier()); + Assertions.assertEquals(177432619, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeSku model = new NodeTypeSku().withName("fdlwg").withTier("tsbwtovvtgse").withCapacity(969713828); + NodeTypeSku model = new NodeTypeSku().withName("krlgnyhm").withTier("sxkkg").withCapacity(177432619); model = BinaryData.fromObject(model).toObject(NodeTypeSku.class); - Assertions.assertEquals("fdlwg", model.name()); - Assertions.assertEquals("tsbwtovvtgse", model.tier()); - Assertions.assertEquals(969713828, model.capacity()); + Assertions.assertEquals("krlgnyhm", model.name()); + Assertions.assertEquals("sxkkg", model.tier()); + Assertions.assertEquals(177432619, model.capacity()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java index 81bdc2c39400..4993203f917c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSkusListMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeAvailableSku; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -21,17 +21,17 @@ public final class NodeTypeSkusListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"abo\",\"sku\":{\"name\":\"mfqhppubowse\",\"tier\":\"fgkmtdhern\"},\"capacity\":{\"minimum\":148658575,\"maximum\":1433738455,\"default\":812344780,\"scaleType\":\"Manual\"}}]}"; + = "{\"value\":[{\"resourceType\":\"zszuwiwtglxx\",\"sku\":{\"name\":\"fpgpicrmnzhrgm\",\"tier\":\"j\"},\"capacity\":{\"minimum\":1587486803,\"maximum\":1307017173,\"default\":704061882,\"scaleType\":\"None\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.nodeTypeSkus() - .list("ffifhx", "rsnewmozqvbubqma", "hsycxhxzgaz", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.nodeTypeSkus().list("kfvxcnq", "xqpswok", "vkhlggdhbemz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java index 62cb03ee6f4d..6fd3edb78c49 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeSupportedSkuTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,6 @@ public final class NodeTypeSupportedSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeSupportedSku model - = BinaryData.fromString("{\"name\":\"lihhyuspskasdvlm\",\"tier\":\"dgzxulucvpamrsr\"}") - .toObject(NodeTypeSupportedSku.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeTypeSupportedSku model = new NodeTypeSupportedSku(); - model = BinaryData.fromObject(model).toObject(NodeTypeSupportedSku.class); + = BinaryData.fromString("{\"name\":\"czu\",\"tier\":\"ejwcwwqiok\"}").toObject(NodeTypeSupportedSku.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java index 031d0479ab13..d41b6bbcca5f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypeUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -15,23 +15,23 @@ public final class NodeTypeUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeTypeUpdateParameters model = BinaryData.fromString( - "{\"tags\":{\"txifqj\":\"hn\"},\"sku\":{\"name\":\"mrhublwpc\",\"tier\":\"utr\",\"capacity\":1760346913}}") + "{\"tags\":{\"jbdhqxvc\":\"gh\",\"pdso\":\"gf\"},\"sku\":{\"name\":\"hrnsvbu\",\"tier\":\"dvzyybycnun\",\"capacity\":1155428031}}") .toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("hn", model.tags().get("txifqj")); - Assertions.assertEquals("mrhublwpc", model.sku().name()); - Assertions.assertEquals("utr", model.sku().tier()); - Assertions.assertEquals(1760346913, model.sku().capacity()); + Assertions.assertEquals("gh", model.tags().get("jbdhqxvc")); + Assertions.assertEquals("hrnsvbu", model.sku().name()); + Assertions.assertEquals("dvzyybycnun", model.sku().tier()); + Assertions.assertEquals(1155428031, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodeTypeUpdateParameters model = new NodeTypeUpdateParameters().withTags(mapOf("txifqj", "hn")) - .withSku(new NodeTypeSku().withName("mrhublwpc").withTier("utr").withCapacity(1760346913)); + NodeTypeUpdateParameters model = new NodeTypeUpdateParameters().withTags(mapOf("jbdhqxvc", "gh", "pdso", "gf")) + .withSku(new NodeTypeSku().withName("hrnsvbu").withTier("dvzyybycnun").withCapacity(1155428031)); model = BinaryData.fromObject(model).toObject(NodeTypeUpdateParameters.class); - Assertions.assertEquals("hn", model.tags().get("txifqj")); - Assertions.assertEquals("mrhublwpc", model.sku().name()); - Assertions.assertEquals("utr", model.sku().tier()); - Assertions.assertEquals(1760346913, model.sku().capacity()); + Assertions.assertEquals("gh", model.tags().get("jbdhqxvc")); + Assertions.assertEquals("hrnsvbu", model.sku().name()); + Assertions.assertEquals("dvzyybycnun", model.sku().tier()); + Assertions.assertEquals(1155428031, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteMockTests.java deleted file mode 100644 index 5c41942ad07a..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NodeTypesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.nodeTypes().delete("mmkjsvthnwpztek", "vmribiat", "gplucfotangcfhny", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeMockTests.java deleted file mode 100644 index 1e75fdfedff9..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesDeleteNodeMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NodeTypesDeleteNodeMockTests { - @Test - public void testDeleteNode() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.nodeTypes() - .deleteNode("nnawtqabpxuckpgg", "oweyirdhlis", "gwflq", - new NodeTypeActionParameters() - .withNodes(Arrays.asList("izruwnpqxpxiwfc", "gjsaasiixtm", "zjvkviirhgfgrws", "pgratzvzbglbyvi")) - .withForce(true) - .withUpdateType(UpdateType.DEFAULT), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageMockTests.java deleted file mode 100644 index 9749942a90d3..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesReimageMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NodeTypesReimageMockTests { - @Test - public void testReimage() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.nodeTypes() - .reimage("kwr", "snkq", "hsyrqunj", - new NodeTypeActionParameters().withNodes(Arrays.asList("enx", "ulkpakd")) - .withForce(true) - .withUpdateType(UpdateType.DEFAULT), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartMockTests.java deleted file mode 100644 index 126d7594bfe3..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/NodeTypesRestartMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.NodeTypeActionParameters; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.UpdateType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NodeTypesRestartMockTests { - @Test - public void testRestart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.nodeTypes() - .restart("ebwlnbmhyreeudzq", "vbpdqmjxlyyzglgo", "wtlmjjyuo", - new NodeTypeActionParameters().withNodes(Arrays.asList("obaxkjeytu")) - .withForce(false) - .withUpdateType(UpdateType.BY_UPGRADE_DOMAIN), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationListResultTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationListResultTests.java index ea857d0eee66..d882031f30e2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationListResultTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationListResultTests.java @@ -1,67 +1,27 @@ // 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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationListResult; -import java.util.Arrays; +import com.azure.resourcemanager.servicefabricmanagedclusters.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\":\"qgge\",\"isDataAction\":true,\"display\":{\"provider\":\"g\",\"resource\":\"qidbqfatpxllrxcy\",\"operation\":\"oadsuvar\",\"description\":\"wdmjsjqbjhhyx\"},\"origin\":\"wlycoduhpkxkg\",\"nextLink\":\"areqna\"},{\"name\":\"qugjhkycube\",\"isDataAction\":false,\"display\":{\"provider\":\"ofwq\",\"resource\":\"qal\",\"operation\":\"mnjijpxacqqudf\",\"description\":\"yxbaaabjyvayf\"},\"origin\":\"m\",\"nextLink\":\"rtuzqogs\"},{\"name\":\"nevfdnw\",\"isDataAction\":false,\"display\":{\"provider\":\"zsyyceuzso\",\"resource\":\"judpfrxt\",\"operation\":\"hzv\",\"description\":\"tdwkqbrq\"},\"origin\":\"paxh\",\"nextLink\":\"iilivpdtiirqtd\"}],\"nextLink\":\"axoruzfgsquy\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"tbmufpo\",\"nextLink\":\"oizh\"},{\"name\":\"rxybqsoq\",\"isDataAction\":false,\"display\":{\"provider\":\"mbpazlobcufpdzn\",\"resource\":\"t\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"lhjxr\",\"nextLink\":\"kwm\"},{\"name\":\"ktsizntocipaou\",\"isDataAction\":true,\"display\":{\"provider\":\"ucmpoyfd\",\"resource\":\"ogknygjofjdd\",\"operation\":\"s\",\"description\":\"eupewnwreitjz\"},\"origin\":\"lusarh\",\"nextLink\":\"fcqhsmyurkd\"}],\"nextLink\":\"lx\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("qgge", model.value().get(0).name()); + Assertions.assertEquals("hq", model.value().get(0).name()); Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("g", model.value().get(0).display().provider()); - Assertions.assertEquals("qidbqfatpxllrxcy", model.value().get(0).display().resource()); - Assertions.assertEquals("oadsuvar", model.value().get(0).display().operation()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.value().get(0).display().description()); - Assertions.assertEquals("wlycoduhpkxkg", model.value().get(0).origin()); - Assertions.assertEquals("areqna", model.value().get(0).nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationResultInner().withName("qgge") - .withIsDataAction(true) - .withDisplay(new AvailableOperationDisplay().withProvider("g") - .withResource("qidbqfatpxllrxcy") - .withOperation("oadsuvar") - .withDescription("wdmjsjqbjhhyx")) - .withOrigin("wlycoduhpkxkg") - .withNextLink("areqna"), - new OperationResultInner().withName("qugjhkycube") - .withIsDataAction(false) - .withDisplay(new AvailableOperationDisplay().withProvider("ofwq") - .withResource("qal") - .withOperation("mnjijpxacqqudf") - .withDescription("yxbaaabjyvayf")) - .withOrigin("m") - .withNextLink("rtuzqogs"), - new OperationResultInner().withName("nevfdnw") - .withIsDataAction(false) - .withDisplay(new AvailableOperationDisplay().withProvider("zsyyceuzso") - .withResource("judpfrxt") - .withOperation("hzv") - .withDescription("tdwkqbrq")) - .withOrigin("paxh") - .withNextLink("iilivpdtiirqtd"))); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("qgge", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("g", model.value().get(0).display().provider()); - Assertions.assertEquals("qidbqfatpxllrxcy", model.value().get(0).display().resource()); - Assertions.assertEquals("oadsuvar", model.value().get(0).display().operation()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.value().get(0).display().description()); - Assertions.assertEquals("wlycoduhpkxkg", model.value().get(0).origin()); - Assertions.assertEquals("areqna", model.value().get(0).nextLink()); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().resource()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals("tbmufpo", model.value().get(0).origin()); + Assertions.assertEquals("oizh", model.value().get(0).nextLink()); + Assertions.assertEquals("lx", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultInnerTests.java index a040b34fa51e..28f91eb47f04 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultInnerTests.java @@ -1,48 +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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.OperationResultInner; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.AvailableOperationDisplay; import org.junit.jupiter.api.Assertions; public final class OperationResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationResultInner model = BinaryData.fromString( - "{\"name\":\"rxxle\",\"isDataAction\":true,\"display\":{\"provider\":\"xje\",\"resource\":\"lwnwxuqlcvydyp\",\"operation\":\"dooaojkniodko\",\"description\":\"bw\"},\"origin\":\"jhemms\",\"nextLink\":\"dkcrodt\"}") + "{\"name\":\"kuksjtxukcdm\",\"isDataAction\":true,\"display\":{\"provider\":\"y\",\"resource\":\"nzwuxzd\",\"operation\":\"a\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"kknryrtihf\",\"nextLink\":\"ijbpzvgnwzsymgl\"}") .toObject(OperationResultInner.class); - Assertions.assertEquals("rxxle", model.name()); + Assertions.assertEquals("kuksjtxukcdm", model.name()); Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("xje", model.display().provider()); - Assertions.assertEquals("lwnwxuqlcvydyp", model.display().resource()); - Assertions.assertEquals("dooaojkniodko", model.display().operation()); - Assertions.assertEquals("bw", model.display().description()); - Assertions.assertEquals("jhemms", model.origin()); - Assertions.assertEquals("dkcrodt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInner model = new OperationResultInner().withName("rxxle") - .withIsDataAction(true) - .withDisplay(new AvailableOperationDisplay().withProvider("xje") - .withResource("lwnwxuqlcvydyp") - .withOperation("dooaojkniodko") - .withDescription("bw")) - .withOrigin("jhemms") - .withNextLink("dkcrodt"); - model = BinaryData.fromObject(model).toObject(OperationResultInner.class); - Assertions.assertEquals("rxxle", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("xje", model.display().provider()); - Assertions.assertEquals("lwnwxuqlcvydyp", model.display().resource()); - Assertions.assertEquals("dooaojkniodko", model.display().operation()); - Assertions.assertEquals("bw", model.display().description()); - Assertions.assertEquals("jhemms", model.origin()); - Assertions.assertEquals("dkcrodt", model.nextLink()); + Assertions.assertEquals("y", model.display().provider()); + Assertions.assertEquals("nzwuxzd", model.display().resource()); + Assertions.assertEquals("a", model.display().operation()); + Assertions.assertEquals("lhmwhfpmrqobm", model.display().description()); + Assertions.assertEquals("kknryrtihf", model.origin()); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetWithResponseMockTests.java deleted file mode 100644 index e2fd64312f07..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationResultsGetWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationResultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.operationResults().getWithResponse("gehkfkimrtixokff", "yinljqe", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java index 37ccbeb4e8fb..6aab55d08f4d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/OperationsListMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.OperationResult; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -22,24 +22,24 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"whixmonstsh\",\"isDataAction\":true,\"display\":{\"provider\":\"elfclducc\",\"resource\":\"rds\",\"operation\":\"wcobie\",\"description\":\"tmninw\"},\"origin\":\"zcilnghg\",\"nextLink\":\"ejjtbxqmul\"}]}"; + = "{\"value\":[{\"name\":\"ltfnhtbaxkgx\",\"isDataAction\":false,\"display\":{\"provider\":\"pyklyhpluodpvru\",\"resource\":\"lgzi\",\"operation\":\"hostgktstvdxecl\",\"description\":\"dqbcvhzlhplod\"},\"origin\":\"dlwwqfbumlkxt\",\"nextLink\":\"jfsmlmbtxhwgfwsr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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); - Assertions.assertEquals("whixmonstsh", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("elfclducc", response.iterator().next().display().provider()); - Assertions.assertEquals("rds", response.iterator().next().display().resource()); - Assertions.assertEquals("wcobie", response.iterator().next().display().operation()); - Assertions.assertEquals("tmninw", response.iterator().next().display().description()); - Assertions.assertEquals("zcilnghg", response.iterator().next().origin()); - Assertions.assertEquals("ejjtbxqmul", response.iterator().next().nextLink()); + Assertions.assertEquals("ltfnhtbaxkgx", response.iterator().next().name()); + Assertions.assertEquals(false, response.iterator().next().isDataAction()); + Assertions.assertEquals("pyklyhpluodpvru", response.iterator().next().display().provider()); + Assertions.assertEquals("lgzi", response.iterator().next().display().resource()); + Assertions.assertEquals("hostgktstvdxecl", response.iterator().next().display().operation()); + Assertions.assertEquals("dqbcvhzlhplod", response.iterator().next().display().description()); + Assertions.assertEquals("dlwwqfbumlkxt", response.iterator().next().origin()); + Assertions.assertEquals("jfsmlmbtxhwgfwsr", response.iterator().next().nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java index 202c7700ad29..cddf399c2b57 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionInstanceCountScaleMechanismTests.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.servicefabricmanagedclusters.generated; @@ -12,22 +12,22 @@ public final class PartitionInstanceCountScaleMechanismTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartitionInstanceCountScaleMechanism model = BinaryData.fromString( - "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":285412743,\"maxInstanceCount\":688115873,\"scaleIncrement\":2049082916}") + "{\"kind\":\"ScalePartitionInstanceCount\",\"minInstanceCount\":2103564853,\"maxInstanceCount\":1856979158,\"scaleIncrement\":578093218}") .toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(285412743, model.minInstanceCount()); - Assertions.assertEquals(688115873, model.maxInstanceCount()); - Assertions.assertEquals(2049082916, model.scaleIncrement()); + Assertions.assertEquals(2103564853, model.minInstanceCount()); + Assertions.assertEquals(1856979158, model.maxInstanceCount()); + Assertions.assertEquals(578093218, model.scaleIncrement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartitionInstanceCountScaleMechanism model - = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(285412743) - .withMaxInstanceCount(688115873) - .withScaleIncrement(2049082916); + = new PartitionInstanceCountScaleMechanism().withMinInstanceCount(2103564853) + .withMaxInstanceCount(1856979158) + .withScaleIncrement(578093218); model = BinaryData.fromObject(model).toObject(PartitionInstanceCountScaleMechanism.class); - Assertions.assertEquals(285412743, model.minInstanceCount()); - Assertions.assertEquals(688115873, model.maxInstanceCount()); - Assertions.assertEquals(2049082916, model.scaleIncrement()); + Assertions.assertEquals(2103564853, model.minInstanceCount()); + Assertions.assertEquals(1856979158, model.maxInstanceCount()); + Assertions.assertEquals(578093218, model.scaleIncrement()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionTests.java index 649772e18697..0fc55e38feb2 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/PartitionTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java index 9502238c779c..5daf7f0fbb73 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ResourceAzStatusTests.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.servicefabricmanagedclusters.generated; @@ -11,13 +11,7 @@ public final class ResourceAzStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceAzStatus model = BinaryData.fromString( - "{\"resourceName\":\"rlkdmtncvokotl\",\"resourceType\":\"d\",\"isZoneResilient\":false,\"details\":\"y\"}") + "{\"resourceName\":\"rzgszufoxci\",\"resourceType\":\"p\",\"isZoneResilient\":false,\"details\":\"mciodhkhazxkhn\"}") .toObject(ResourceAzStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceAzStatus model = new ResourceAzStatus(); - model = BinaryData.fromObject(model).toObject(ResourceAzStatus.class); - } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RollingUpgradeMonitoringPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RollingUpgradeMonitoringPolicyTests.java index f2d42e4798d4..3becd27911a6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RollingUpgradeMonitoringPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RollingUpgradeMonitoringPolicyTests.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.servicefabricmanagedclusters.generated; @@ -13,31 +13,31 @@ public final class RollingUpgradeMonitoringPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RollingUpgradeMonitoringPolicy model = BinaryData.fromString( - "{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"a\",\"healthCheckStableDuration\":\"a\",\"healthCheckRetryTimeout\":\"hrzayvvtpgvdf\",\"upgradeTimeout\":\"iotkftutqxl\",\"upgradeDomainTimeout\":\"gxlefgugnxkrxd\"}") + "{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"mmnkzsmodmgl\",\"healthCheckStableDuration\":\"ugpbkw\",\"healthCheckRetryTimeout\":\"mutduqktaps\",\"upgradeTimeout\":\"wgcu\",\"upgradeDomainTimeout\":\"rtumkdosvq\"}") .toObject(RollingUpgradeMonitoringPolicy.class); - Assertions.assertEquals(FailureAction.ROLLBACK, model.failureAction()); - Assertions.assertEquals("a", model.healthCheckWaitDuration()); - Assertions.assertEquals("a", model.healthCheckStableDuration()); - Assertions.assertEquals("hrzayvvtpgvdf", model.healthCheckRetryTimeout()); - Assertions.assertEquals("iotkftutqxl", model.upgradeTimeout()); - Assertions.assertEquals("gxlefgugnxkrxd", model.upgradeDomainTimeout()); + Assertions.assertEquals(FailureAction.MANUAL, model.failureAction()); + Assertions.assertEquals("mmnkzsmodmgl", model.healthCheckWaitDuration()); + Assertions.assertEquals("ugpbkw", model.healthCheckStableDuration()); + Assertions.assertEquals("mutduqktaps", model.healthCheckRetryTimeout()); + Assertions.assertEquals("wgcu", model.upgradeTimeout()); + Assertions.assertEquals("rtumkdosvq", model.upgradeDomainTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RollingUpgradeMonitoringPolicy model - = new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.ROLLBACK) - .withHealthCheckWaitDuration("a") - .withHealthCheckStableDuration("a") - .withHealthCheckRetryTimeout("hrzayvvtpgvdf") - .withUpgradeTimeout("iotkftutqxl") - .withUpgradeDomainTimeout("gxlefgugnxkrxd"); + = new RollingUpgradeMonitoringPolicy().withFailureAction(FailureAction.MANUAL) + .withHealthCheckWaitDuration("mmnkzsmodmgl") + .withHealthCheckStableDuration("ugpbkw") + .withHealthCheckRetryTimeout("mutduqktaps") + .withUpgradeTimeout("wgcu") + .withUpgradeDomainTimeout("rtumkdosvq"); model = BinaryData.fromObject(model).toObject(RollingUpgradeMonitoringPolicy.class); - Assertions.assertEquals(FailureAction.ROLLBACK, model.failureAction()); - Assertions.assertEquals("a", model.healthCheckWaitDuration()); - Assertions.assertEquals("a", model.healthCheckStableDuration()); - Assertions.assertEquals("hrzayvvtpgvdf", model.healthCheckRetryTimeout()); - Assertions.assertEquals("iotkftutqxl", model.upgradeTimeout()); - Assertions.assertEquals("gxlefgugnxkrxd", model.upgradeDomainTimeout()); + Assertions.assertEquals(FailureAction.MANUAL, model.failureAction()); + Assertions.assertEquals("mmnkzsmodmgl", model.healthCheckWaitDuration()); + Assertions.assertEquals("ugpbkw", model.healthCheckStableDuration()); + Assertions.assertEquals("mutduqktaps", model.healthCheckRetryTimeout()); + Assertions.assertEquals("wgcu", model.upgradeTimeout()); + Assertions.assertEquals("rtumkdosvq", model.upgradeDomainTimeout()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java index 318ac6391cdc..5d37e00692ff 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/RuntimeResumeApplicationUpgradeParametersTests.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.servicefabricmanagedclusters.generated; @@ -12,16 +12,16 @@ public final class RuntimeResumeApplicationUpgradeParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RuntimeResumeApplicationUpgradeParameters model - = BinaryData.fromString("{\"upgradeDomainName\":\"njbiksqrglssain\"}") + = BinaryData.fromString("{\"upgradeDomainName\":\"svexcsonpclhoco\"}") .toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("njbiksqrglssain", model.upgradeDomainName()); + Assertions.assertEquals("svexcsonpclhoco", model.upgradeDomainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RuntimeResumeApplicationUpgradeParameters model - = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("njbiksqrglssain"); + = new RuntimeResumeApplicationUpgradeParameters().withUpgradeDomainName("svexcsonpclhoco"); model = BinaryData.fromObject(model).toObject(RuntimeResumeApplicationUpgradeParameters.class); - Assertions.assertEquals("njbiksqrglssain", model.upgradeDomainName()); + Assertions.assertEquals("svexcsonpclhoco", model.upgradeDomainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingMechanismTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingMechanismTests.java index b0495b5828ee..184f093a0ee6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingMechanismTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingMechanismTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingPolicyTests.java index 1ae5da5bcc2d..fcdc9f7e112f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingPolicyTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingTriggerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingTriggerTests.java index 706c1bd517e8..ade111acfa09 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingTriggerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ScalingTriggerTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java index 8ee36c8b575f..44657ec0b1db 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceCorrelationTests.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.servicefabricmanagedclusters.generated; @@ -13,18 +13,18 @@ public final class ServiceCorrelationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceCorrelation model - = BinaryData.fromString("{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"uaejxdultsk\"}") + = BinaryData.fromString("{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"lmwlxkvugfhzo\"}") .toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("uaejxdultsk", model.serviceName()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("lmwlxkvugfhzo", model.serviceName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceCorrelation model = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("uaejxdultsk"); + ServiceCorrelation model = new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("lmwlxkvugfhzo"); model = BinaryData.fromObject(model).toObject(ServiceCorrelation.class); - Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.scheme()); - Assertions.assertEquals("uaejxdultsk", model.serviceName()); + Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.scheme()); + Assertions.assertEquals("lmwlxkvugfhzo", model.serviceName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java index a15d76297fd6..06c8a4dc2d0e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceEndpointTests.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.servicefabricmanagedclusters.generated; @@ -12,19 +12,17 @@ public final class ServiceEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceEndpoint model = BinaryData.fromString( - "{\"service\":\"dd\",\"locations\":[\"bcuejrjxgci\",\"ibrhosxsdqr\",\"zoymibmrqyibahw\",\"luszdtmhrkwof\"]}") + ServiceEndpoint model = BinaryData.fromString("{\"service\":\"dvwvgpio\",\"locations\":[\"xrtfudxep\"]}") .toObject(ServiceEndpoint.class); - Assertions.assertEquals("dd", model.service()); - Assertions.assertEquals("bcuejrjxgci", model.locations().get(0)); + Assertions.assertEquals("dvwvgpio", model.service()); + Assertions.assertEquals("xrtfudxep", model.locations().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceEndpoint model = new ServiceEndpoint().withService("dd") - .withLocations(Arrays.asList("bcuejrjxgci", "ibrhosxsdqr", "zoymibmrqyibahw", "luszdtmhrkwof")); + ServiceEndpoint model = new ServiceEndpoint().withService("dvwvgpio").withLocations(Arrays.asList("xrtfudxep")); model = BinaryData.fromObject(model).toObject(ServiceEndpoint.class); - Assertions.assertEquals("dd", model.service()); - Assertions.assertEquals("bcuejrjxgci", model.locations().get(0)); + Assertions.assertEquals("dvwvgpio", model.service()); + Assertions.assertEquals("xrtfudxep", model.locations().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java index 1f95aee105a6..548a8ed81f3c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceLoadMetricTests.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.servicefabricmanagedclusters.generated; @@ -13,27 +13,27 @@ public final class ServiceLoadMetricTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceLoadMetric model = BinaryData.fromString( - "{\"name\":\"bbtdzumvee\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1817395780,\"secondaryDefaultLoad\":311434030,\"defaultLoad\":1290652027}") + "{\"name\":\"awjvzunluthnnp\",\"weight\":\"High\",\"primaryDefaultLoad\":1539688741,\"secondaryDefaultLoad\":1381337865,\"defaultLoad\":1073043267}") .toObject(ServiceLoadMetric.class); - Assertions.assertEquals("bbtdzumvee", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.weight()); - Assertions.assertEquals(1817395780, model.primaryDefaultLoad()); - Assertions.assertEquals(311434030, model.secondaryDefaultLoad()); - Assertions.assertEquals(1290652027, model.defaultLoad()); + Assertions.assertEquals("awjvzunluthnnp", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); + Assertions.assertEquals(1539688741, model.primaryDefaultLoad()); + Assertions.assertEquals(1381337865, model.secondaryDefaultLoad()); + Assertions.assertEquals(1073043267, model.defaultLoad()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceLoadMetric model = new ServiceLoadMetric().withName("bbtdzumvee") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1817395780) - .withSecondaryDefaultLoad(311434030) - .withDefaultLoad(1290652027); + ServiceLoadMetric model = new ServiceLoadMetric().withName("awjvzunluthnnp") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(1539688741) + .withSecondaryDefaultLoad(1381337865) + .withDefaultLoad(1073043267); model = BinaryData.fromObject(model).toObject(ServiceLoadMetric.class); - Assertions.assertEquals("bbtdzumvee", model.name()); - Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.weight()); - Assertions.assertEquals(1817395780, model.primaryDefaultLoad()); - Assertions.assertEquals(311434030, model.secondaryDefaultLoad()); - Assertions.assertEquals(1290652027, model.defaultLoad()); + Assertions.assertEquals("awjvzunluthnnp", model.name()); + Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.weight()); + Assertions.assertEquals(1539688741, model.primaryDefaultLoad()); + Assertions.assertEquals(1381337865, model.secondaryDefaultLoad()); + Assertions.assertEquals(1073043267, model.defaultLoad()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java index 56be15cfb960..0b5f0fde0af0 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementInvalidDomainPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,15 +12,16 @@ public final class ServicePlacementInvalidDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementInvalidDomainPolicy model - = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"ph\"}") + = BinaryData.fromString("{\"type\":\"InvalidDomain\",\"domainName\":\"jzuaejxdultskzbb\"}") .toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("ph", model.domainName()); + Assertions.assertEquals("jzuaejxdultskzbb", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePlacementInvalidDomainPolicy model = new ServicePlacementInvalidDomainPolicy().withDomainName("ph"); + ServicePlacementInvalidDomainPolicy model + = new ServicePlacementInvalidDomainPolicy().withDomainName("jzuaejxdultskzbb"); model = BinaryData.fromObject(model).toObject(ServicePlacementInvalidDomainPolicy.class); - Assertions.assertEquals("ph", model.domainName()); + Assertions.assertEquals("jzuaejxdultskzbb", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementNonPartiallyPlaceServicePolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementNonPartiallyPlaceServicePolicyTests.java index f61c25288254..daa5812fcb8d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementNonPartiallyPlaceServicePolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementNonPartiallyPlaceServicePolicyTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPolicyTests.java index 1fdad5828b6a..01fc8eb4ef3e 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPolicyTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java index 500c89b3188a..15cdb322da11 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementPreferPrimaryDomainPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,16 +12,16 @@ public final class ServicePlacementPreferPrimaryDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"hqnrn\"}") + = BinaryData.fromString("{\"type\":\"PreferredPrimaryDomain\",\"domainName\":\"wozuhkf\"}") .toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("hqnrn", model.domainName()); + Assertions.assertEquals("wozuhkf", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementPreferPrimaryDomainPolicy model - = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("hqnrn"); + = new ServicePlacementPreferPrimaryDomainPolicy().withDomainName("wozuhkf"); model = BinaryData.fromObject(model).toObject(ServicePlacementPreferPrimaryDomainPolicy.class); - Assertions.assertEquals("hqnrn", model.domainName()); + Assertions.assertEquals("wozuhkf", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java index c48882008c07..80e44f46bfe6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequireDomainDistributionPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,16 +12,16 @@ public final class ServicePlacementRequireDomainDistributionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"fmviklby\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomainDistribution\",\"domainName\":\"bsjyofdx\"}") .toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("fmviklby", model.domainName()); + Assertions.assertEquals("bsjyofdx", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementRequireDomainDistributionPolicy model - = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("fmviklby"); + = new ServicePlacementRequireDomainDistributionPolicy().withDomainName("bsjyofdx"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequireDomainDistributionPolicy.class); - Assertions.assertEquals("fmviklby", model.domainName()); + Assertions.assertEquals("bsjyofdx", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java index 739a41187d06..383909d60a1b 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicePlacementRequiredDomainPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,16 +12,16 @@ public final class ServicePlacementRequiredDomainPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePlacementRequiredDomainPolicy model - = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"pxehuwrykqga\"}") + = BinaryData.fromString("{\"type\":\"RequiredDomain\",\"domainName\":\"dzumveekg\"}") .toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("pxehuwrykqga", model.domainName()); + Assertions.assertEquals("dzumveekg", model.domainName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServicePlacementRequiredDomainPolicy model - = new ServicePlacementRequiredDomainPolicy().withDomainName("pxehuwrykqga"); + = new ServicePlacementRequiredDomainPolicy().withDomainName("dzumveekg"); model = BinaryData.fromObject(model).toObject(ServicePlacementRequiredDomainPolicy.class); - Assertions.assertEquals("pxehuwrykqga", model.domainName()); + Assertions.assertEquals("dzumveekg", model.domainName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java index 89e1b20b4c4a..3aef6641c594 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceInnerTests.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.servicefabricmanagedclusters.generated; @@ -27,71 +27,87 @@ public final class ServiceResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceInner model = BinaryData.fromString( - "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"kv\",\"serviceTypeName\":\"melmqkrha\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"uahaquhcdhmd\",\"placementConstraints\":\"laexqp\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"mwsrcrgvxpvgo\"}],\"serviceLoadMetrics\":[{\"name\":\"fmisg\",\"weight\":\"Low\",\"primaryDefaultLoad\":1990301694,\"secondaryDefaultLoad\":2092849341,\"defaultLoad\":941784903}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"ourqhakau\",\"tags\":{\"cjooxdjebwpucwwf\":\"hsfwxosowzxcug\",\"hzceuojgjrwjue\":\"ovbvmeueciv\",\"x\":\"otwmcdyt\",\"nrjawgqwg\":\"it\"},\"id\":\"ni\",\"name\":\"kxfbkpycgklwndn\",\"type\":\"jdauwhvy\"}") + "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"pqsxvnmicy\",\"serviceTypeName\":\"vce\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"lo\",\"placementConstraints\":\"oty\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"njbkcnxdhbttkph\"}],\"serviceLoadMetrics\":[{\"name\":\"nv\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1564311717,\"secondaryDefaultLoad\":963875156,\"defaultLoad\":927719856},{\"name\":\"lfplp\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1467620924,\"secondaryDefaultLoad\":1106219716,\"defaultLoad\":1022629586},{\"name\":\"bgyepsbj\",\"weight\":\"Zero\",\"primaryDefaultLoad\":610868240,\"secondaryDefaultLoad\":2003590668,\"defaultLoad\":2007801220},{\"name\":\"pmueefjzwfqk\",\"weight\":\"High\",\"primaryDefaultLoad\":766591584,\"secondaryDefaultLoad\":674100660,\"defaultLoad\":611347280}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"tlmoyrx\":\"qxtccmgyudx\"},\"location\":\"fudwpznt\",\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}") .toObject(ServiceResourceInner.class); - Assertions.assertEquals("laexqp", model.properties().placementConstraints()); + Assertions.assertEquals("oty", model.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("fmisg", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1990301694, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(2092849341, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(941784903, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("melmqkrha", model.properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals("njbkcnxdhbttkph", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("nv", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1564311717, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(963875156, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(927719856, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.properties().defaultMoveCost()); + Assertions.assertEquals("vce", model.properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("uahaquhcdhmd", model.properties().serviceDnsName()); - Assertions.assertEquals("ourqhakau", model.location()); - Assertions.assertEquals("hsfwxosowzxcug", model.tags().get("cjooxdjebwpucwwf")); + Assertions.assertEquals("lo", model.properties().serviceDnsName()); + Assertions.assertEquals("qxtccmgyudx", model.tags().get("tlmoyrx")); + Assertions.assertEquals("fudwpznt", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourceInner model = new ServiceResourceInner() - .withProperties(new ServiceResourceProperties().withPlacementConstraints("laexqp") - .withCorrelationScheme( - Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("mwsrcrgvxpvgo"))) - .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("fmisg") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1990301694) - .withSecondaryDefaultLoad(2092849341) - .withDefaultLoad(941784903))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("melmqkrha") - .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.EXCLUSIVE_PROCESS) - .withServiceDnsName("uahaquhcdhmd")) - .withLocation("ourqhakau") - .withTags(mapOf("cjooxdjebwpucwwf", "hsfwxosowzxcug", "hzceuojgjrwjue", "ovbvmeueciv", "x", "otwmcdyt", - "nrjawgqwg", "it")); + ServiceResourceInner model = new ServiceResourceInner().withProperties(new ServiceResourceProperties() + .withPlacementConstraints("oty") + .withCorrelationScheme( + Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("njbkcnxdhbttkph"))) + .withServiceLoadMetrics(Arrays.asList( + new ServiceLoadMetric().withName("nv") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(1564311717) + .withSecondaryDefaultLoad(963875156) + .withDefaultLoad(927719856), + new ServiceLoadMetric().withName("lfplp") + .withWeight(ServiceLoadMetricWeight.ZERO) + .withPrimaryDefaultLoad(1467620924) + .withSecondaryDefaultLoad(1106219716) + .withDefaultLoad(1022629586), + new ServiceLoadMetric().withName("bgyepsbj") + .withWeight(ServiceLoadMetricWeight.ZERO) + .withPrimaryDefaultLoad(610868240) + .withSecondaryDefaultLoad(2003590668) + .withDefaultLoad(2007801220), + new ServiceLoadMetric().withName("pmueefjzwfqk") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(766591584) + .withSecondaryDefaultLoad(674100660) + .withDefaultLoad(611347280))) + .withServicePlacementPolicies( + Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.LOW) + .withScalingPolicies(Arrays.asList( + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))) + .withServiceTypeName("vce") + .withPartitionDescription(new Partition()) + .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) + .withServiceDnsName("lo")).withTags(mapOf("tlmoyrx", "qxtccmgyudx")).withLocation("fudwpznt"); model = BinaryData.fromObject(model).toObject(ServiceResourceInner.class); - Assertions.assertEquals("laexqp", model.properties().placementConstraints()); + Assertions.assertEquals("oty", model.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("fmisg", model.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1990301694, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(2092849341, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(941784903, model.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.properties().defaultMoveCost()); - Assertions.assertEquals("melmqkrha", model.properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, + Assertions.assertEquals("njbkcnxdhbttkph", model.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("nv", model.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + model.properties().serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(1564311717, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(963875156, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(927719856, model.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.LOW, model.properties().defaultMoveCost()); + Assertions.assertEquals("vce", model.properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.properties().servicePackageActivationMode()); - Assertions.assertEquals("uahaquhcdhmd", model.properties().serviceDnsName()); - Assertions.assertEquals("ourqhakau", model.location()); - Assertions.assertEquals("hsfwxosowzxcug", model.tags().get("cjooxdjebwpucwwf")); + Assertions.assertEquals("lo", model.properties().serviceDnsName()); + Assertions.assertEquals("qxtccmgyudx", model.tags().get("tlmoyrx")); + Assertions.assertEquals("fudwpznt", model.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java index 7bf36a964b3d..e5e7eaddff77 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourceListTests.java @@ -1,169 +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.servicefabricmanagedclusters.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.servicefabricmanagedclusters.implementation.models.ServiceResourceList; import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingTrigger; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelation; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetric; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePackageActivationMode; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServicePlacementPolicy; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceList; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceResourceProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ServiceResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"v\",\"serviceTypeName\":\"elnsmvbxw\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"lh\",\"placementConstraints\":\"aalnjixi\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"wjo\"}],\"serviceLoadMetrics\":[{\"name\":\"cslyjpk\",\"weight\":\"Medium\",\"primaryDefaultLoad\":983085062,\"secondaryDefaultLoad\":1211885049,\"defaultLoad\":1066317539},{\"name\":\"eli\",\"weight\":\"Zero\",\"primaryDefaultLoad\":417791826,\"secondaryDefaultLoad\":644635434,\"defaultLoad\":1975568377},{\"name\":\"hb\",\"weight\":\"Medium\",\"primaryDefaultLoad\":2006567111,\"secondaryDefaultLoad\":1904300707,\"defaultLoad\":338367472}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"napnyiropuhpigv\",\"tags\":{\"txmedj\":\"lgqg\",\"lynqwwncwzzh\":\"c\",\"ellwptfdy\":\"gktrmgucnapkte\",\"rhhuaopppcqeqx\":\"pfqbuaceopzf\"},\"id\":\"z\",\"name\":\"ahzxctobgbk\",\"type\":\"moizpos\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"rcfbunrm\",\"serviceTypeName\":\"qjhhkxbpv\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"hx\",\"placementConstraints\":\"yngudivk\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"bxqz\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"zjf\"}],\"serviceLoadMetrics\":[{\"name\":\"j\",\"weight\":\"Low\",\"primaryDefaultLoad\":1924532267,\"secondaryDefaultLoad\":57389374,\"defaultLoad\":123770675},{\"name\":\"t\",\"weight\":\"Medium\",\"primaryDefaultLoad\":730619532,\"secondaryDefaultLoad\":1493412527,\"defaultLoad\":608754752}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"yslqbhsfx\",\"tags\":{\"wfbkrvrns\":\"ytkblmpew\"},\"id\":\"hqjohxcrsbfova\",\"name\":\"rruvwbhsq\",\"type\":\"sub\"}],\"nextLink\":\"jbi\"}") + "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"jvc\",\"serviceTypeName\":\"lynqwwncwzzh\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"rmgucnap\",\"placementConstraints\":\"eoellwptfdygp\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ac\"}],\"serviceLoadMetrics\":[{\"name\":\"zfq\",\"weight\":\"Low\",\"primaryDefaultLoad\":350693240,\"secondaryDefaultLoad\":90973381,\"defaultLoad\":1553593059},{\"name\":\"cq\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1990032205,\"secondaryDefaultLoad\":280761286,\"defaultLoad\":1114534772},{\"name\":\"zxctobgb\",\"weight\":\"Low\",\"primaryDefaultLoad\":1356840761,\"secondaryDefaultLoad\":1358257343,\"defaultLoad\":2046724372},{\"name\":\"tmgrcfbun\",\"weight\":\"High\",\"primaryDefaultLoad\":1710295425,\"secondaryDefaultLoad\":1514196335,\"defaultLoad\":529783276}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Zero\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"xqzvszjfa\":\"xxjyngudivkrtsw\"},\"location\":\"j\",\"id\":\"xxivetv\",\"name\":\"cqaqtdoqmcbx\",\"type\":\"wvxysl\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"sfxobl\",\"serviceTypeName\":\"tkblmpewww\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"vrnsvshqjohxc\",\"placementConstraints\":\"bfovasrruvwbhsq\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"cgjbirxbp\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"srfbjfdtwss\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"ftpvjzbexil\"}],\"serviceLoadMetrics\":[{\"name\":\"fqqnvwpmqtaruo\",\"weight\":\"High\",\"primaryDefaultLoad\":1203309297,\"secondaryDefaultLoad\":1426920839,\"defaultLoad\":1589023977},{\"name\":\"ytjrybnwjewgdr\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1059734695,\"secondaryDefaultLoad\":662265241,\"defaultLoad\":432099850}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"dslgnayqigynduh\":\"gmifthnzd\"},\"location\":\"hqlkthumaqo\",\"id\":\"gycdu\",\"name\":\"ertgccymva\",\"type\":\"l\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"lqlfm\",\"serviceTypeName\":\"dnbbglzps\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"mcwyhzdxssadb\",\"placementConstraints\":\"nvdfznuda\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"zbn\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"lylpstdb\"}],\"serviceLoadMetrics\":[{\"name\":\"srzdzucerscdn\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1187113167,\"secondaryDefaultLoad\":931979220,\"defaultLoad\":263424871}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"zpyqsemwab\":\"wtmwerio\"},\"location\":\"tshhszhedp\",\"id\":\"wiwubm\",\"name\":\"mbes\",\"type\":\"dnkwwtppjflcxog\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"onz\",\"serviceTypeName\":\"nsikvmkqzeqqkdl\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"mhhv\",\"placementConstraints\":\"ur\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"wobdagxtibqdx\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wakbogqxndl\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"gxhuriplbp\"}],\"serviceLoadMetrics\":[{\"name\":\"unkbebx\",\"weight\":\"Medium\",\"primaryDefaultLoad\":2008169433,\"secondaryDefaultLoad\":1611080667,\"defaultLoad\":782528440},{\"name\":\"rbqtkoie\",\"weight\":\"Zero\",\"primaryDefaultLoad\":921402224,\"secondaryDefaultLoad\":143823433,\"defaultLoad\":209864806},{\"name\":\"ltmuwlauwzizx\",\"weight\":\"Medium\",\"primaryDefaultLoad\":2123049773,\"secondaryDefaultLoad\":904231635,\"defaultLoad\":85590242},{\"name\":\"zmuvpbttdumorppx\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1538567031,\"secondaryDefaultLoad\":1917572310,\"defaultLoad\":1717455223}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Zero\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"dyhtozfikdowwquu\":\"hdneuelfph\",\"ithhqzon\":\"xzxcl\"},\"location\":\"ggbhcohfwds\",\"id\":\"ka\",\"name\":\"jutiiswacff\",\"type\":\"dkzzewkfvhqcrail\"}],\"nextLink\":\"n\"}") .toObject(ServiceResourceList.class); - Assertions.assertEquals("aalnjixi", model.value().get(0).properties().placementConstraints()); + Assertions.assertEquals("eoellwptfdygp", model.value().get(0).properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.value().get(0).properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("wjo", model.value().get(0).properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("cslyjpk", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, + Assertions.assertEquals("ac", model.value().get(0).properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("zfq", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.value().get(0).properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(983085062, + Assertions.assertEquals(350693240, model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1211885049, + Assertions.assertEquals(90973381, model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1066317539, + Assertions.assertEquals(1553593059, model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.value().get(0).properties().defaultMoveCost()); - Assertions.assertEquals("elnsmvbxw", model.value().get(0).properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, + Assertions.assertEquals(MoveCost.ZERO, model.value().get(0).properties().defaultMoveCost()); + Assertions.assertEquals("lynqwwncwzzh", model.value().get(0).properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, model.value().get(0).properties().servicePackageActivationMode()); - Assertions.assertEquals("lh", model.value().get(0).properties().serviceDnsName()); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).location()); - Assertions.assertEquals("lgqg", model.value().get(0).tags().get("txmedj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceResourceList model - = new ServiceResourceList() - .withValue( - Arrays - .asList( - new ServiceResourceInner() - .withProperties(new ServiceResourceProperties().withPlacementConstraints("aalnjixi") - .withCorrelationScheme(Arrays.asList(new ServiceCorrelation() - .withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("wjo"))) - .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("cslyjpk") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(983085062) - .withSecondaryDefaultLoad(1211885049) - .withDefaultLoad(1066317539), - new ServiceLoadMetric().withName("eli") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(417791826) - .withSecondaryDefaultLoad(644635434) - .withDefaultLoad(1975568377), - new ServiceLoadMetric().withName("hb") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(2006567111) - .withSecondaryDefaultLoad(1904300707) - .withDefaultLoad(338367472))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("elnsmvbxw") - .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("lh")) - .withLocation("napnyiropuhpigv") - .withTags(mapOf( - "txmedj", "lgqg", "lynqwwncwzzh", "c", "ellwptfdy", "gktrmgucnapkte", - "rhhuaopppcqeqx", "pfqbuaceopzf")), - new ServiceResourceInner() - .withProperties(new ServiceResourceProperties().withPlacementConstraints("yngudivk") - .withCorrelationScheme(Arrays.asList(new ServiceCorrelation() - .withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("bxqz"), - new ServiceCorrelation() - .withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("zjf"))) - .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("j") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1924532267) - .withSecondaryDefaultLoad(57389374) - .withDefaultLoad(123770675), - new ServiceLoadMetric().withName("t") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(730619532) - .withSecondaryDefaultLoad(1493412527) - .withDefaultLoad(608754752))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("qjhhkxbpv") - .withPartitionDescription(new Partition()) - .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("hx")) - .withLocation("yslqbhsfx") - .withTags(mapOf("wfbkrvrns", "ytkblmpew")))); - model = BinaryData.fromObject(model).toObject(ServiceResourceList.class); - Assertions.assertEquals("aalnjixi", model.value().get(0).properties().placementConstraints()); - Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, - model.value().get(0).properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("wjo", model.value().get(0).properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("cslyjpk", model.value().get(0).properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, - model.value().get(0).properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(983085062, - model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1211885049, - model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1066317539, - model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.value().get(0).properties().defaultMoveCost()); - Assertions.assertEquals("elnsmvbxw", model.value().get(0).properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, - model.value().get(0).properties().servicePackageActivationMode()); - Assertions.assertEquals("lh", model.value().get(0).properties().serviceDnsName()); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).location()); - Assertions.assertEquals("lgqg", model.value().get(0).tags().get("txmedj")); - } - - // 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; + Assertions.assertEquals("rmgucnap", model.value().get(0).properties().serviceDnsName()); + Assertions.assertEquals("xxjyngudivkrtsw", model.value().get(0).tags().get("xqzvszjfa")); + Assertions.assertEquals("j", model.value().get(0).location()); + Assertions.assertEquals("n", model.nextLink()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java index 491b1e4a14c4..13d80ff723e8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesBaseTests.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.servicefabricmanagedclusters.generated; @@ -22,74 +22,54 @@ public final class ServiceResourcePropertiesBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourcePropertiesBase model = BinaryData.fromString( - "{\"placementConstraints\":\"vjcbpwxqpsrknf\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"riuhprwm\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"vxqtayriwwroyqbe\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"mcqibycnojv\"}],\"serviceLoadMetrics\":[{\"name\":\"e\",\"weight\":\"High\",\"primaryDefaultLoad\":1995543121,\"secondaryDefaultLoad\":488274582,\"defaultLoad\":673503494},{\"name\":\"pjyzhpv\",\"weight\":\"High\",\"primaryDefaultLoad\":141640204,\"secondaryDefaultLoad\":1630309887,\"defaultLoad\":2048168714},{\"name\":\"jzlmw\",\"weight\":\"High\",\"primaryDefaultLoad\":413444138,\"secondaryDefaultLoad\":2069794521,\"defaultLoad\":2083539395},{\"name\":\"ovawjvzunlu\",\"weight\":\"Low\",\"primaryDefaultLoad\":72730946,\"secondaryDefaultLoad\":1859537611,\"defaultLoad\":112324206}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"placementConstraints\":\"qpsrknftguvri\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"wmdyvxqtay\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ww\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"yqbexrmcqibycno\"}],\"serviceLoadMetrics\":[{\"name\":\"nmefqsgzvahapj\",\"weight\":\"Low\",\"primaryDefaultLoad\":407951655,\"secondaryDefaultLoad\":139980296,\"defaultLoad\":1827531187}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("vjcbpwxqpsrknf", model.placementConstraints()); + Assertions.assertEquals("qpsrknftguvri", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("riuhprwm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("e", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1995543121, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(488274582, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(673503494, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals("wmdyvxqtay", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("nmefqsgzvahapj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(407951655, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(139980296, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1827531187, model.serviceLoadMetrics().get(0).defaultLoad()); Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourcePropertiesBase model - = new ServiceResourcePropertiesBase().withPlacementConstraints("vjcbpwxqpsrknf") - .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("riuhprwm"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("vxqtayriwwroyqbe"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("mcqibycnojv"))) - .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("e") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(1995543121) - .withSecondaryDefaultLoad(488274582) - .withDefaultLoad(673503494), - new ServiceLoadMetric().withName("pjyzhpv") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(141640204) - .withSecondaryDefaultLoad(1630309887) - .withDefaultLoad(2048168714), - new ServiceLoadMetric().withName("jzlmw") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(413444138) - .withSecondaryDefaultLoad(2069794521) - .withDefaultLoad(2083539395), - new ServiceLoadMetric().withName("ovawjvzunlu") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(72730946) - .withSecondaryDefaultLoad(1859537611) - .withDefaultLoad(112324206))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) - .withScalingPolicies(Arrays.asList( - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()), - new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) - .withScalingTrigger(new ScalingTrigger()))); + ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase() + .withPlacementConstraints("qpsrknftguvri") + .withCorrelationScheme(Arrays.asList( + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("wmdyvxqtay"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("ww"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("yqbexrmcqibycno"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("nmefqsgzvahapj") + .withWeight(ServiceLoadMetricWeight.LOW) + .withPrimaryDefaultLoad(407951655) + .withSecondaryDefaultLoad(139980296) + .withDefaultLoad(1827531187))) + .withServicePlacementPolicies( + Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) + .withScalingPolicies(Arrays.asList( + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()))); model = BinaryData.fromObject(model).toObject(ServiceResourcePropertiesBase.class); - Assertions.assertEquals("vjcbpwxqpsrknf", model.placementConstraints()); + Assertions.assertEquals("qpsrknftguvri", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("riuhprwm", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("e", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1995543121, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(488274582, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(673503494, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals("wmdyvxqtay", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("nmefqsgzvahapj", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(407951655, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(139980296, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1827531187, model.serviceLoadMetrics().get(0).defaultLoad()); Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java index db261d482429..be0811f09d34 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceResourcePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -24,48 +24,54 @@ public final class ServiceResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceResourceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"zbtd\",\"serviceTypeName\":\"xujznbmpowu\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"qlveualupjmkh\",\"placementConstraints\":\"obbc\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"tjrip\"}],\"serviceLoadMetrics\":[{\"name\":\"pbewtghfgblcgwx\",\"weight\":\"High\",\"primaryDefaultLoad\":932562427,\"secondaryDefaultLoad\":2103137599,\"defaultLoad\":1823532721},{\"name\":\"egibtnmxiebww\",\"weight\":\"Low\",\"primaryDefaultLoad\":1519275761,\"secondaryDefaultLoad\":193613480,\"defaultLoad\":1034644273},{\"name\":\"rtzju\",\"weight\":\"Medium\",\"primaryDefaultLoad\":598094792,\"secondaryDefaultLoad\":1235130312,\"defaultLoad\":1961357126}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"ycanuzbpzkafku\",\"serviceTypeName\":\"b\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"bmehh\",\"placementConstraints\":\"yvjusrtslhsp\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"maofmxagkv\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"elmqk\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ahvljuaha\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"hcdhmdual\"}],\"serviceLoadMetrics\":[{\"name\":\"qpv\",\"weight\":\"High\",\"primaryDefaultLoad\":294636913,\"secondaryDefaultLoad\":1606090132,\"defaultLoad\":205808204},{\"name\":\"gvxp\",\"weight\":\"Low\",\"primaryDefaultLoad\":1677729561,\"secondaryDefaultLoad\":1121960551,\"defaultLoad\":1625950300},{\"name\":\"sgwbnbbeld\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1782633502,\"secondaryDefaultLoad\":70118233,\"defaultLoad\":113893877}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(ServiceResourceProperties.class); - Assertions.assertEquals("obbc", model.placementConstraints()); + Assertions.assertEquals("yvjusrtslhsp", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("tjrip", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("pbewtghfgblcgwx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("maofmxagkv", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(932562427, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(2103137599, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1823532721, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("xujznbmpowu", model.serviceTypeName()); + Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("b", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("qlveualupjmkh", model.serviceDnsName()); + Assertions.assertEquals("bmehh", model.serviceDnsName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("obbc") - .withCorrelationScheme( - Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("tjrip"))) + ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("yvjusrtslhsp") + .withCorrelationScheme(Arrays.asList( + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("maofmxagkv"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("elmqk"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("ahvljuaha"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("hcdhmdual"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("pbewtghfgblcgwx") + new ServiceLoadMetric().withName("qpv") .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(932562427) - .withSecondaryDefaultLoad(2103137599) - .withDefaultLoad(1823532721), - new ServiceLoadMetric().withName("egibtnmxiebww") + .withPrimaryDefaultLoad(294636913) + .withSecondaryDefaultLoad(1606090132) + .withDefaultLoad(205808204), + new ServiceLoadMetric().withName("gvxp") .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1519275761) - .withSecondaryDefaultLoad(193613480) - .withDefaultLoad(1034644273), - new ServiceLoadMetric().withName("rtzju") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(598094792) - .withSecondaryDefaultLoad(1235130312) - .withDefaultLoad(1961357126))) + .withPrimaryDefaultLoad(1677729561) + .withSecondaryDefaultLoad(1121960551) + .withDefaultLoad(1625950300), + new ServiceLoadMetric().withName("sgwbnbbeld") + .withWeight(ServiceLoadMetricWeight.ZERO) + .withPrimaryDefaultLoad(1782633502) + .withSecondaryDefaultLoad(70118233) + .withDefaultLoad(113893877))) .withServicePlacementPolicies( Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) + .withDefaultMoveCost(MoveCost.MEDIUM) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), @@ -73,23 +79,23 @@ public void testSerialize() throws Exception { .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("xujznbmpowu") + .withServiceTypeName("b") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("qlveualupjmkh"); + .withServiceDnsName("bmehh"); model = BinaryData.fromObject(model).toObject(ServiceResourceProperties.class); - Assertions.assertEquals("obbc", model.placementConstraints()); + Assertions.assertEquals("yvjusrtslhsp", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("tjrip", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("pbewtghfgblcgwx", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("maofmxagkv", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("qpv", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(932562427, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(2103137599, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1823532721, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("xujznbmpowu", model.serviceTypeName()); + Assertions.assertEquals(294636913, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1606090132, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(205808204, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("b", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("qlveualupjmkh", model.serviceDnsName()); + Assertions.assertEquals("bmehh", model.serviceDnsName()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceTypeHealthPolicyTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceTypeHealthPolicyTests.java index 9ee5a4f3f23f..6256b918ba92 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceTypeHealthPolicyTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceTypeHealthPolicyTests.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.servicefabricmanagedclusters.generated; @@ -12,21 +12,21 @@ public final class ServiceTypeHealthPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceTypeHealthPolicy model = BinaryData.fromString( - "{\"maxPercentUnhealthyServices\":10300487,\"maxPercentUnhealthyPartitionsPerService\":13446913,\"maxPercentUnhealthyReplicasPerPartition\":20476621}") + "{\"maxPercentUnhealthyServices\":590819227,\"maxPercentUnhealthyPartitionsPerService\":1245187453,\"maxPercentUnhealthyReplicasPerPartition\":1444889460}") .toObject(ServiceTypeHealthPolicy.class); - Assertions.assertEquals(10300487, model.maxPercentUnhealthyServices()); - Assertions.assertEquals(13446913, model.maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(20476621, model.maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(590819227, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1245187453, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1444889460, model.maxPercentUnhealthyReplicasPerPartition()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceTypeHealthPolicy model = new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(10300487) - .withMaxPercentUnhealthyPartitionsPerService(13446913) - .withMaxPercentUnhealthyReplicasPerPartition(20476621); + ServiceTypeHealthPolicy model = new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(590819227) + .withMaxPercentUnhealthyPartitionsPerService(1245187453) + .withMaxPercentUnhealthyReplicasPerPartition(1444889460); model = BinaryData.fromObject(model).toObject(ServiceTypeHealthPolicy.class); - Assertions.assertEquals(10300487, model.maxPercentUnhealthyServices()); - Assertions.assertEquals(13446913, model.maxPercentUnhealthyPartitionsPerService()); - Assertions.assertEquals(20476621, model.maxPercentUnhealthyReplicasPerPartition()); + Assertions.assertEquals(590819227, model.maxPercentUnhealthyServices()); + Assertions.assertEquals(1245187453, model.maxPercentUnhealthyPartitionsPerService()); + Assertions.assertEquals(1444889460, model.maxPercentUnhealthyReplicasPerPartition()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java index 8e0c652b0aa3..f28dac6e20b8 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServiceUpdateParametersTests.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.servicefabricmanagedclusters.generated; @@ -14,15 +14,17 @@ public final class ServiceUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceUpdateParameters model - = BinaryData.fromString("{\"tags\":{\"uusdttouwa\":\"bsjyofdx\"}}").toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("bsjyofdx", model.tags().get("uusdttouwa")); + = BinaryData.fromString("{\"tags\":{\"pnapnyiropuh\":\"aulppggd\",\"git\":\"igvpgylg\"}}") + .toObject(ServiceUpdateParameters.class); + Assertions.assertEquals("aulppggd", model.tags().get("pnapnyiropuh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceUpdateParameters model = new ServiceUpdateParameters().withTags(mapOf("uusdttouwa", "bsjyofdx")); + ServiceUpdateParameters model + = new ServiceUpdateParameters().withTags(mapOf("pnapnyiropuh", "aulppggd", "git", "igvpgylg")); model = BinaryData.fromObject(model).toObject(ServiceUpdateParameters.class); - Assertions.assertEquals("bsjyofdx", model.tags().get("uusdttouwa")); + Assertions.assertEquals("aulppggd", model.tags().get("pnapnyiropuh")); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java index 65074b08b6df..762f158c3a79 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesCreateOrUpdateMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; import com.azure.resourcemanager.servicefabricmanagedclusters.models.Partition; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ScalingMechanism; @@ -36,73 +36,67 @@ public final class ServicesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"linmfgv\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"gh\",\"placementConstraints\":\"ypoq\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"qhykprlpyzn\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"iq\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"mexiitdfuxt\"}],\"serviceLoadMetrics\":[{\"name\":\"iibmi\",\"weight\":\"Low\",\"primaryDefaultLoad\":1721693847,\"secondaryDefaultLoad\":2019693740,\"defaultLoad\":550781101},{\"name\":\"ljhnmgixhcmav\",\"weight\":\"Low\",\"primaryDefaultLoad\":1277274936,\"secondaryDefaultLoad\":308634203,\"defaultLoad\":1053565042},{\"name\":\"cgyypro\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1374628714,\"secondaryDefaultLoad\":147246399,\"defaultLoad\":2095396733},{\"name\":\"xhugcm\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1134791831,\"secondaryDefaultLoad\":493820197,\"defaultLoad\":2097431423}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"zfjltfvnzcyjto\",\"tags\":{\"bdb\":\"opv\",\"ibcysihsgqc\":\"qgqqihedsvqwthmk\"},\"id\":\"hohsd\",\"name\":\"mcdzsufcohdxbz\",\"type\":\"mcmuapc\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"Succeeded\",\"serviceTypeName\":\"zabs\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"phojeevyhy\",\"placementConstraints\":\"gzfc\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"mfg\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"glqgleoh\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"etnluankrrfx\"}],\"serviceLoadMetrics\":[{\"name\":\"btijvacvbm\",\"weight\":\"Low\",\"primaryDefaultLoad\":32108213,\"secondaryDefaultLoad\":1374420811,\"defaultLoad\":195498189},{\"name\":\"rnwxacevehjkuyxo\",\"weight\":\"Low\",\"primaryDefaultLoad\":1859068640,\"secondaryDefaultLoad\":517079921,\"defaultLoad\":955736847},{\"name\":\"aeylinm\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1550392867,\"secondaryDefaultLoad\":1089032058,\"defaultLoad\":1446560637},{\"name\":\"riypoqeyhlqhyk\",\"weight\":\"High\",\"primaryDefaultLoad\":2099801683,\"secondaryDefaultLoad\":1261691522,\"defaultLoad\":1860731641}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"iybnnustgnljhnmg\":\"itdfuxtyasiib\",\"hcgyyprotwyp\":\"xhcmavmqfoudo\"},\"location\":\"d\",\"id\":\"xhugcm\",\"name\":\"k\",\"type\":\"vlgo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ServiceResource response = manager.services() - .define("ttexoqqpwcyyufmh") - .withExistingApplication("bn", "mysu", "swqrntvlwijp") - .withRegion("mdxotngfdgu") - .withTags( - mapOf("zabs", "zihgrkyu", "hojeevy", "mfp", "czbgomfgbeg", "yhsgz", "rfxeeebtij", "qgleohibetnluank")) - .withProperties(new ServiceResourceProperties().withPlacementConstraints("rqbnjjrc") - .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("dcwboxjum"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("qoli"))) + .define("uxswqrntvl") + .withExistingApplication("tybbwwpgda", "chzyvlixqnrk", "xkjibnxmy") + .withRegion("fqwmkyoquf") + .withTags(mapOf("rzpasccbiuimzdly", "qxfuojrngif")) + .withProperties(new ServiceResourceProperties().withPlacementConstraints("cdqzhlctddu") + .withCorrelationScheme( + Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) + .withServiceName("yfp"))) .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("aiouaubrjt") + new ServiceLoadMetric().withName("qbnj") .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(6794810) - .withSecondaryDefaultLoad(373191664) - .withDefaultLoad(1606291042), - new ServiceLoadMetric().withName("ngiflrzpasccbi") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(1576157803) - .withSecondaryDefaultLoad(26585986) - .withDefaultLoad(162687194), - new ServiceLoadMetric().withName("fqwmkyoquf") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(1951333112) - .withSecondaryDefaultLoad(543116949) - .withDefaultLoad(1069395598))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) + .withPrimaryDefaultLoad(797085028) + .withSecondaryDefaultLoad(628277509) + .withDefaultLoad(459036091), + new ServiceLoadMetric().withName("wboxjumvqqo") + .withWeight(ServiceLoadMetricWeight.MEDIUM) + .withPrimaryDefaultLoad(960198730) + .withSecondaryDefaultLoad(153099260) + .withDefaultLoad(1564106365))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.LOW) .withScalingPolicies(Arrays.asList( + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("cdqzhlctddu") + .withServiceTypeName("pwcyyufmhr") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("yfp")) + .withServiceDnsName("wmqs")) .create(); - Assertions.assertEquals("ypoq", response.properties().placementConstraints()); + Assertions.assertEquals("gzfc", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("qhykprlpyzn", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("iibmi", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("mfg", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("btijvacvbm", response.properties().serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.LOW, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1721693847, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(2019693740, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(550781101, response.properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("linmfgv", response.properties().serviceTypeName()); + Assertions.assertEquals(32108213, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1374420811, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(195498189, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, response.properties().defaultMoveCost()); + Assertions.assertEquals("zabs", response.properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("gh", response.properties().serviceDnsName()); - Assertions.assertEquals("zfjltfvnzcyjto", response.location()); - Assertions.assertEquals("opv", response.tags().get("bdb")); + Assertions.assertEquals("phojeevyhy", response.properties().serviceDnsName()); + Assertions.assertEquals("itdfuxtyasiib", response.tags().get("iybnnustgnljhnmg")); + Assertions.assertEquals("d", response.location()); } // Use "Map.of" if available diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteMockTests.java deleted file mode 100644 index 84fd50a031f9..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServicesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.services().delete("jtszcof", "zehtdhgb", "k", "reljeamur", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java index 70a2d2dabbc1..c7c15e82315c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesGetWithResponseMockTests.java @@ -1,15 +1,15 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight; @@ -25,35 +25,35 @@ public final class ServicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"rimrs\",\"serviceTypeName\":\"pteecjme\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"tvasy\",\"placementConstraints\":\"xdza\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"oohgu\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"uzboyjathw\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"olbaemwmdx\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"bwjscjpahlxveab\"}],\"serviceLoadMetrics\":[{\"name\":\"nmwmqtibx\",\"weight\":\"Low\",\"primaryDefaultLoad\":462307774,\"secondaryDefaultLoad\":460830566,\"defaultLoad\":1410442260},{\"name\":\"ttadijae\",\"weight\":\"Low\",\"primaryDefaultLoad\":1336092586,\"secondaryDefaultLoad\":1646368480,\"defaultLoad\":647971020},{\"name\":\"pndzaapmudqmeq\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1749633474,\"secondaryDefaultLoad\":1859384102,\"defaultLoad\":674250391},{\"name\":\"wyxebeybpmzz\",\"weight\":\"Low\",\"primaryDefaultLoad\":1813435999,\"secondaryDefaultLoad\":639795933,\"defaultLoad\":1808729813}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"qaqhvseufu\",\"tags\":{\"jqfrddgamquh\":\"xpdlcgqlsis\",\"sjuivfcdisyir\":\"os\",\"ujrtrhqvwr\":\"xzhczexrxz\"},\"id\":\"khgn\",\"name\":\"nzonzl\",\"type\":\"piqywnc\"}"; + = "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"biqtgdq\",\"serviceTypeName\":\"hm\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"drizetpwbr\",\"placementConstraints\":\"llibphbqzmizak\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"kjpdnjzhajo\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"hjlmu\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"xprimrsop\"}],\"serviceLoadMetrics\":[{\"name\":\"cjmeislstvasy\",\"weight\":\"Zero\",\"primaryDefaultLoad\":936242066,\"secondaryDefaultLoad\":2139579132,\"defaultLoad\":1824653896}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"zolbaemwmdxmebw\":\"uzboyjathw\",\"a\":\"scjpahlxv\",\"xnmwmqtibxyijddt\":\"f\",\"ekpndzaapmudq\":\"qcttadijaeukmrsi\"},\"location\":\"qwigpibudqwyxe\",\"id\":\"ybpmzznrtffyaq\",\"name\":\"tmhheioqa\",\"type\":\"hvseufuqyrx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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)); ServiceResource response = manager.services() - .getWithResponse("bphbqzmizakakank", "p", "n", "zhajoylhjlmuo", com.azure.core.util.Context.NONE) + .getWithResponse("smkss", "h", "iftxfkf", "egprhptil", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xdza", response.properties().placementConstraints()); + Assertions.assertEquals("llibphbqzmizak", response.properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("oohgu", response.properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("nmwmqtibx", response.properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.LOW, + Assertions.assertEquals("kjpdnjzhajo", response.properties().correlationScheme().get(0).serviceName()); + Assertions.assertEquals("cjmeislstvasy", response.properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, response.properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(462307774, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(460830566, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1410442260, response.properties().serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(936242066, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(2139579132, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1824653896, response.properties().serviceLoadMetrics().get(0).defaultLoad()); Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost()); - Assertions.assertEquals("pteecjme", response.properties().serviceTypeName()); - Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, + Assertions.assertEquals("hm", response.properties().serviceTypeName()); + Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, response.properties().servicePackageActivationMode()); - Assertions.assertEquals("tvasy", response.properties().serviceDnsName()); - Assertions.assertEquals("qaqhvseufu", response.location()); - Assertions.assertEquals("xpdlcgqlsis", response.tags().get("jqfrddgamquh")); + Assertions.assertEquals("drizetpwbr", response.properties().serviceDnsName()); + Assertions.assertEquals("uzboyjathw", response.tags().get("zolbaemwmdxmebw")); + Assertions.assertEquals("qwigpibudqwyxe", response.location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java index e69f48834da7..2fa4a8e4d85d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ServicesListByApplicationsMockTests.java @@ -1,16 +1,16 @@ // 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.servicefabricmanagedclusters.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.servicefabricmanagedclusters.ServiceFabricManagedClustersManager; +import com.azure.resourcemanager.servicefabricmanagedclusters.ServicefabricmanagedclustersManager; import com.azure.resourcemanager.servicefabricmanagedclusters.models.MoveCost; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceCorrelationScheme; import com.azure.resourcemanager.servicefabricmanagedclusters.models.ServiceLoadMetricWeight; @@ -26,38 +26,38 @@ public final class ServicesListByApplicationsMockTests { @Test public void testListByApplications() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"idizozsdbccxjmo\",\"serviceTypeName\":\"fdgnwncypuuwwlt\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ctzenkeifzzhmkd\",\"placementConstraints\":\"vflyhbxcu\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"gsrboldforobw\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"vizbfhfo\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"acqpbtuodxesza\"}],\"serviceLoadMetrics\":[{\"name\":\"l\",\"weight\":\"High\",\"primaryDefaultLoad\":308639473,\"secondaryDefaultLoad\":1274363092,\"defaultLoad\":46527363},{\"name\":\"kwrrwo\",\"weight\":\"Medium\",\"primaryDefaultLoad\":2074554756,\"secondaryDefaultLoad\":913388028,\"defaultLoad\":671664231}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Zero\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"location\":\"ywuhpsvfuur\",\"tags\":{\"xwlalniexzsrzpg\":\"we\",\"wpgdak\":\"pqtybb\"},\"id\":\"zyvli\",\"name\":\"q\",\"type\":\"rkcxkj\"}]}"; + = "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"zexrxzbujrt\",\"serviceTypeName\":\"hqvwrevkhgnlnzon\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"i\",\"placementConstraints\":\"wncvjtszcofiz\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"hgbjkvrelje\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"urvzmlovuanashc\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"pmjerbdkelvidiz\"}],\"serviceLoadMetrics\":[{\"name\":\"db\",\"weight\":\"Low\",\"primaryDefaultLoad\":1920486563,\"secondaryDefaultLoad\":1331407717,\"defaultLoad\":1408228263},{\"name\":\"gnwncypuuwwlt\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1798680046,\"secondaryDefaultLoad\":1231214883,\"defaultLoad\":1577867001},{\"name\":\"keifzzhmkdasv\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1940706470,\"secondaryDefaultLoad\":432756215,\"defaultLoad\":1487873625},{\"name\":\"chxgs\",\"weight\":\"Medium\",\"primaryDefaultLoad\":96639942,\"secondaryDefaultLoad\":477372699,\"defaultLoad\":82251270}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Low\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]},\"tags\":{\"cqpbtuo\":\"fhfovv\",\"bbelawumuaslzk\":\"xesz\",\"mdr\":\"rrwoycqucwyhahn\"},\"location\":\"wuhpsvfuur\",\"id\":\"lwexxwl\",\"name\":\"lniexz\",\"type\":\"rzpgep\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceFabricManagedClustersManager manager = ServiceFabricManagedClustersManager.configure() + ServicefabricmanagedclustersManager manager = ServicefabricmanagedclustersManager.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.services().listByApplications("zmlovuanash", "xlpm", "erbdk", com.azure.core.util.Context.NONE); + PagedIterable response = manager.services() + .listByApplications("dlcgqlsismjqfr", "dgamquhiosrsj", "ivfcdisyirnx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vflyhbxcu", response.iterator().next().properties().placementConstraints()); + Assertions.assertEquals("wncvjtszcofiz", response.iterator().next().properties().placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, response.iterator().next().properties().correlationScheme().get(0).scheme()); - Assertions.assertEquals("gsrboldforobw", + Assertions.assertEquals("hgbjkvrelje", response.iterator().next().properties().correlationScheme().get(0).serviceName()); - Assertions.assertEquals("l", response.iterator().next().properties().serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, + Assertions.assertEquals("db", response.iterator().next().properties().serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, response.iterator().next().properties().serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(308639473, + Assertions.assertEquals(1920486563, response.iterator().next().properties().serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1274363092, + Assertions.assertEquals(1331407717, response.iterator().next().properties().serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(46527363, + Assertions.assertEquals(1408228263, response.iterator().next().properties().serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.ZERO, response.iterator().next().properties().defaultMoveCost()); - Assertions.assertEquals("fdgnwncypuuwwlt", response.iterator().next().properties().serviceTypeName()); + Assertions.assertEquals(MoveCost.LOW, response.iterator().next().properties().defaultMoveCost()); + Assertions.assertEquals("hqvwrevkhgnlnzon", response.iterator().next().properties().serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.EXCLUSIVE_PROCESS, response.iterator().next().properties().servicePackageActivationMode()); - Assertions.assertEquals("ctzenkeifzzhmkd", response.iterator().next().properties().serviceDnsName()); - Assertions.assertEquals("ywuhpsvfuur", response.iterator().next().location()); - Assertions.assertEquals("we", response.iterator().next().tags().get("xwlalniexzsrzpg")); + Assertions.assertEquals("i", response.iterator().next().properties().serviceDnsName()); + Assertions.assertEquals("fhfovv", response.iterator().next().tags().get("cqpbtuo")); + Assertions.assertEquals("wuhpsvfuur", response.iterator().next().location()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java index 3bf22b26615f..5499f2bdfd9d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsParameterDescriptionTests.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.servicefabricmanagedclusters.generated; @@ -11,18 +11,17 @@ public final class SettingsParameterDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SettingsParameterDescription model = BinaryData.fromString("{\"name\":\"quxvypomgkop\",\"value\":\"whojvp\"}") - .toObject(SettingsParameterDescription.class); - Assertions.assertEquals("quxvypomgkop", model.name()); - Assertions.assertEquals("whojvp", model.value()); + SettingsParameterDescription model + = BinaryData.fromString("{\"name\":\"z\",\"value\":\"v\"}").toObject(SettingsParameterDescription.class); + Assertions.assertEquals("z", model.name()); + Assertions.assertEquals("v", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsParameterDescription model - = new SettingsParameterDescription().withName("quxvypomgkop").withValue("whojvp"); + SettingsParameterDescription model = new SettingsParameterDescription().withName("z").withValue("v"); model = BinaryData.fromObject(model).toObject(SettingsParameterDescription.class); - Assertions.assertEquals("quxvypomgkop", model.name()); - Assertions.assertEquals("whojvp", model.value()); + Assertions.assertEquals("z", model.name()); + Assertions.assertEquals("v", model.value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java index f13c2e18155e..bf0c470d684a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SettingsSectionDescriptionTests.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.servicefabricmanagedclusters.generated; @@ -14,23 +14,23 @@ public final class SettingsSectionDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SettingsSectionDescription model = BinaryData.fromString( - "{\"name\":\"luicpdggkzzlvmbm\",\"parameters\":[{\"name\":\"xmodf\",\"value\":\"uefywsbpfvmwy\"},{\"name\":\"rfouyftaakcpw\",\"value\":\"yzvqt\"},{\"name\":\"nubexk\",\"value\":\"zksmondj\"}]}") + "{\"name\":\"vokotllxdyh\",\"parameters\":[{\"name\":\"y\",\"value\":\"cogjltdtbn\"},{\"name\":\"hadoocrk\",\"value\":\"cikhnv\"},{\"name\":\"amqgxqquezikyw\",\"value\":\"gxk\"},{\"name\":\"lla\",\"value\":\"melwuipiccjz\"}]}") .toObject(SettingsSectionDescription.class); - Assertions.assertEquals("luicpdggkzzlvmbm", model.name()); - Assertions.assertEquals("xmodf", model.parameters().get(0).name()); - Assertions.assertEquals("uefywsbpfvmwy", model.parameters().get(0).value()); + Assertions.assertEquals("vokotllxdyh", model.name()); + Assertions.assertEquals("y", model.parameters().get(0).name()); + Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SettingsSectionDescription model = new SettingsSectionDescription().withName("luicpdggkzzlvmbm") - .withParameters( - Arrays.asList(new SettingsParameterDescription().withName("xmodf").withValue("uefywsbpfvmwy"), - new SettingsParameterDescription().withName("rfouyftaakcpw").withValue("yzvqt"), - new SettingsParameterDescription().withName("nubexk").withValue("zksmondj"))); + SettingsSectionDescription model = new SettingsSectionDescription().withName("vokotllxdyh") + .withParameters(Arrays.asList(new SettingsParameterDescription().withName("y").withValue("cogjltdtbn"), + new SettingsParameterDescription().withName("hadoocrk").withValue("cikhnv"), + new SettingsParameterDescription().withName("amqgxqquezikyw").withValue("gxk"), + new SettingsParameterDescription().withName("lla").withValue("melwuipiccjz"))); model = BinaryData.fromObject(model).toObject(SettingsSectionDescription.class); - Assertions.assertEquals("luicpdggkzzlvmbm", model.name()); - Assertions.assertEquals("xmodf", model.parameters().get(0).name()); - Assertions.assertEquals("uefywsbpfvmwy", model.parameters().get(0).value()); + Assertions.assertEquals("vokotllxdyh", model.name()); + Assertions.assertEquals("y", model.parameters().get(0).name()); + Assertions.assertEquals("cogjltdtbn", model.parameters().get(0).value()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SingletonPartitionSchemeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SingletonPartitionSchemeTests.java index 5be0579d678c..1b14f3771928 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SingletonPartitionSchemeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SingletonPartitionSchemeTests.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.servicefabricmanagedclusters.generated; diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java index 42d6cdb168b8..a433c1b3c13f 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SkuTests.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.servicefabricmanagedclusters.generated; @@ -12,14 +12,14 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"Basic\"}").toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Sku model = BinaryData.fromString("{\"name\":\"Standard\"}").toObject(Sku.class); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.BASIC); + Sku model = new Sku().withName(SkuName.STANDARD); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.BASIC, model.name()); + Assertions.assertEquals(SkuName.STANDARD, model.name()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java index eb83b1c8a73a..39932c24a7f4 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatefulServicePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -24,57 +24,43 @@ public final class StatefulServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatefulServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":true,\"targetReplicaSetSize\":172604162,\"minReplicaSetSize\":725495584,\"replicaRestartWaitDuration\":\"znxcvds\",\"quorumLossWaitDuration\":\"njivolvtnovq\",\"standByReplicaKeepDuration\":\"gemjdftuljltdu\",\"servicePlacementTimeLimit\":\"amtmcz\",\"provisioningState\":\"m\",\"serviceTypeName\":\"jw\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"ioknssxmoj\",\"placementConstraints\":\"vpkjpr\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"fz\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"jyxgtczh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"dbsdshm\"}],\"serviceLoadMetrics\":[{\"name\":\"aehvbbxuri\",\"weight\":\"High\",\"primaryDefaultLoad\":102090310,\"secondaryDefaultLoad\":1239776527,\"defaultLoad\":1256288646},{\"name\":\"x\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1028544137,\"secondaryDefaultLoad\":674255307,\"defaultLoad\":1619197472},{\"name\":\"yklyhpluodpvruud\",\"weight\":\"Zero\",\"primaryDefaultLoad\":766813389,\"secondaryDefaultLoad\":1707092311,\"defaultLoad\":1721626377}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"High\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":true,\"targetReplicaSetSize\":33232567,\"minReplicaSetSize\":1607260784,\"replicaRestartWaitDuration\":\"fwxosowzxcu\",\"quorumLossWaitDuration\":\"cjooxdjebwpucwwf\",\"standByReplicaKeepDuration\":\"vbvmeu\",\"servicePlacementTimeLimit\":\"ivyhzceuojgjrwju\",\"provisioningState\":\"otwmcdyt\",\"serviceTypeName\":\"x\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"nrjawgqwg\",\"placementConstraints\":\"ni\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"bkpyc\"}],\"serviceLoadMetrics\":[{\"name\":\"wndnhj\",\"weight\":\"High\",\"primaryDefaultLoad\":2043748556,\"secondaryDefaultLoad\":1020918643,\"defaultLoad\":1990735678}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatefulServiceProperties.class); - Assertions.assertEquals("vpkjpr", model.placementConstraints()); + Assertions.assertEquals("ni", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fz", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("aehvbbxuri", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("bkpyc", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("wndnhj", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(102090310, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1239776527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1256288646, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("jw", model.serviceTypeName()); + Assertions.assertEquals(2043748556, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1020918643, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1990735678, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("x", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("ioknssxmoj", model.serviceDnsName()); + Assertions.assertEquals("nrjawgqwg", model.serviceDnsName()); Assertions.assertEquals(true, model.hasPersistedState()); - Assertions.assertEquals(172604162, model.targetReplicaSetSize()); - Assertions.assertEquals(725495584, model.minReplicaSetSize()); - Assertions.assertEquals("znxcvds", model.replicaRestartWaitDuration()); - Assertions.assertEquals("njivolvtnovq", model.quorumLossWaitDuration()); - Assertions.assertEquals("gemjdftuljltdu", model.standByReplicaKeepDuration()); - Assertions.assertEquals("amtmcz", model.servicePlacementTimeLimit()); + Assertions.assertEquals(33232567, model.targetReplicaSetSize()); + Assertions.assertEquals(1607260784, model.minReplicaSetSize()); + Assertions.assertEquals("fwxosowzxcu", model.replicaRestartWaitDuration()); + Assertions.assertEquals("cjooxdjebwpucwwf", model.quorumLossWaitDuration()); + Assertions.assertEquals("vbvmeu", model.standByReplicaKeepDuration()); + Assertions.assertEquals("ivyhzceuojgjrwju", model.servicePlacementTimeLimit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("vpkjpr") - .withCorrelationScheme(Arrays.asList( - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("fz"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("jyxgtczh"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) - .withServiceName("dbsdshm"))) - .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("aehvbbxuri") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(102090310) - .withSecondaryDefaultLoad(1239776527) - .withDefaultLoad(1256288646), - new ServiceLoadMetric().withName("x") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(1028544137) - .withSecondaryDefaultLoad(674255307) - .withDefaultLoad(1619197472), - new ServiceLoadMetric().withName("yklyhpluodpvruud") - .withWeight(ServiceLoadMetricWeight.ZERO) - .withPrimaryDefaultLoad(766813389) - .withSecondaryDefaultLoad(1707092311) - .withDefaultLoad(1721626377))) - .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), - new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.HIGH) + StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("ni") + .withCorrelationScheme( + Arrays.asList(new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("bkpyc"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("wndnhj") + .withWeight(ServiceLoadMetricWeight.HIGH) + .withPrimaryDefaultLoad(2043748556) + .withSecondaryDefaultLoad(1020918643) + .withDefaultLoad(1990735678))) + .withServicePlacementPolicies( + Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.MEDIUM) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), @@ -82,36 +68,36 @@ public void testSerialize() throws Exception { .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("jw") + .withServiceTypeName("x") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("ioknssxmoj") + .withServiceDnsName("nrjawgqwg") .withHasPersistedState(true) - .withTargetReplicaSetSize(172604162) - .withMinReplicaSetSize(725495584) - .withReplicaRestartWaitDuration("znxcvds") - .withQuorumLossWaitDuration("njivolvtnovq") - .withStandByReplicaKeepDuration("gemjdftuljltdu") - .withServicePlacementTimeLimit("amtmcz"); + .withTargetReplicaSetSize(33232567) + .withMinReplicaSetSize(1607260784) + .withReplicaRestartWaitDuration("fwxosowzxcu") + .withQuorumLossWaitDuration("cjooxdjebwpucwwf") + .withStandByReplicaKeepDuration("vbvmeu") + .withServicePlacementTimeLimit("ivyhzceuojgjrwju"); model = BinaryData.fromObject(model).toObject(StatefulServiceProperties.class); - Assertions.assertEquals("vpkjpr", model.placementConstraints()); + Assertions.assertEquals("ni", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("fz", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("aehvbbxuri", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals("bkpyc", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("wndnhj", model.serviceLoadMetrics().get(0).name()); Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(102090310, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(1239776527, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(1256288646, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost()); - Assertions.assertEquals("jw", model.serviceTypeName()); + Assertions.assertEquals(2043748556, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(1020918643, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(1990735678, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); + Assertions.assertEquals("x", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("ioknssxmoj", model.serviceDnsName()); + Assertions.assertEquals("nrjawgqwg", model.serviceDnsName()); Assertions.assertEquals(true, model.hasPersistedState()); - Assertions.assertEquals(172604162, model.targetReplicaSetSize()); - Assertions.assertEquals(725495584, model.minReplicaSetSize()); - Assertions.assertEquals("znxcvds", model.replicaRestartWaitDuration()); - Assertions.assertEquals("njivolvtnovq", model.quorumLossWaitDuration()); - Assertions.assertEquals("gemjdftuljltdu", model.standByReplicaKeepDuration()); - Assertions.assertEquals("amtmcz", model.servicePlacementTimeLimit()); + Assertions.assertEquals(33232567, model.targetReplicaSetSize()); + Assertions.assertEquals(1607260784, model.minReplicaSetSize()); + Assertions.assertEquals("fwxosowzxcu", model.replicaRestartWaitDuration()); + Assertions.assertEquals("cjooxdjebwpucwwf", model.quorumLossWaitDuration()); + Assertions.assertEquals("vbvmeu", model.standByReplicaKeepDuration()); + Assertions.assertEquals("ivyhzceuojgjrwju", model.servicePlacementTimeLimit()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java index 44a6c2db9129..ababa89a73f6 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/StatelessServicePropertiesTests.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.servicefabricmanagedclusters.generated; @@ -24,91 +24,78 @@ public final class StatelessServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StatelessServiceProperties model = BinaryData.fromString( - "{\"serviceKind\":\"Stateless\",\"instanceCount\":1093341171,\"minInstanceCount\":1986333527,\"minInstancePercentage\":318971885,\"provisioningState\":\"zedqbcvhzlhplo\",\"serviceTypeName\":\"qkdlw\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"u\",\"placementConstraints\":\"kxtrq\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"lmbtxhwgfwsrt\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"coezbrhubskh\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"ygo\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"kkqfqjbvle\"}],\"serviceLoadMetrics\":[{\"name\":\"ml\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1874056015,\"secondaryDefaultLoad\":275372238,\"defaultLoad\":2087343233},{\"name\":\"yvnqqybaryeuay\",\"weight\":\"High\",\"primaryDefaultLoad\":1625919856,\"secondaryDefaultLoad\":2002865497,\"defaultLoad\":1085196762},{\"name\":\"lesjcbhe\",\"weight\":\"Low\",\"primaryDefaultLoad\":649687207,\"secondaryDefaultLoad\":167991676,\"defaultLoad\":1014646419},{\"name\":\"cv\",\"weight\":\"Medium\",\"primaryDefaultLoad\":584080581,\"secondaryDefaultLoad\":1678889630,\"defaultLoad\":372770519}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Medium\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") + "{\"serviceKind\":\"Stateless\",\"instanceCount\":1131914831,\"minInstanceCount\":1267034334,\"minInstancePercentage\":352465906,\"provisioningState\":\"pow\",\"serviceTypeName\":\"wpr\",\"partitionDescription\":{\"partitionScheme\":\"Partition\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"eualupjmkhf\",\"placementConstraints\":\"bbcswsrtjri\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"pbewtghfgblcgwx\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"lvqhjkbegibtnmx\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"bwwaloa\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"cgwrtzjuz\"}],\"serviceLoadMetrics\":[{\"name\":\"zmh\",\"weight\":\"Low\",\"primaryDefaultLoad\":2086388671,\"secondaryDefaultLoad\":351214213,\"defaultLoad\":2051758056}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"},{\"type\":\"ServicePlacementPolicy\"}],\"defaultMoveCost\":\"Zero\",\"scalingPolicies\":[{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}},{\"scalingMechanism\":{\"kind\":\"ScalingMechanism\"},\"scalingTrigger\":{\"kind\":\"ScalingTrigger\"}}]}") .toObject(StatelessServiceProperties.class); - Assertions.assertEquals("kxtrq", model.placementConstraints()); + Assertions.assertEquals("bbcswsrtjri", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("lmbtxhwgfwsrt", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("ml", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1874056015, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(275372238, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(2087343233, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("qkdlw", model.serviceTypeName()); + Assertions.assertEquals("pbewtghfgblcgwx", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("zmh", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(2086388671, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(351214213, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(2051758056, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost()); + Assertions.assertEquals("wpr", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("u", model.serviceDnsName()); - Assertions.assertEquals(1093341171, model.instanceCount()); - Assertions.assertEquals(1986333527, model.minInstanceCount()); - Assertions.assertEquals(318971885, model.minInstancePercentage()); + Assertions.assertEquals("eualupjmkhf", model.serviceDnsName()); + Assertions.assertEquals(1131914831, model.instanceCount()); + Assertions.assertEquals(1267034334, model.minInstanceCount()); + Assertions.assertEquals(352465906, model.minInstancePercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("kxtrq") + StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("bbcswsrtjri") .withCorrelationScheme(Arrays.asList( new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("lmbtxhwgfwsrt"), + .withServiceName("pbewtghfgblcgwx"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("coezbrhubskh"), - new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("ygo"), + .withServiceName("lvqhjkbegibtnmx"), new ServiceCorrelation().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY) - .withServiceName("kkqfqjbvle"))) - .withServiceLoadMetrics(Arrays.asList( - new ServiceLoadMetric().withName("ml") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(1874056015) - .withSecondaryDefaultLoad(275372238) - .withDefaultLoad(2087343233), - new ServiceLoadMetric().withName("yvnqqybaryeuay") - .withWeight(ServiceLoadMetricWeight.HIGH) - .withPrimaryDefaultLoad(1625919856) - .withSecondaryDefaultLoad(2002865497) - .withDefaultLoad(1085196762), - new ServiceLoadMetric().withName("lesjcbhe") - .withWeight(ServiceLoadMetricWeight.LOW) - .withPrimaryDefaultLoad(649687207) - .withSecondaryDefaultLoad(167991676) - .withDefaultLoad(1014646419), - new ServiceLoadMetric().withName("cv") - .withWeight(ServiceLoadMetricWeight.MEDIUM) - .withPrimaryDefaultLoad(584080581) - .withSecondaryDefaultLoad(1678889630) - .withDefaultLoad(372770519))) - .withServicePlacementPolicies( - Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), new ServicePlacementPolicy())) - .withDefaultMoveCost(MoveCost.MEDIUM) + .withServiceName("bwwaloa"), + new ServiceCorrelation().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY) + .withServiceName("cgwrtzjuz"))) + .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetric().withName("zmh") + .withWeight(ServiceLoadMetricWeight.LOW) + .withPrimaryDefaultLoad(2086388671) + .withSecondaryDefaultLoad(351214213) + .withDefaultLoad(2051758056))) + .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicy(), new ServicePlacementPolicy(), + new ServicePlacementPolicy(), new ServicePlacementPolicy())) + .withDefaultMoveCost(MoveCost.ZERO) .withScalingPolicies(Arrays.asList( new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()), + new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) + .withScalingTrigger(new ScalingTrigger()), new ScalingPolicy().withScalingMechanism(new ScalingMechanism()) .withScalingTrigger(new ScalingTrigger()))) - .withServiceTypeName("qkdlw") + .withServiceTypeName("wpr") .withPartitionDescription(new Partition()) .withServicePackageActivationMode(ServicePackageActivationMode.SHARED_PROCESS) - .withServiceDnsName("u") - .withInstanceCount(1093341171) - .withMinInstanceCount(1986333527) - .withMinInstancePercentage(318971885); + .withServiceDnsName("eualupjmkhf") + .withInstanceCount(1131914831) + .withMinInstanceCount(1267034334) + .withMinInstancePercentage(352465906); model = BinaryData.fromObject(model).toObject(StatelessServiceProperties.class); - Assertions.assertEquals("kxtrq", model.placementConstraints()); + Assertions.assertEquals("bbcswsrtjri", model.placementConstraints()); Assertions.assertEquals(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme()); - Assertions.assertEquals("lmbtxhwgfwsrt", model.correlationScheme().get(0).serviceName()); - Assertions.assertEquals("ml", model.serviceLoadMetrics().get(0).name()); - Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight()); - Assertions.assertEquals(1874056015, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); - Assertions.assertEquals(275372238, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); - Assertions.assertEquals(2087343233, model.serviceLoadMetrics().get(0).defaultLoad()); - Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost()); - Assertions.assertEquals("qkdlw", model.serviceTypeName()); + Assertions.assertEquals("pbewtghfgblcgwx", model.correlationScheme().get(0).serviceName()); + Assertions.assertEquals("zmh", model.serviceLoadMetrics().get(0).name()); + Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight()); + Assertions.assertEquals(2086388671, model.serviceLoadMetrics().get(0).primaryDefaultLoad()); + Assertions.assertEquals(351214213, model.serviceLoadMetrics().get(0).secondaryDefaultLoad()); + Assertions.assertEquals(2051758056, model.serviceLoadMetrics().get(0).defaultLoad()); + Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost()); + Assertions.assertEquals("wpr", model.serviceTypeName()); Assertions.assertEquals(ServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode()); - Assertions.assertEquals("u", model.serviceDnsName()); - Assertions.assertEquals(1093341171, model.instanceCount()); - Assertions.assertEquals(1986333527, model.minInstanceCount()); - Assertions.assertEquals(318971885, model.minInstancePercentage()); + Assertions.assertEquals("eualupjmkhf", model.serviceDnsName()); + Assertions.assertEquals(1131914831, model.instanceCount()); + Assertions.assertEquals(1267034334, model.minInstanceCount()); + Assertions.assertEquals(352465906, model.minInstancePercentage()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java index dda2c98e1459..fe4ff5fcabfe 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/SubnetTests.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.servicefabricmanagedclusters.generated; @@ -14,27 +14,27 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Subnet model = BinaryData.fromString( - "{\"name\":\"xozap\",\"enableIpv6\":true,\"privateEndpointNetworkPolicies\":\"disabled\",\"privateLinkServiceNetworkPolicies\":\"enabled\",\"networkSecurityGroupId\":\"lya\"}") + "{\"name\":\"mueedndrdvstk\",\"enableIpv6\":false,\"privateEndpointNetworkPolicies\":\"enabled\",\"privateLinkServiceNetworkPolicies\":\"disabled\",\"networkSecurityGroupId\":\"lmfmtdaay\"}") .toObject(Subnet.class); - Assertions.assertEquals("xozap", model.name()); - Assertions.assertEquals(true, model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); - Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.ENABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lya", model.networkSecurityGroupId()); + Assertions.assertEquals("mueedndrdvstk", model.name()); + Assertions.assertEquals(false, model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); + Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withName("xozap") - .withEnableIpv6(true) - .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.DISABLED) - .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.ENABLED) - .withNetworkSecurityGroupId("lya"); + Subnet model = new Subnet().withName("mueedndrdvstk") + .withEnableIpv6(false) + .withPrivateEndpointNetworkPolicies(PrivateEndpointNetworkPolicies.ENABLED) + .withPrivateLinkServiceNetworkPolicies(PrivateLinkServiceNetworkPolicies.DISABLED) + .withNetworkSecurityGroupId("lmfmtdaay"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("xozap", model.name()); - Assertions.assertEquals(true, model.enableIpv6()); - Assertions.assertEquals(PrivateEndpointNetworkPolicies.DISABLED, model.privateEndpointNetworkPolicies()); - Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.ENABLED, model.privateLinkServiceNetworkPolicies()); - Assertions.assertEquals("lya", model.networkSecurityGroupId()); + Assertions.assertEquals("mueedndrdvstk", model.name()); + Assertions.assertEquals(false, model.enableIpv6()); + Assertions.assertEquals(PrivateEndpointNetworkPolicies.ENABLED, model.privateEndpointNetworkPolicies()); + Assertions.assertEquals(PrivateLinkServiceNetworkPolicies.DISABLED, model.privateLinkServiceNetworkPolicies()); + Assertions.assertEquals("lmfmtdaay", model.networkSecurityGroupId()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/UserAssignedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/UserAssignedIdentityTests.java index eff67420602f..99fdbf25689c 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/UserAssignedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/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.servicefabricmanagedclusters.generated; @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"zidnsezcxtbzsgfy\",\"clientId\":\"sne\"}") + = BinaryData.fromString("{\"principalId\":\"dkfthwxmnt\",\"clientId\":\"waopvkmijcmmxd\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesProtectedSettingsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesProtectedSettingsTests.java new file mode 100644 index 000000000000..6ea3ab62cc46 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesProtectedSettingsTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesProtectedSettings; + +public final class VMSSExtensionPropertiesProtectedSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMSSExtensionPropertiesProtectedSettings model + = BinaryData.fromString("{}").toObject(VMSSExtensionPropertiesProtectedSettings.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMSSExtensionPropertiesProtectedSettings model = new VMSSExtensionPropertiesProtectedSettings(); + model = BinaryData.fromObject(model).toObject(VMSSExtensionPropertiesProtectedSettings.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesSettingsTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesSettingsTests.java new file mode 100644 index 000000000000..9d986515516e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesSettingsTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; + +public final class VMSSExtensionPropertiesSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMSSExtensionPropertiesSettings model + = BinaryData.fromString("{}").toObject(VMSSExtensionPropertiesSettings.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMSSExtensionPropertiesSettings model = new VMSSExtensionPropertiesSettings(); + model = BinaryData.fromObject(model).toObject(VMSSExtensionPropertiesSettings.class); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java new file mode 100644 index 000000000000..0cc4929b664d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionPropertiesTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VMSSExtensionProperties; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesProtectedSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VMSSExtensionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMSSExtensionProperties model = BinaryData.fromString( + "{\"publisher\":\"fhwygzlvdnkfxus\",\"type\":\"mdwzrmuhapfcqdps\",\"typeHandlerVersion\":\"xqv\",\"autoUpgradeMinorVersion\":false,\"settings\":{},\"protectedSettings\":{},\"forceUpdateTag\":\"mgccelvezrypq\",\"provisionAfterExtensions\":[\"eokerqwkyhkobopg\"],\"provisioningState\":\"dkow\",\"enableAutomaticUpgrade\":false,\"setupOrder\":[\"BeforeSFRuntime\"]}") + .toObject(VMSSExtensionProperties.class); + Assertions.assertEquals("fhwygzlvdnkfxus", model.publisher()); + Assertions.assertEquals("mdwzrmuhapfcqdps", model.type()); + Assertions.assertEquals("xqv", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mgccelvezrypq", model.forceUpdateTag()); + Assertions.assertEquals("eokerqwkyhkobopg", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMSSExtensionProperties model = new VMSSExtensionProperties().withPublisher("fhwygzlvdnkfxus") + .withType("mdwzrmuhapfcqdps") + .withTypeHandlerVersion("xqv") + .withAutoUpgradeMinorVersion(false) + .withSettings(new VMSSExtensionPropertiesSettings()) + .withProtectedSettings(new VMSSExtensionPropertiesProtectedSettings()) + .withForceUpdateTag("mgccelvezrypq") + .withProvisionAfterExtensions(Arrays.asList("eokerqwkyhkobopg")) + .withEnableAutomaticUpgrade(false) + .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + model = BinaryData.fromObject(model).toObject(VMSSExtensionProperties.class); + Assertions.assertEquals("fhwygzlvdnkfxus", model.publisher()); + Assertions.assertEquals("mdwzrmuhapfcqdps", model.type()); + Assertions.assertEquals("xqv", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("mgccelvezrypq", model.forceUpdateTag()); + Assertions.assertEquals("eokerqwkyhkobopg", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionTests.java new file mode 100644 index 000000000000..1871e3004337 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSSExtensionTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtension; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesProtectedSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSSExtensionPropertiesSettings; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VMSSExtensionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VMSSExtension model = BinaryData.fromString( + "{\"name\":\"wws\",\"properties\":{\"publisher\":\"ughftqsx\",\"type\":\"qxujxukndxd\",\"typeHandlerVersion\":\"grjguufzd\",\"autoUpgradeMinorVersion\":false,\"settings\":{},\"protectedSettings\":{},\"forceUpdateTag\":\"ihwhbotzingamvpp\",\"provisionAfterExtensions\":[\"zqzudph\",\"amvdkfwynwcvtbv\",\"ayhmtnvyqiatkz\"],\"provisioningState\":\"cnpwzcjaesgvvscc\",\"enableAutomaticUpgrade\":false,\"setupOrder\":[\"BeforeSFRuntime\"]}}") + .toObject(VMSSExtension.class); + Assertions.assertEquals("wws", model.name()); + Assertions.assertEquals("ughftqsx", model.publisher()); + Assertions.assertEquals("qxujxukndxd", model.type()); + Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("ihwhbotzingamvpp", model.forceUpdateTag()); + Assertions.assertEquals("zqzudph", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VMSSExtension model = new VMSSExtension().withName("wws") + .withPublisher("ughftqsx") + .withType("qxujxukndxd") + .withTypeHandlerVersion("grjguufzd") + .withAutoUpgradeMinorVersion(false) + .withSettings(new VMSSExtensionPropertiesSettings()) + .withProtectedSettings(new VMSSExtensionPropertiesProtectedSettings()) + .withForceUpdateTag("ihwhbotzingamvpp") + .withProvisionAfterExtensions(Arrays.asList("zqzudph", "amvdkfwynwcvtbv", "ayhmtnvyqiatkz")) + .withEnableAutomaticUpgrade(false) + .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); + model = BinaryData.fromObject(model).toObject(VMSSExtension.class); + Assertions.assertEquals("wws", model.name()); + Assertions.assertEquals("ughftqsx", model.publisher()); + Assertions.assertEquals("qxujxukndxd", model.type()); + Assertions.assertEquals("grjguufzd", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("ihwhbotzingamvpp", model.forceUpdateTag()); + Assertions.assertEquals("zqzudph", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java index 579db72647cc..7525f86839dd 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VMSizeTests.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.servicefabricmanagedclusters.generated; @@ -10,12 +10,6 @@ public final class VMSizeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMSize model = BinaryData.fromString("{\"size\":\"ag\"}").toObject(VMSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMSize model = new VMSize(); - model = BinaryData.fromObject(model).toObject(VMSize.class); + VMSize model = BinaryData.fromString("{\"size\":\"uicpd\"}").toObject(VMSize.class); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java index 83d3102b1843..d173b9d51d5d 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultCertificateTests.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.servicefabricmanagedclusters.generated; @@ -11,19 +11,19 @@ public final class VaultCertificateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VaultCertificate model - = BinaryData.fromString("{\"certificateUrl\":\"zpdrhneu\",\"certificateStore\":\"owqkdwytisi\"}") - .toObject(VaultCertificate.class); - Assertions.assertEquals("zpdrhneu", model.certificateUrl()); - Assertions.assertEquals("owqkdwytisi", model.certificateStore()); + VaultCertificate model = BinaryData + .fromString("{\"certificateUrl\":\"hfkvtvsexsowuel\",\"certificateStore\":\"qhhahhxvrhmzkwpj\"}") + .toObject(VaultCertificate.class); + Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); + Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VaultCertificate model - = new VaultCertificate().withCertificateUrl("zpdrhneu").withCertificateStore("owqkdwytisi"); + = new VaultCertificate().withCertificateUrl("hfkvtvsexsowuel").withCertificateStore("qhhahhxvrhmzkwpj"); model = BinaryData.fromObject(model).toObject(VaultCertificate.class); - Assertions.assertEquals("zpdrhneu", model.certificateUrl()); - Assertions.assertEquals("owqkdwytisi", model.certificateStore()); + Assertions.assertEquals("hfkvtvsexsowuel", model.certificateUrl()); + Assertions.assertEquals("qhhahhxvrhmzkwpj", model.certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java index de61a73a9a7f..3f5c6b4e5670 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VaultSecretGroupTests.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.servicefabricmanagedclusters.generated; @@ -15,21 +15,24 @@ public final class VaultSecretGroupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VaultSecretGroup model = BinaryData.fromString( - "{\"sourceVault\":{\"id\":\"mfpgv\"},\"vaultCertificates\":[{\"certificateUrl\":\"ipaslthaqfxssmwu\",\"certificateStore\":\"wbdsr\"}]}") + "{\"sourceVault\":{\"id\":\"cirgzp\"},\"vaultCertificates\":[{\"certificateUrl\":\"lazszrn\",\"certificateStore\":\"oiindfpwpjy\"},{\"certificateUrl\":\"wbtlhflsjcdh\",\"certificateStore\":\"zfjvfbgofe\"},{\"certificateUrl\":\"jagrqmqhldvr\",\"certificateStore\":\"iiojnal\"}]}") .toObject(VaultSecretGroup.class); - Assertions.assertEquals("mfpgv", model.sourceVault().id()); - Assertions.assertEquals("ipaslthaqfxssmwu", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("wbdsr", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("cirgzp", model.sourceVault().id()); + Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VaultSecretGroup model = new VaultSecretGroup().withSourceVault(new SubResource().withId("mfpgv")) - .withVaultCertificates(Arrays - .asList(new VaultCertificate().withCertificateUrl("ipaslthaqfxssmwu").withCertificateStore("wbdsr"))); + VaultSecretGroup model + = new VaultSecretGroup().withSourceVault(new SubResource().withId("cirgzp")) + .withVaultCertificates(Arrays.asList( + new VaultCertificate().withCertificateUrl("lazszrn").withCertificateStore("oiindfpwpjy"), + new VaultCertificate().withCertificateUrl("wbtlhflsjcdh").withCertificateStore("zfjvfbgofe"), + new VaultCertificate().withCertificateUrl("jagrqmqhldvr").withCertificateStore("iiojnal"))); model = BinaryData.fromObject(model).toObject(VaultSecretGroup.class); - Assertions.assertEquals("mfpgv", model.sourceVault().id()); - Assertions.assertEquals("ipaslthaqfxssmwu", model.vaultCertificates().get(0).certificateUrl()); - Assertions.assertEquals("wbdsr", model.vaultCertificates().get(0).certificateStore()); + Assertions.assertEquals("cirgzp", model.sourceVault().id()); + Assertions.assertEquals("lazszrn", model.vaultCertificates().get(0).certificateUrl()); + Assertions.assertEquals("oiindfpwpjy", model.vaultCertificates().get(0).certificateStore()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java new file mode 100644 index 000000000000..7ace0bc6f1cd --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmApplicationTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmApplication; +import org.junit.jupiter.api.Assertions; + +public final class VmApplicationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VmApplication model = BinaryData.fromString( + "{\"configurationReference\":\"tizzronasxif\",\"enableAutomaticUpgrade\":false,\"order\":1553856312,\"packageReferenceId\":\"zh\",\"vmGalleryTags\":\"wesgogczh\",\"treatFailureAsDeploymentFailure\":true}") + .toObject(VmApplication.class); + Assertions.assertEquals("tizzronasxif", model.configurationReference()); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(1553856312, model.order()); + Assertions.assertEquals("zh", model.packageReferenceId()); + Assertions.assertEquals("wesgogczh", model.vmGalleryTags()); + Assertions.assertEquals(true, model.treatFailureAsDeploymentFailure()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VmApplication model = new VmApplication().withConfigurationReference("tizzronasxif") + .withEnableAutomaticUpgrade(false) + .withOrder(1553856312) + .withPackageReferenceId("zh") + .withVmGalleryTags("wesgogczh") + .withTreatFailureAsDeploymentFailure(true); + model = BinaryData.fromObject(model).toObject(VmApplication.class); + Assertions.assertEquals("tizzronasxif", model.configurationReference()); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(1553856312, model.order()); + Assertions.assertEquals("zh", model.packageReferenceId()); + Assertions.assertEquals("wesgogczh", model.vmGalleryTags()); + Assertions.assertEquals(true, model.treatFailureAsDeploymentFailure()); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java index dc3adad1daa0..d5042f9ef239 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmManagedIdentityTests.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.servicefabricmanagedclusters.generated; @@ -13,14 +13,14 @@ public final class VmManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmManagedIdentity model - = BinaryData.fromString("{\"userAssignedIdentities\":[\"nk\",\"xu\"]}").toObject(VmManagedIdentity.class); - Assertions.assertEquals("nk", model.userAssignedIdentities().get(0)); + = BinaryData.fromString("{\"userAssignedIdentities\":[\"kbwcc\"]}").toObject(VmManagedIdentity.class); + Assertions.assertEquals("kbwcc", model.userAssignedIdentities().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmManagedIdentity model = new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList("nk", "xu")); + VmManagedIdentity model = new VmManagedIdentity().withUserAssignedIdentities(Arrays.asList("kbwcc")); model = BinaryData.fromObject(model).toObject(VmManagedIdentity.class); - Assertions.assertEquals("nk", model.userAssignedIdentities().get(0)); + Assertions.assertEquals("kbwcc", model.userAssignedIdentities().get(0)); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java index 9ccd355600c0..da23b34e956a 100644 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.java +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssDataDiskTests.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.servicefabricmanagedclusters.generated; @@ -13,24 +13,24 @@ public final class VmssDataDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmssDataDisk model = BinaryData.fromString( - "{\"lun\":1049949782,\"diskSizeGB\":1724622267,\"diskType\":\"Premium_LRS\",\"diskLetter\":\"rypqlmfeo\"}") + "{\"lun\":2016047307,\"diskSizeGB\":2104302004,\"diskType\":\"StandardSSD_ZRS\",\"diskLetter\":\"qatmtdhtmdvy\"}") .toObject(VmssDataDisk.class); - Assertions.assertEquals(1049949782, model.lun()); - Assertions.assertEquals(1724622267, model.diskSizeGB()); - Assertions.assertEquals(DiskType.PREMIUM_LRS, model.diskType()); - Assertions.assertEquals("rypqlmfeo", model.diskLetter()); + Assertions.assertEquals(2016047307, model.lun()); + Assertions.assertEquals(2104302004, model.diskSizeGB()); + Assertions.assertEquals(DiskType.STANDARD_SSD_ZRS, model.diskType()); + Assertions.assertEquals("qatmtdhtmdvy", model.diskLetter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmssDataDisk model = new VmssDataDisk().withLun(1049949782) - .withDiskSizeGB(1724622267) - .withDiskType(DiskType.PREMIUM_LRS) - .withDiskLetter("rypqlmfeo"); + VmssDataDisk model = new VmssDataDisk().withLun(2016047307) + .withDiskSizeGB(2104302004) + .withDiskType(DiskType.STANDARD_SSD_ZRS) + .withDiskLetter("qatmtdhtmdvy"); model = BinaryData.fromObject(model).toObject(VmssDataDisk.class); - Assertions.assertEquals(1049949782, model.lun()); - Assertions.assertEquals(1724622267, model.diskSizeGB()); - Assertions.assertEquals(DiskType.PREMIUM_LRS, model.diskType()); - Assertions.assertEquals("rypqlmfeo", model.diskLetter()); + Assertions.assertEquals(2016047307, model.lun()); + Assertions.assertEquals(2104302004, model.diskSizeGB()); + Assertions.assertEquals(DiskType.STANDARD_SSD_ZRS, model.diskType()); + Assertions.assertEquals("qatmtdhtmdvy", model.diskLetter()); } } diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionPropertiesTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionPropertiesTests.java deleted file mode 100644 index 37e0c74db30e..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionPropertiesTests.java +++ /dev/null @@ -1,53 +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.servicefabricmanagedclusters.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.fluent.models.VmssExtensionProperties; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VmssExtensionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmssExtensionProperties model = BinaryData.fromString( - "{\"publisher\":\"wspughftqsxhqx\",\"type\":\"j\",\"typeHandlerVersion\":\"ukndxdigrjgu\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datamsyqtfi\",\"protectedSettings\":\"datahbotzingamvppho\",\"forceUpdateTag\":\"qzudphq\",\"provisionAfterExtensions\":[\"dkfw\",\"nwcvtbvkayhmtnv\",\"qiatkzwpcnp\",\"zcjaesgvvsccy\"],\"provisioningState\":\"g\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}") - .toObject(VmssExtensionProperties.class); - Assertions.assertEquals("wspughftqsxhqx", model.publisher()); - Assertions.assertEquals("j", model.type()); - Assertions.assertEquals("ukndxdigrjgu", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmssExtensionProperties model = new VmssExtensionProperties().withPublisher("wspughftqsxhqx") - .withType("j") - .withTypeHandlerVersion("ukndxdigrjgu") - .withAutoUpgradeMinorVersion(true) - .withSettings("datamsyqtfi") - .withProtectedSettings("datahbotzingamvppho") - .withForceUpdateTag("qzudphq") - .withProvisionAfterExtensions(Arrays.asList("dkfw", "nwcvtbvkayhmtnv", "qiatkzwpcnp", "zcjaesgvvsccy")) - .withEnableAutomaticUpgrade(true) - .withSetupOrder( - Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); - model = BinaryData.fromObject(model).toObject(VmssExtensionProperties.class); - Assertions.assertEquals("wspughftqsxhqx", model.publisher()); - Assertions.assertEquals("j", model.type()); - Assertions.assertEquals("ukndxdigrjgu", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("qzudphq", model.forceUpdateTag()); - Assertions.assertEquals("dkfw", model.provisionAfterExtensions().get(0)); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java deleted file mode 100644 index 00d44a379781..000000000000 --- a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/VmssExtensionTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicefabricmanagedclusters.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtension; -import com.azure.resourcemanager.servicefabricmanagedclusters.models.VmssExtensionSetupOrder; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VmssExtensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmssExtension model = BinaryData.fromString( - "{\"name\":\"ircgpikpz\",\"properties\":{\"publisher\":\"mejzanlfzxia\",\"type\":\"rmbzo\",\"typeHandlerVersion\":\"okixrjqcir\",\"autoUpgradeMinorVersion\":false,\"settings\":\"datarlazszrnw\",\"protectedSettings\":\"dataindfpwpjyl\",\"forceUpdateTag\":\"tlhflsjcdhszf\",\"provisionAfterExtensions\":[\"bgofeljag\",\"qmqhldvriii\",\"jnalghf\",\"vtvsexsowueluq\"],\"provisioningState\":\"ahhxvrh\",\"enableAutomaticUpgrade\":true,\"setupOrder\":[\"BeforeSFRuntime\",\"BeforeSFRuntime\",\"BeforeSFRuntime\"]}}") - .toObject(VmssExtension.class); - Assertions.assertEquals("ircgpikpz", model.name()); - Assertions.assertEquals("mejzanlfzxia", model.publisher()); - Assertions.assertEquals("rmbzo", model.type()); - Assertions.assertEquals("okixrjqcir", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("tlhflsjcdhszf", model.forceUpdateTag()); - Assertions.assertEquals("bgofeljag", model.provisionAfterExtensions().get(0)); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmssExtension model = new VmssExtension().withName("ircgpikpz") - .withPublisher("mejzanlfzxia") - .withType("rmbzo") - .withTypeHandlerVersion("okixrjqcir") - .withAutoUpgradeMinorVersion(false) - .withSettings("datarlazszrnw") - .withProtectedSettings("dataindfpwpjyl") - .withForceUpdateTag("tlhflsjcdhszf") - .withProvisionAfterExtensions(Arrays.asList("bgofeljag", "qmqhldvriii", "jnalghf", "vtvsexsowueluq")) - .withEnableAutomaticUpgrade(true) - .withSetupOrder(Arrays.asList(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, - VmssExtensionSetupOrder.BEFORE_SFRUNTIME, VmssExtensionSetupOrder.BEFORE_SFRUNTIME)); - model = BinaryData.fromObject(model).toObject(VmssExtension.class); - Assertions.assertEquals("ircgpikpz", model.name()); - Assertions.assertEquals("mejzanlfzxia", model.publisher()); - Assertions.assertEquals("rmbzo", model.type()); - Assertions.assertEquals("okixrjqcir", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("tlhflsjcdhszf", model.forceUpdateTag()); - Assertions.assertEquals("bgofeljag", model.provisionAfterExtensions().get(0)); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(VmssExtensionSetupOrder.BEFORE_SFRUNTIME, model.setupOrder().get(0)); - } -} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java new file mode 100644 index 000000000000..e4842ee0e82a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/src/test/java/com/azure/resourcemanager/servicefabricmanagedclusters/generated/ZoneFaultSimulationContentTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.servicefabricmanagedclusters.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.FaultSimulationConstraints; +import com.azure.resourcemanager.servicefabricmanagedclusters.models.ZoneFaultSimulationContent; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ZoneFaultSimulationContentTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ZoneFaultSimulationContent model = BinaryData.fromString( + "{\"faultKind\":\"Zone\",\"zones\":[\"dkcrodt\",\"infwjlfltkacjve\",\"kdlfoa\"],\"force\":false,\"constraints\":{\"expirationTime\":\"2021-01-22T11:21:37Z\"}}") + .toObject(ZoneFaultSimulationContent.class); + Assertions.assertEquals(false, model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); + Assertions.assertEquals("dkcrodt", model.zones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ZoneFaultSimulationContent model = new ZoneFaultSimulationContent().withForce(false) + .withConstraints( + new FaultSimulationConstraints().withExpirationTime(OffsetDateTime.parse("2021-01-22T11:21:37Z"))) + .withZones(Arrays.asList("dkcrodt", "infwjlfltkacjve", "kdlfoa")); + model = BinaryData.fromObject(model).toObject(ZoneFaultSimulationContent.class); + Assertions.assertEquals(false, model.force()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T11:21:37Z"), model.constraints().expirationTime()); + Assertions.assertEquals("dkcrodt", model.zones().get(0)); + } +} diff --git a/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml new file mode 100644 index 000000000000..751f91c5cd55 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/azure-resourcemanager-servicefabricmanagedclusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: fc99bab79e60d7d1a0783dd665e5ae903787aeb7 +repo: Azure/azure-rest-api-specs +additionalDirectories: